Replies: 2 comments
-
Hi @k2ev :) Yes, this can (easily) be achieved with this package. You can have as many sockets as you'd like , but you don't actually have to have two sockets here - you can have one socket and split the roles based on topics. I don't have a specific example for you that is exactly what you're asking for- but you can look at this test which is pretty similar: |
Beta Was this translation helpful? Give feedback.
-
Hi @k2ev I think I might have been trying to solve the same problem that you describe here. In my case I have a number of backends that I would like to register with an aggregator and dump their data. flowchart LR
subgraph S3[ ]
A[Aggregator]
end
subgraph S1[Users]
X[User 1]
Y[User 2]
Z[User 3]
end
subgraph S2[Backends]
U[Backend 1]
V[Backend 2]
W[Backend 3]
end
X <-->|WebSockets| A <-->|WebSockets| U
Y <-->|WebSockets| A <-->|WebSockets| V
Z <-->|WebSockets| A <-->|WebSockets| W
style S3 fill:#FFF, stroke-width:0px
Figure 1. Diagram of the problem. My solution is given in the code below. Start off running Br Eskild
|
Beta Was this translation helpful? Give feedback.
-
I would like to set a server that can subscribe to an external websocket (ws1), receive data and then republish that data after curating to internal clients connecting to this server over websockets (ws2).
Can this be achieved using this package? And if it can be, can you please point to a simple example. I really appreciate your help,
https://stackoverflow.com/questions/72040359/python-websocket-pub-sub-with-re-publish-broadcast
Beta Was this translation helpful? Give feedback.
All reactions