inicio sindicaci;ón

Archive for PHP

Jimdo @ PHP Unconference

The weekend and therefore the second PHP Unconference in Hamburg is getting closer and closer. You can and WILL meet the Jimdo development team there, including Markus Wolff, Hinrich Sager, Boris Erdmann, Martin Denk, Christian Springub and myself (Sönke Ruempler). Boris and Sönke will give a(n) (un)talk about our message queue dropr and hopefully an enthusiastic discussion about distributed architectures and asynchronous programming!

So if you can’t wait for the weekend just watch one of our famous “Atomic Bomberman” matches held every evening in our office:

PECL spread module resurrected!

Yesterday I got an e-mail that two of my PECL bug reports for the spread module have been fixed. It seems that it gets some recent love from Rob  Richards who commited some fixes and cleanups. After a short test I can see that it’s basically working again (you can send messages to a group without segfaults). Although we have no use-case at the moment it’s nice to see someone is caring for it.

Thanks Rob! I’m gonna play a little bit around :)

delicious, please fix your json API!

One month ago we wrote an email to the guys at delicious that their JSON API breaks the specification when it comes to escaping. Unfortunately we haven’t got any answer yet.

They’re escaping single quotes what is not neccessary and not allowed! This for example causes the Zend_Service_Delicious component of the ZF to fail and return an empty array if you try to get all bookmarks of a specific user whose bookmarks contain single quotes.

So please check the specification at json.org and fix your API!

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!

« Previous entries