Friday 11 March 2011

Messaging Presentation

Here some slides about Messaging, AMQP, RabbitMQ. This slides are part of a small tech talk and includes the example from my previous post.

Wednesday 9 March 2011

RabbitMQ and Node.js Websockets experiment

I've been experimenting with Rabbitmq and Node.js support for Websockets.
The idea is just have a backend to generate random numbers (0-10) and plot the numbers in a realtime graph with websockets.
For that we going to use a Publish/Subscriber model with AMQP and RabbitMQ. The backend (aka Groovy Script) publish the numbers in a exchange. And the suscriber (aka Node.js with Socket io) get the messages from the queue and push the messages in the web browser.

Here Groovy Script
to put messages in the exchange "stockExchange". It generates 1 message per 300 miliseconds !!!!


Here the client code, that use smoothiecharts to render the graph with Websockets


And here Node JS code that suscribes to an AMQP and send each message to the browsers
socketexample.js