Live data from Hacker News

WebSockets RFC is now official

ietf.org

21–30 of 47 posts

Re: WebSockets RFC is now official

#21
post #9

Websockets browser support: http://caniuse.com/#feat=websockets

I let socket.io worry about that. Great library.

socket.io is a great library, agreed. However, a nice thing about standards is you can program to the specification and provide support on other platforms. Working on a project that involves node, a browser client, and a couple of mobile platforms -- socket.io is great for the server->browser websocket or comet case, but for the mobile case investigating the proper library (or hand rolling a compatible WS/comet implementation) is needed.

The step towards standardization will make this type of cross "platform" compatibility easier in the long run.

Re: WebSockets RFC is now official

#22

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

I have had a lot of success with Tornado ... http://www.tornadoweb.org/documentation/websocket.html

Re: WebSockets RFC is now official

#23

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

https://github.com/oberstet/Autobahn is another option

Re: WebSockets RFC is now official

#24

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

https://github.com/MostAwesomeDude/txWS

Twisted gives you the foundation for pretty amazing things to start with, and txWS does a good job of adding WebSockets.

Re: WebSockets RFC is now official

#25

Earlier quoted context omitted.

Oh boy. Pretty soon we will need UDP sockets in the browser.

WS is already kind of fire-and-forget. Socket.IO supports that, and can handle thousands of messages/second, I don't think that will be needed.

Except, it's implemented on top of TCP. So you still have the head-of-line blocking problem. In a real-time application like games, if some congestion causes a few packets to be dropped, you don't care about them any more (assuming your protocol gives absolute positions of everyone involved); but in TCP, they will be retransmitted, and later packets queued until it can catch up. As websockets are based on TCP, you can't avoid this. Even if you have a "fire and forget" message based layer built on top of TCP, the head-of-line blocking will still kill your performance, causing people with bad connections to get persistent lag rather than a few dropped frames.

Re: WebSockets RFC is now official

#26
post #6

I look forward to pushing this to the absolute limit. Chat? Can we do something cool with voice? What about websites-as-desktop-software that started when Ajax got cool, but paused when developers ran into the limits of Ajax? How far can that now go? GPS services?

You'll probably want to wait until webrtc to do cool things with voice.

Re: WebSockets RFC is now official

#27
post #25

Earlier quoted context omitted.

WS is already kind of fire-and-forget. Socket.IO supports that, and can handle thousands of messages/second, I don't think that will be needed.

Except, it's implemented on top of TCP. So you still have the head-of-line blocking problem. In a real-time application like games, if some congestion causes a few packets to be dropped, you don't care about them any more (assuming your protocol gives absolute positions of everyone involved); but in TCP, they will be retransmitted, and later packets queued until it can catch up. As websockets are based on TCP, you ca…

That's true, but in practice networked games built on websockets are doing fine right now, and will until browsers get stable capabilities for more intensive 3D gaming (likely in around 2 years time). I guess I meant they won't be needed yet.

Re: WebSockets RFC is now official

#28

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

If you're interested in a easy-to-use hosted solution, you could try Pusher ( http://pusher.com ). It would be the fastest way to get up and running and you wouldn't have to worry about the details.

Disclaimer: I work for Pusher.

Re: WebSockets RFC is now official

#29

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

https://github.com/MostAwesomeDude/txWS Twisted gives you the foundation for pretty amazing things to start with, and txWS does a good job of adding WebSockets.

txWS is the best twisted-based framework for websocket: it does not assume that you want to combine it with a web server, and allows you to wrap your existing protocols into websocket

Re: WebSockets RFC is now official

#30
post #23

What's the best option for using websockets with Python? WSGI doesn't support it ( http://librelist.com/browser//flask/2010/9/1/flask-and-webso... ). gevent is an option ( http://blog.pythonisito.com/2011/07/gevent-zeromq-websockets... ), but would something like Mongrel2 be better ( http://mongrel2.org/ )? UPDATE: There's also Juggernaut ( http://flask.pocoo.org/snippets/80/ ), which uses node.js under the hood.

https://github.com/oberstet/Autobahn is another option

AutoBahn is an absolutely top notch implementation of WebSockets for twisted. It's probably one of the most complete and robust implementations on any platform, and their test suite is currently the gold standard against which other implementors test their own implementations.
Post reply on HN