Philippe Paré Philippe Paré - 1 year ago 135
C# Question

Multi client RPC

I have a router, a server and multiple clients. The server registers methods in the router, and the clients successfully call the methods and get the result. In some cases, I need the server to ask a specific client something. I already have the

, but I have no idea how the clients need to register their methods, nor do I know how to call them from the server.

I looked in the documentation, but had no luck. Does wamp-proto actually support such a thing? If so, got any pointers?

Answer Source

If I understand correctly, you want multiple clients to register the same procedure, and then call specific ones among them.

This is not possible with WAMP using the same URI for the procedure.

For what you want to do, the intended way is to use URIs which contain a client ID, e.g. if your procedure is "com.example.calculate_load", clients would register "com.example.client_1.calculate_load" (or "com.example.calculate_load.client_1"), and you'd address the clients via the procedure URI.

It is possible for multiple clients to register the same procedure under the same URI, but this is intended for scaling out procedures or for having hot stand-bys. The router decides which client to call, based on a common strategy under which the clients registered (e.g. round-robin). See

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download