Original Post
How would I implement a distributed Remote Method Invocation system?
I'm trying to create something like the following:
- Master Server to track individual "hosts".
- Hosts can communicate with other hosts on the network using a proxy-object-interface based programming style, example:
var result = remoteHost.MyMethod(5);
I've tried using RMI libraries like SuperPool and Scs, however they have a few fundamental issues:
- SCS Supports only Server --> Client or Client --> Server communication, no Client --> Client communication.
- As far as I can tell, SuperPool only supports the same, although this picture would suggest otherwise, I cannot find anything in the documentation on how to do this:

The difference would be that any component on clients can also communicate with components on other clients, as opposed to only client-->server or server-->client communication.
How would you suggest I implement this (perhaps using these existing solutions as a base), or is there some other existing solution that might work?
More Extensive Example
Here is a diagram of what I'm trying to do:

IMPORTANT NOTE: Clients do NOT connect to each other.
Process:
- Client1 connects to Server
- Client2 connects to Server
- Client1 invokes a method on Client2, without knowing if the component of Client2 exists on the Server, another Client, or itself.
The idea is the same as what SuperPool has done, except allowing the Client --> Server --> Client communication path for invoking a method on the second client.