Current reasons of websockets not being available
- Some firewalls and stuff are configured to kill HTTP connections after a certain amount of time. There is a real cost to persistent connections on networking gear, although that cost is going down, still significant
- Some people may be paranoid from a security standpoint and they will kill any traffic over port 80 or 443 that doesn't look like HTTP. In this scenario you can have one org or company talking to another org or company and you have to have both parties agree to let this traffic through. Nowadays we expect it to work most of the time, but sometimes it won't.
- Some clients (older web browsers, some languages) may not support WebSocket
Falling back to long-polling if websocket is not enabled would be the best alternative, but it might not be as simple as it sounds from a pub-sub stand point. For this reason, we decided to fall back to short polling for now and leave that to be handled by the client and look at adding long-polling support later.
- Msgpack has support for a ton of languages, we are covered in that aspect.
- CapnProto implementation is for C++, other languages are being supported for people not related to the original project. Hmm.
Given our current needs, Msgpack is our first choice.
There are several alternatives to use for the implementation of this feature, including:
- Autobahn: Websockets / WAMP on Twisted and asyncio. The server uses twisted which is something the OpenStack community has moved away from already.
- ws4py: Python package implementing the WebSocket protocol as defined in RFC 6455.