Welcome! I'm Lorna Jane Mitchell, a web developer, working particularly with PHP, the LAMP stack and related technologies. My main interests lie in working with open source software and building excellent APIs so that data in one system can be used in another. I'm freelance, so if you want to work with me as a consultant, developer, trainer, writer or evangelist, then let me know.
Need a senior developer? I have years of LAMP experience and love to lend a safe pair of hands to get a team through a tight spot.
I'm mad about APIs! If you'd like some advice with creating yours or integrating with someone else's, then you're in the right place.
Time for better tools or better practice? Time for a new version of PHP? Let me lend a hand to make your transition go smoothly.
I have just introduced Beanstalkd into my current PHP project; it was super-easy so I thought I'd share some examples and my thoughts on how a job queue fits in with a PHP web application.
I have an API backend and a web frontend on this project (there may be apps later. It's a startup, there could be anything later). Both front and back ends are PHP Slim Framework applications, and there's a sort of JSON-RPC going on in between the two.
The job queue will handle a few things we don't want to do in real time on the application, such as:
- updating counts of things like comments; when a comment is made, a job gets created and we can return to the user. At some point the job will get processed updating the counts of how many comments are on that thing, how many comments the user made, adding to a news feed of activities ... you get the idea. Continue reading
I get a lot of complaints about an API that I maintain (http://api.joind.in) which is "missing" the ID field. This ID field is the database's primary key; if the user doesn't have access to the database (they don't), then it seems to me that the primary key probably isn't all that useful.
Instead, the API publishes each record with a unique
uri field. If this record is referred to by another record, then this full identifier will be used in every case. If this record should be included in a collection, this exact same identifier will be used there, too. You can reach the resource directly by requesting its URI. In the same way that we might refer to a website by its URL, we refer to records in RESTful systems by their URI*. If you need to store these somewhere for your own use, you can use whatever key you like with the local storage, you may even choose to use the
uri field as it is unique.
* URI stands for Unique Resource Identifier
I had a good experience implementing beanstalkd for the first time last week, so I thought I'd write down how that went and what I learned.
My requirements were simply to add both asynchronous (for processing things like recalculating counts) and periodic (mostly for garbage collection) tasks to a PHP application. The application has a separate web application and backend API, both made of PHP's Slim framework, and the API talks to MySQL. It's all very lightweight and scalable, and I was looking for something to fit in with what we have, with good PHP support.
Enter beanstalkd, it's a super-simple job queue and has great PHP support in the shape of Pheanstalk (I'm saving my PHP + beanstalkd examples for another day because this post would get too long to read otherwise!). I've used gearman in the past but beanstalkd seemed lighter, and when I started looking at their documentation I discovered that I had a working installation in about the time it would take me to fall off a log - which is always a good indicator of a tool that will be fun to work with :) Continue reading
Net Magazine, March 2014
PHPUK, February 2014
Net Magazine, January 2014
PHPNW User Group, December 2013
NW Drupal Camp, November 2013
BBC Develop, November 2013