Has anyone successfully worked out how to call an RPC from within an RPC handler?
Even if nobody has a solution, I’ll take shots in the dark/random ideas.
For reference, this person had asked a similar question: https://groups.google.com/d/msg/autobahnws/Zwoue4pT1js/_NNUgT8loOwJ
I have a client that provides an RPC. When that RPC invoked, the handler may need to call an RPC on another client to get additional information. However, when I attempt to get the result from the nested RPC, the process deadlocks.
As far as I can tell, and I’m still a little hazy on Boost’s I/O service, the reason for this is that the I/O service is attempting to dispatch the handler, which is currently blocked by the attempt to get the result from the nested call, and never actually executes the nested call because it’s been queued up to run after the handler from which it was invoked.
I’ve tried using multiple threads executing the same IO service, but the process still locks when I attempt to get the nested result. I suppose the easy way to get around this is to create a separate WAMP client (with separate I/O service) just for the nested request. This is undesirable for this particular project, so I’m looking for other ideas until I’m told this isn’t possible.
If it helps, the workflow I’m going for is something like this: