4 ms·
Are most of the Socket.IO users using node at the server side? I started using Socket.IO with python server, gevent-socketio (actually Flask-SocketIO that is b
by AhtiK 12y ago
Are most of the Socket.IO users using node at the server side?
I started using Socket.IO with python server, gevent-socketio (actually Flask-SocketIO that is based on gevent-socketio). But then the Socket.IO 1.0 came out 28 May 2014 and gevent-socketio is not yet updated. Not sure if there's any plan for it.
Another tricky part is that gevent-socketio doesn't play together with uwsgi so I had to move from uwsgi to gunicorn in order to use Socket.IO and also the latest gunicorn breaks Socket.IO support so must use gunicorn 0.16.1 instead of 0.19.1. A bit frustrating ride. But that's another story :-)
- nnain 12y agoI was planning to use socket.io with the same stack (Python, Flask) for a game development project last year. Figured that the Python ports of socket.io weren't well-maintained so I took the traditional approach with Comet(Long-polling). On another note, if you're interested in Socket.IO because of WebSockets then do know that Android 4.3 and older don't support WebSockets and so the server might need to support Long-polling anyway. It might actually introduce more lag to first check for websockets, and if unavailable, fall back to long-polling. I will wait till majority of target devices support it by default.
- ergo14 12y agoI was playing with gevent-socketio, and ended up with massive memory leaks - could be it was my mistakes in code though. But later I went with gevent + gevent-websocket (gevent-socketio also uses it), and it's been working like a charm for me.
- pygy_ 12y ago> It might actually introduce more lag to first check for websockets, and if unavailable, fall back to long-polling. Socket.IO works the other way around since v 1.0, thanks to Engine.IO. It starts with long polling and tries to upgrade to WebSocket or Flash sockets if possible.
- nnain 12y agoThat's good to know. And Socket.IO could move back to WebSocket-first approach, once the technology becomes more pervasive. It's still a task to set up Socket.IO with Python though. Don't know how nice it plays with Node.js, but I'm happy moving to Go instead.
- untog 12y agoAndroid 4.3 and older don't support WebSockets In native developmet, I presume? Because the Chrome browser can handle them fine.
- coev 12y agoYes, native. Android's webview was based on the old Android Browser until KitKat/4.4 when it switched to using Chrome to render.
- D3f0 12y agoI've been there too. You could try to use WAMP protocol wich is implemented in a project called Crossbar.IO. They provide RPC/PubSub over websockets (or whatever machanism your client side supports). They provide server and backend for not oly Python/JS, I don't know how developed are they compared to the Python one (which seems to be the one that receives more attention alongside node). It's based on Twisted, but I belive they have something with gevent(and cython) for speed.
- Spiritus 12y agohttp://aaugustin.github.io/websockets/ http://aaugustin.github.io/websockets/ might be attractive if you're on Python 3.
- ipmb 12y agoCheck out SockJS which has a properly tested/supported Python server https://github.com/mrjoes/sockjs-tornado https://github.com/mrjoes/sockjs-tornado
- AhtiK 12y agoAt one point I'm probably moving to vert.x to use SockJS server-side [1], I'm not that tied to python and would be good to decouple the whole messaging into a separate process anyway. [1] http://vertx.io/core_manual_java.html#sockjs http://vertx.io/core_manual_java.html#sockjs