I’m hoping someone can confirm or point me in the right direction on how best to implement the following.
Crossbar running on system A (“Crossbar A”). System A is an IoT-type device (Crossbar running here allows direct/local WAMP connections to the device).
Crossbar running on system B (“Crossbar B”). System B is a backend server (Crossbar running here allows networked WAMP connections to multiple IoT devices).
Python app running on system A (“App A”):
Spawns a WAMP component to connect to Crossbar A (via AutobahnPython’s ApplicationRunner).
Spawns a WAMP component to connect to Crossbar B (via AutobahnPython’s ApplicationRunner).
Runs its own (non-WAMP) application processing loop to handle communication with the non-WAMP portion of system A. This (I think) is why “App A” cannot itself run as a WAMP component, because it must have its own non-WAMP processing loop.
- “App A” passes queues to the two WAMP components it spawns, so that the WAMP components can register/handle RPCs from “Crossbar A” and “Crossbar B” and pass the requests via the queues to “App A”, which translates them and passes them on to the rest of system A.
If “App A” runs as a container in or as a guest worker of Crossbar A, when it spawns the WAMP component to connect to Crossbar A, the connection never completes. I’ve tried start_reactor=True and False on the ApplicationRunner.run() method, no difference.
If “App A” runs completely outside Crossbar A, it may try to connect to Crossbar A before Crossbar A is ready to accept connections.
I think the soon-coming Crossbar reconnect/retry feature may be the solution allowing 2) to work, but I can’t help but wonder if I’m perhaps missing something obvious, or perhaps there is another easier way to do what I want?
Thanks for any light,