You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In a multi-server scenario with a message queue such as redis or rabittmq, it is important to be able to send messages between servers.
That is why socket.io 4.1 introduced the serverSideEmit function: dzad/socket.io@491a9a0. This seems to be missing from python-socketio though.
Ideally, parameters like room or to can limit the servers the message is sent to.
Describe the solution you'd like
A sio.server_side_emit(..., to=..., room=...) function and self.server_side_emit(..., to=..., room=...) method to do inter-server communication.
Describe alternatives you've considered
adding clients between servers manually. This is not really feasible with dynamically scaled servers.
configuring the client manager manually. This seems not feasible either.
Additional context
# server Aawaitsio.server_side_emit("hello", "world", room="test")
# server B@sio.on("hello")asyncdefserver_notifications(sid, message):
print(message) # should print "world" if server is in room "test"
The text was updated successfully, but these errors were encountered:
This is not a top priority for me at this time, but I would be open to add this if someone contributes it.
But, I do not quite follow some of your requests:
Ideally, parameters like room or to can limit the servers the message is sent to.
What does it mean to send a server side emit to a room? If there are clients in that room, do they get the message? How do you add a server to a room? What do you pass in the to argument to reference a specific server? I don't see what is the point of this, or what problem does it solve.
Is your feature request related to a problem? Please describe.
In a multi-server scenario with a message queue such as redis or rabittmq, it is important to be able to send messages between servers.
That is why socket.io 4.1 introduced the
serverSideEmit
function: dzad/socket.io@491a9a0. This seems to be missing from python-socketio though.Ideally, parameters like
room
orto
can limit the servers the message is sent to.Describe the solution you'd like
A
sio.server_side_emit(..., to=..., room=...)
function andself.server_side_emit(..., to=..., room=...)
method to do inter-server communication.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: