How can I scale an RMI server? For example, how can I spread workload of RMI server between several server hosts?

Edward Harned

What you are looking for is called Load Balancing.  Most developers use an intermediate RMI Server, a Router.

The Router contains the logic to determine which Server should process the request from a client.  There are two basic scenarios:

  1. The client contacts the Router and the Router returns the RemoteObject for the Server,(pass back).
  2. The client contacts the Router and the Router passes the request to the Server, (pass through).

Some, (there are many), issues for each of these are:

Pass Back:

This resembles the Internet where every "www" request must go to a common service that passes back the IP address.

Clients may only use the Server RemoteObject one time since it may not be best able to handle the next request.

Pass Through:

The object the clients pass to the Server must go through the Router.  This involves deserializing  the object in the Router and re-serializing the object in the Router to pass on to the Server.

The object the Server returns to the client must go through the Router.  This involves deserializing  the object in the Router and re-serializing the object in the Router to return to the client

Both these scenarios require extensive analysis and design way, way beyond what we can provide here.

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

 

 

 

 

 


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

 

 

About | Sitemap | Contact