3 ms·
Reading all the comments here makes me wonder — Can Python (say, Flask) not be used for real-time communication (SocketIO, etc..) ? What is the difference betwe
by arsalanb 11y ago
Reading all the comments here makes me wonder — Can Python (say, Flask) not be used for real-time communication (SocketIO, etc..) ? What is the difference between that and node.js ?
I am still figuring out a lot of things about Python, and this is something I found very intriguing. What would the differences between an IM app written in Python using Flask and it's nodeJS clone be, to a user?
- ph0o 11y agogood question!
- deleted 11y ago[deleted]
- rithi 11y agoIt could be [1]. IMO, it sounds more like something slapped on top of Flask. You will find similar packages for Django, Pyramid and so on. Tornado feels natural in this sense as it aims to be asynchronous right off the bat. See also, aiohttp [2] which seems very promising (Python 3.3+). As an aside, I've never seriously considered Python 3 till now after taking a look at aiohttp. [1] https://flask-socketio.readthedocs.org/en/latest/ https://flask-socketio.readthedocs.org/en/latest/ [2] http://aiohttp.readthedocs.org/en/stable/web.html http://aiohttp.readthedocs.org/en/stable/web.html
- fleitz 11y agoYes python can, no flask can't. https://github.com/eventmachine/eventmachine/wiki/EM-vs-Twisted https://github.com/eventmachine/eventmachine/wiki/EM-vs-Twis... http://community.eveonline.com/news/dev-blogs/stackless-python-2.7/ http://community.eveonline.com/news/dev-blogs/stackless-pyth... Node.js is one of the few webservers built ground up async.