Scaling websockets Based Services - Getting Started

It looks like mid-2011 is the time that websockets should be adopted by all of the important browsers and available for common use.  You can track this here for yourself.

Bold statements like, “HTML5 Web Sockets provides a true standard that you can use to build scalable, real-time web applications.” are being flung around.  That was from an article called “HTML5 Web Sockets: A Quantum Leap in Scalability for the Web.“

That is a bold statement.  Like all things scalability related it’s certainly not automatic or free.  In order to take advantage of the scalability possibilities inherent in websockets one must do things correctly from the start and architect a system to do what is needed and even better, at scale.

So, I set out on a little journey this morning to figure out exactly what I would need to do if I wanted to build a scalable websockets service for the purpose of having lots of websocket clients connected doing meaningful things.

Even though there are amazing HTML5 and websocket demos abounding through the ‘net there is very little data about the server side to be found and we certainly can’t forget and that is the server-side.  What will serve all those websocket requests that start coming from browsers soon?  There has to be something on the other end that knows what to do with a websocket connection.

The current state of server support for websockets is pretty dismal.  It seems that clients our outstripping the servers at the moment.  Here is what I’ve found for some of the servers I regularly deal with:

Apache - Extend with pywebsockets to add websockets support to the server - http://code.google.com/p/pywebsocket/

nginx -

Tornado - This server can support websockets with the websockets module - https://github.com/finiteloop/tornado/blob/master/tornado/websocket.py

lighttpd - Extend w/ mod_websocket - https://github.com/nori0428/mod_websocket

Jetty - Jetty has websocket support since 7.01 - http://blogs.webtide.com/gregw/entry/jetty_websocket_server

node.js as a websocket server - https://github.com/ncr/node.ws.js

Kaazing - Claims to have a gateway/bridge server that will allow the use of websockets now.

No doubt I have missed things in this post.  This was just a getting started kind of post with some initial digging into what it’s going to take to be ready for a real-time, asynchronous, distributed web world otherwise knows as, “The Cloud."  More soon...