Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > RMI with high load

Reply
Thread Tools

RMI with high load

 
 
Raymond DeCampo
Guest
Posts: n/a
 
      05-10-2004
Hello,

I am in the early stages of fleshing out an interface between two
existing products. One possible solution involves RMI. However, part
of the team has some concerns with RMI, specifically when under a high load.

First, there seems to be a concern that if every client is connected to
the same RMI server, that the clients will be processed in sequence. I
would expect them to be processed in parallel up to a point. E.g.,
using a thread pool or some such device. In other words, I would expect
that an RMI server would act much like a web server and that this
behavior would be essentially free, i.e., provided by the RMI subsystem.

Second, a proposed solution to this issue is to create an RMI server for
each client. This seems like a radical and wasteful solution to me.

I would appreciate if someone could guide me to some good sources on the
above issues, or provide some "war stories" of your own experiences. I
have no professional experience with RMI (if you discount EJBs), only
academic experience.

Thanks,
Ray
 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      05-11-2004
Raymond DeCampo wrote:
> I am in the early stages of fleshing out an interface between two
> existing products. One possible solution involves RMI. However, part
> of the team has some concerns with RMI, specifically when under a high
> load.


Measure it. Build a simple prototype which generates load. Measure the
responses in your environment.

> First, there seems to be a concern that if every client is connected to
> the same RMI server, that the clients will be processed in sequence. I
> would expect them to be processed in parallel up to a point.


Don't expect anything. Read the documentation of the software you want
to use, and run your own tests. Get facts. Discussions about what might
happen are good for wasting a few minutes at the water cooler, but don't
allow you to make an informed decision.

> I would appreciate if someone could guide me to some good sources on the
> above issues, or provide some "war stories" of your own experiences.


I haven't done much RMI, but CORBA. There are typical problems when you
start to use distributed objects. You might want to check:

Douglas Schmidt, Michael Stal, Hans Rohnert, Frank Buschmann:
"Pattern-Oriented Software Architecture, Volume 2, Patterns for
Concurrent and Networked Objects".

Also check out Doug Schmidt's home page. He has written some 200 or so
publications about distributed objects.

/Thomas
 
Reply With Quote
 
 
 
 
Raymond DeCampo
Guest
Posts: n/a
 
      05-11-2004
Thomas Weidenfeller wrote:
> Raymond DeCampo wrote:
>
>> I am in the early stages of fleshing out an interface between two
>> existing products. One possible solution involves RMI. However, part
>> of the team has some concerns with RMI, specifically when under a high
>> load.

>
>
> Measure it. Build a simple prototype which generates load. Measure the
> responses in your environment.
>


See below.

>> First, there seems to be a concern that if every client is connected
>> to the same RMI server, that the clients will be processed in
>> sequence. I would expect them to be processed in parallel up to a point.

>
>
> Don't expect anything. Read the documentation of the software you want
> to use, and run your own tests. Get facts. Discussions about what might
> happen are good for wasting a few minutes at the water cooler, but don't
> allow you to make an informed decision.
>


We haven't identified which software we will use. Even if we did at
this point, it will likely change. I do not want to base the
fundamental design of the interface on the behavior of one RMI
implementation.

I would prefer to know and understand what is guaranteed by the RMI
subsystem. Then I can design my system based on these guarantees. Then
I can choose an RMI provider based on their adherence to these
specifications and the target platform.

Thanks,
Ray
 
Reply With Quote
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      05-12-2004
Raymond DeCampo wrote:
> I would prefer to know and understand what is guaranteed by the RMI
> subsystem.


Then you have to do the most obvious thing: Read the specs. Available at

http://java.sun.com/j2se/1.4.2/docs/guide/rmi/

Good luck,

/Thomas
 
Reply With Quote
 
Esmond Pitt
Guest
Posts: n/a
 
      05-14-2004
Raymond

This is nothing but FUD. A single-threaded RMI implementation would be
completely useless. I have never encountered one in seven years. Sun's
is multi-threaded with a new thread per new connection, IBM's is
multi-threaded with a thread pool. The specification says that no
assumptions can be made about particular client requests being
despatched in particular server threads. This trivially means that you
can't assume there is only one thread! and in fact you have to allow for
possible remote calls executing in parallel when writing your server,
i.e. take care of any synchronization required yourself.

Esmond Pitt
author 'java.rmi' http://www.rmiproxy.com/javarmi

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java native with RMI - cannot load the library Krystian Java 0 11-30-2006 08:30 AM
Why does java.rmi.Naming not implement interface java.rmi.Registry? Jan Schulze Java 1 03-26-2005 07:45 AM
RMI Vs RMI over IIOP JScoobyCed Java 1 01-28-2005 09:54 AM
Unable to load RMI with external classes Ian Java 1 12-21-2004 02:41 AM
RMI, JINI or RMI/IIOP Buu Nguyen Java 1 08-25-2004 11:28 AM



Advertisments