Socket.io as for Python 2.7 + Bottle frame

I am developing my web application using Python 2.7 + Bottle . Everything is fine and python is an amazing language coming from ASP.NET. I am creating a web application that needs to use real-time client-server communication, and socket.io for node.js comes to mind.

I wanted to know how I can implement socket.io-like using Python + bottle. I read this article on a bottle , but I still can’t understand how it works - what I need to install, and how it works (code examples?).

I really need this for my next web application, but you need help understanding what I need to include in my project for it to work. I have no problems with preview codes, which are not yet stable. I am developing on the Windows platform. Thanks.

I also want to know if there is his scalar. can I use redis in the back, so all calls will be synchronized when my site is launched on several servers, so when one client sends data, all other clients connected to other servers will receive it.

+4
source share
1 answer

Perhaps websocket can help you, many modern browsers support this protocol, but bottle.py do not support it now, you can get some idea from the .websocket tornado and the answer is here

because each connection can be saved, so I assume that it can work on several servers, but I never implement it.

since the bottle is a microarchitecture, you have to do something yourself.

+1
source

Source: https://habr.com/ru/post/1441853/


All Articles