Overloading RMI thread pool

Overloading RMI thread pool

Post by robertbrow » Mon, 04 Aug 2003 03:58:10


RMI creates a thread for every client call which does not scale at
all. Is there any way to substitute your own thread pool instead of
RMI default thread management? I know this wasn't possible in JDK 1.2
does anybody know if it's possible under 1.4?

If not, what are some ways that you have gotten around this problem?
WebLogic for example uses its own implementation with non-blocking io,
thread pool etc. But what if you want to develop an enterprise quality
app with J2SE? Are there any options out there for dealing with RMI
ineffecient thread management?

Any pointers greatly appreciated,

- robert
 
 
 

Overloading RMI thread pool

Post by EJP » Tue, 05 Aug 2003 16:09:33


Not quite: RMI creates a thread for every client *connection*, and
clients can re-use connections within a controllable expiry period. This
still doesn't scale well but it's not as bad as a thread per call. I
believe that JDK 1.5 is planned to use NIO for RMI, but don't quote me;
also you should have a look at the Jini Davis project, which has an
alternate implementation of JRMP as well as an entire new RMI protocol.
I believe there are plans to use NIO in one or both of these too, but
again don't quote me. With Davis you would have to comply with the Jini
licence as well as the Java licence.

EJP