RabbitChat is a simple Web based chat system developed in Tornado High speed Python web framework. It uses Websocket for Full-duplex communication over http and RabbitMQ Broker for message transaction between server and connected clients.
I tried to develop this same scenario in the gevent/twisted python frameworks, but it lacks the support for good RabbitMQ clients. So after long search I got an idea about how to implement this web based chat system using Tornado Web Framework. I chose this because the python RabbitMQ client Pika has good support for the tornado IOLoop, so that we can integrate the RabbitMQ client with our web application and include the WebSocket support easily.
I found few other web based Chat implementations on Gevent, but they are not using the RabbitMQ for the message passing instead they relay up on simple data structures. But I want this should be a RabbitMQ. Another important thing was I want to use Websocket, all frameworks like Gevent or Twisted or Tornado has support for websocket. But in this case we need RabbitMQ client support also. Pika is the good python RabbitMQ client, it has different adapters to integrate it with RabbitMQ and other frameworks. Adapter for Tornado is already there, so that makes this implementation is possible. The Pika adapters for other frameworks will come soon.
You may ask another question, why using RabbitMQ instead of a simple Message passing data structures, Actually this application is a demo app and I want to test the use of Websocket with RabbitMQ. I'm looking forward to develop real time API's using this architecture. Google app engine or other similar platforms( Typhoonae) using Websocket server similar to this way. So you can also develop a good implementations using this demo application.
I hope this demo application helps you to get an idea about Real Time Web application development.Go Top