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?

Edward Harned

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.

There was a lively discussion on load balancing in the Jini forum at http://www.jini.org/ in Sept/Oct 2000. What several people suggested was to set up a front end RMI Server that kept track of how many requests were allocated to each "work" RMI Server and pass the request along to one of those "work" Servers.  A huge overhead problem in the client calling the router that calls the work server that returns to the router that returns to the client. Since you indicated a high volume of client requests, this may not be a feasible 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.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact