Web Socket

A major technical capability, part of HTML5

WebSocket is a protocol providing full-duplex communications channels over a single TCP connection. The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C.

WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request.

The WebSocket protocol makes more interaction between a browser and a web site possible, facilitating live content and the creation of real-time games. This is made possible by providing a standardized way for the server to send content to the browser without being solicited by the client, and allowing for messages to be passed back and forth while keeping the connection open.


WebSocket Protocol Registries -

WebSocket Subprotocol Name Registry


Stomp -

AMQPWSB10 - ( AMQP WebSocket Binding )

XMPP RFC7395 - ( WebSocket Transport for XMPP ), Couldn't reach ?


Haven't had time to examine and evaluate, but looks promising, most widely used I think. The problem is it needs Python3 , but that may be a fairly minimal limitation as of early 2017.

Again, haven't had time to look at, works with Python 2 and 3, operational dependencies include CherryPy ? - as of early 2013

To sum it up - even though nodejs does its job, I had strong feeling that it is not as mature as Python. And I'd rather use Python for such task in the future, so I can be sure that if something goes wrong, it is happening because I failed and issue can be traced relatively easy.

Performance-wise, with WebSocket transport, CPython is on par with nodejs and PyPy is much faster than both. For long-polling, Tornado on PyPy is approximately 1.5-2 times slower than nodejs when used with proper asynchronous libraries. So, given current WebSocket adoption state, I'd say they're comparable.

Thoughtful, interesting how the author works through myriad combinations of components to achieve a balance between design objectives. is an open-source WAMP router to build loosely-coupled components talk with each other in real-time.

See: PythonServers/

Full Stack Python

Gevent and SocketIO

Socket.IO is a WebSocket-like abstraction that enables real-time communication between a browser and a server. gevent-socketio is a Python implementation of the protocol.

The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety of languages.

One aim of this project is to provide a single gevent-based API that works across the different WSGI-based web frameworks out there (Pyramid, Pylons, Flask, web2py, Django, etc...). Only ~3 lines of code are required to tie-in gevent-socketio in your framework. Note: you need to use the gevent python WSGI server to use gevent-socketio.


Also See

Web Application Messaging Protocol

Search wiki for 'websocket'

Last modified 12 days ago Last modified on 04/17/2017 06:07:31 PM