PY4WEB socketIO

46 views
Skip to first unread message

António Ramos

unread,
Feb 17, 2020, 1:31:39 PM2/17/20
to web...@googlegroups.com
hello , just asking if py4web will have the ability like flask to have a socket  as simple as ...
Regards
@socketio.on('my event')
def handle_my_custom_event(arg1, arg2, arg3):
    print('received args: ' + arg1 + arg2 + arg3)

António Ramos

unread,
Feb 17, 2020, 1:34:01 PM2/17/20
to web...@googlegroups.com

Massimo Di Pierro

unread,
Feb 17, 2020, 10:45:27 PM2/17/20
to web2py-users
It would be trivial to implement it like flask does. 

You can do it right now using the bottlepy way:
or
py4web uses bottle under the hood.

The problem is that I would like something better than that.
I am not convinced it would work well in a cloud setting o when you have servers behind a load balancer.

Imagine you have two chat clients connected to two servers. If your client posts a chat message, how does one server notify the other server to notify the other client? This is the hard problem to solve. I am not interests in toy examples. py4web will have this.

Massimo

António Ramos

unread,
Feb 18, 2020, 4:44:20 AM2/18/20
to web...@googlegroups.com
I was not expecting less than that from Massimo :)

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/dc01a0c6-dd54-4cab-a3c6-6073f95cd19d%40googlegroups.com.

Vicente Orru

unread,
Feb 18, 2020, 10:57:01 AM2/18/20
to web...@googlegroups.com
Massimo, maybe zeroMQ can be good for you.

Reply all
Reply to author
Forward
0 new messages