Hi.
I'm about to start work on a project in which we're thinking of using RMI. It involves having several thousand clients connecting to the server at the same time.
What are people's experiences with projects using RMI of this scale and larger? Any scalability issues? Anything I should keep in mind?
Thanks in advance
-
RMI Scalability (3 messages)
- Posted by: Jigar Gosar
- Posted on: March 03 2005 07:35 EST
Threaded Messages (3)
- RMI Scalability by Jeetendra Dassani on March 04 2005 16:38 EST
- RMI Scalability by prasun kumar on March 07 2005 23:47 EST
- RMI Scalability by Jose Ramon Huerga Ayuso on April 06 2005 15:53 EDT
-
RMI Scalability[ Go to top ]
- Posted by: Jeetendra Dassani
- Posted on: March 04 2005 16:38 EST
- in response to Jigar Gosar
As a starting point http://www.javaperformancetuning.com/tips/j2ee_rmi.shtml might help. -
RMI Scalability[ Go to top ]
- Posted by: prasun kumar
- Posted on: March 07 2005 23:47 EST
- in response to Jigar Gosar
RMI uses a scoket pool underneath to route the call through the stub. The sockets are returned to the pool only after the completion of the remote method call. So any concurrent method call would require a new socket connection to be made. This means that if there are too many calls trying to be made on the same remote object at the same time, this would result in that many socket connection being seeked. This would result in a SocketException as the Accept queue of the server socket would become full.We experienced a similar problem when there were around 100 threads simultaneously making calls on a remote object.
Thanks,
Prasun -
RMI Scalability[ Go to top ]
- Posted by: Jose Ramon Huerga Ayuso
- Posted on: April 06 2005 15:53 EDT
- in response to Jigar Gosar
Hi.I'm about to start work on a project in which we're thinking of using RMI. It involves having several thousand clients connecting to the server at the same time.What are people's experiences with projects using RMI of this scale and larger? Any scalability issues? Anything I should keep in mind?Thanks in advance
You must consider - at least - two things:
1) The amount of information passed as an argument via RMI. This information must be serialized and deserialized, and this is expensive, specially for the garbage collector.
2) The max amount of sockets in the machine. Also, you must check the parameter of the operating system that decides how long a closed socket remains in CLOSE_WAIT state. The sooner they get closer, the more RMI calls you can perform until you run out of sockets.
Jose Ramon Huerga
http://www.terra.es/personal/jrhuerga