The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

Job queue API

Submitted by nk on Wed, 2009-05-06 13:11

Two months ago Dries asked for a queue API in his DC DC keynote. I wrote one immediately after the keynote :) and two months and 131 followups later, it's committed. Most help came from Derek Wright (dww) with his Condor experience and James Gilliland (neclimdul). It was an amazing ride, getting this patch right. And its a groundbreaking patch because it prepares for integration with the likes of Amazon SQS -- it's a different thinking to what core did so far, where everything was stored in a database and consistency was taken as granted. With the queue API, all bets are off: there is no guaranteed order, just a best effort to keep a FIFO. The number of items is never guaranteed to be accurate. This allows us scaling to new heights. My example in the issue was media conversion -- if you have a busy site where media is uploaded and needs to be converted, this queue is pretty much a must: upload servers put the name of the files to be converted in queues and conversion servers read them. It does not matter if it does not happen in strict a FIFO order as long as conversion happens in a reasonable time. The number of queue items changes so rapidly that reporting an exact number is pointless, by the time it reaches your browser, it's outdated anyways, so why bother with the exact count? If you have geographically spread servers then this arrangement allows you to upload and convert even if half of the conversion servers can only see some of the upload servers. Of course, this needs database support too, but you can have geographically distributed database slaves and INSERTs can go in a queue too so that when the master reappears, the new media can be loaded there.

Commenting on this Story is closed.

Submitted by cpelham@drupal.org on Wed, 2009-05-06 15:46.

on making this clever, scalable queue, as well as on your 5 year Drupal anniversary! Here's to many more congratulations on missions accomplished in the future, and to your continued joy and satisfaction in your work.

Submitted by Anonymous on Mon, 2009-10-12 09:12.

Our professional writers team can provide coursework writing help for students. We got a creative writing service. You can obtain custom dissertation writing from professional writers that write only custom papers.

Submitted by mikey_p@drupal.org on Wed, 2009-05-06 18:12.

The Job Queue API is simply beautiful and beautifully simple at the same time. I just finished reading through the patch, and it is an excellent example of clean simple OO code. The use of the Database API, Schema API and drupal_write_record, make it a pleasure to read, and a model of how to do things in Drupal for the next 5 years.