web2py / py4web

Other
242 stars 126 forks source link

Websocket, HTTP/2, longpolling #5

Open JusticeN opened 5 years ago

JusticeN commented 5 years ago

do you plan to add a builtin async transactions ? something like django channels ? may be web3py-channel as separate app who will be started in a different process ? i don't really know how but it will be a great feature.

some ideas:

mdipierro commented 5 years ago

The real issue is how to make this work when mutliple instances of the apps are behind a load balancer. Each of them can easily create a websocket server but how to thy communicate with each other? I have solved this problem in the past using the following architecture: Workers behind the load balancer maintain downstream connections to the clients and upstream to a "root" node. Easy to code but not too easy to deploy and maintain without containers. Also it was somewhat protocol specific. This requires more thought.