inicio sindicaci;ón

Archive for December, 2007

Announcing “dropr” - the message queue framework for PHP

Finally, we’ve named our new open source message queue framework “dropr”.

Why? When Boris was writing the client angel script he somehow named it “dropr”. As we neither got better suggestions nor had any other idea we just decided for this name. Actually the name is a little bit fun because all those stupidR startupRs. But it’s nice and somehow our framework drops message into queues :)

If you’re using google to search for it, it’s already the first result.

So have a look at https://www.dropr.org/. We’re just writing a little installation manual about setting up the pre-release of our framework. We’ll keep you up-to-date on this blog, so stay tuned.

Message Queue Project: First working version

First, we’d like to annouce that our staff has been reinforced by Boris Erdmann! We’re really proud of having another geek within our development team. Among other things he is the founder and maintainer of the german OpenID provider xlogon.

Update: The project is now called dropr!

Some time has elapsed since we wrote our draft for a message queue system written in and for PHP. Now it’s time to give you guys an update and working beta-code.

Boris and me have spent some nights to get a prototype running. First, we tried to work on tcp stream connections with php for the transport layer but that was buggy and slow. Our second approach was to use http uploads with curl (thanks to Jan Kneschke for the tip!). For the storage we decided to try a simple filesystem storage and it seems our predictions were right:

  • With using the filesystem as client and server storage you won’t need to setup any database system
  • The filesystem actually IS a (restricted) DBMS
  • If you have files, you are able to get all the I/O work done by fast C-code. On the client side, the data is loaded via curl (we only pass the filenames to it) and gets uploaded to the server, where the php handles the uploads and makes tempfiles out of it => the server storage can use a simple rename() operation again to put it into it’s store
  • Filesystem operations like moving and deleting are ATOMIC - a file is existent or it isn’t
  • You can encode all metadata like priority in the filename - there’s enough space in it
  • You can read huge dirs fast with “scandir()” function, it’s sorted by filename
  • You’re still able to implement your own storages and transports, though, because everything is written within an abstract class model.

Some notes:

  • With this setup we’re actually able to send 200-250 messages per second (benchmarked on a damn slow machine).
  • we’ve set up a rc.d script for starting and stopping the client queue daemon
  • the client queue daemon has an angel-process that cares about php breaking down
  • the message queue daemon gets notified by the client via systemv inter-process-communication so there is no sleep() overhead within
  • the system is also in production in a non-critical area of our software and we’re testing it for a few weeks.

You can find the project homepage at https://www.dropr.org/.

Please checkout the sources “svn co https://www.dropr.org/svn/trunk/” and have a look at it. We’re sorry that we have no real documentation at this stage of the project but it will follow soon hopefully.

Stay tuned, we’d like to get out a alpha/beta as PEAR (or maybe debian) package soon.

A tip: Get a free website with integrated content management at Jimdo.com - no programming knowledge required!