The most exciting thing about this world is its ever changing quality.

Sunday, February 08, 2009

Lightweight messaging middleware

I have been thinking about having an extreme lightweight messaging middleware. It has to be low latency to the point it could almost offer real-time message delivery with minimum arbitration in between end to end communications; it also should allow an easy way of service directory depository management; it should be built on top of the de facto networking protocol and infrastructure; it should be very easy to configure and deploy; it also need to have a set of simple low level api to manipulate message, processes and communication channel; it must be OS-independent. 

0MQ has released its 0.5 version, and it is an absolutely enjoyable experience when I played with this such a small package, and it does seem to fill in the bill! 

You could easily customerise your own desirable messaging structure based on the dual channel in/out messaging model. The separation from user space thread (which handles the high level messaging) and de-/encoder engine in the kernel space saves us from worrying about efficiency in IP level packets transfer.

One thing though, 0MQ seems still have not adopt any formal directory service standard yet, but I see that coming probably in the near future.

Finally, yes, it is claimed as OS- independent. As yet, it works for me on Ubuntu 8.04 and Windows XP (although its latest windows 0.5 trunk needs slightly tweak in the windows version macro to pass the compilation). I' ll probably try on an ARM9E next time and post my result here. Btw, test on Ubuntu does give following results on my crappy laptop:
Ubuntu 8.04
latency test 100000 msgs, 1B - 105.9 us
throughtput test 10000000 msgs, 1B - 3.5Mmsg/s

No comments: