[Twisted-Python] Protocol for socket.io

Laurens Van Houtven _ at lvh.io
Sun Jan 26 02:53:47 MST 2014


On Sun, Jan 26, 2014 at 10:46 AM, Glyph <glyph at twistedmatrix.com> wrote:

> It would be great if someone built a package to do this (more interop is
> always better), but I think interest has generally fizzled on Socket.IO
> implementations in the past because SockJS does pretty much exactly the
> same thing, and as Laurens said, our friends over at Desert Bus for Hope
> maintain great Twisted support for it <
> https://github.com/DesertBus/sockjs-twisted> <
> https://pypi.python.org/pypi/txsockjs>.
>

socket.io adds a few things like "RPC support" and "pubsub", both those are
things that should be spoken over some transport, not part of some
transport, and are trivial to layer over an existing browser transport.

I like SockJS because it's literally just "websockets damnit!". Also, it
doesn't use Flash, which has excellent benefits including no gnarly XML
files to server and not having to wait three seconds to figure out if a
connection works or not (yes, really).

Also: protip, speak SockJS over TLS exclusively. It's not even a security
thing (except yes, that too), but if you do end up speaking websockets
you'd be amazed how much Enterprise Quality Web Middleware Server Hardware
Firewall(TM) screws up websocket connections. TLS, OTOH, they just leave be.

hth
lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140126/0242213d/attachment.html>


More information about the Twisted-Python mailing list