I have a program that registers an RPC function, ex. com.myapp.foo. I then run this program on several independent devices, all connected to the same router.
When I start up the second device, it gets an error, because the RPC function has already been registered (wamp.error.procedure_already_exists
).
This makes sense, since the router needs a unique name in order to route procedure calls properly. But in my case,
My first thought was that each device should generate a unique procedure name (com.myapp.device4.foo).
- But, then how does a program generate a unique name (is there something more sophisticated than looping until a unique name was found)?
- Also, more importantly, how would a caller discover the name of the procedure that is associated with a particular node? For example, a caller will want to find all devices that are up, and then call com.myapp.foo on each of them.
I'm working in python/asyncio and javascript, both using autobahn on the crossbar.io server.