How can I have multiple clients remotely access multiple instances of a particular remote server? Apparently, RMI only allows for Point-to-Point communications between a client and a Remote server. I have a need for multiple instances of that Remote server to handle high volumes of client requests. Is there a way to utilize the RMI frameworks to accomplish this task?
There is no such thing as multiple instances of a particular remote server. If you want the same code instantiated as separate JVM's then you must give the code, ( Naming.rebind("name1", object) ) different names.
Now the problem is which remote server should the client call to balance the load. For this there is no easy solution.
The RMI and JNDI Registries are not the only places one may keep the reference to a remote object. You can serialize the reference and store it in your own, private "registry." How you get access to this private registry may involve native code for each operating system, (this is how the RMI and JNDI Registries work.)
Load balancing has been the subject of many books and articles since multiprogramming first appeared.