This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread Usage in Remote Method Invocations

 
Hung Sam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
This forum has been very useful. I have been able to solve many problems by reading other people's posts.
And I am having another question regarding to RMI and Thread. Any help would be very much appreciated.

The RMI Specifications say:
"A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads."

my question is
Should i assume that concurrent requests from clients are handled by RMI (which, accoring to some articles, is not scalable)?

OR

Should i implement a RMI server that places all requests from clients to a queue, then have a group of Threads that process these requests and send the results back to the clients.

Any suggestions from Java Experts out there

msam
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you need to go to that level of complexity, just simple calls to RMI, and don't assume that the next call will occur in the same thread.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic