Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is RMI adequate?

 
Mattias Johansson
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to create a networked application that is going to support 1000+ users and I'm wondering if RMI is adequate for this situation. I was thinking about it at first but then I read something about the threading on the RMI server side that it can create a lot of them. If RMI is not suitable for this kind of application which networking technology should I use? What is the advantage with this technology over RMI in this situation?

Thanks in advance
Mattias
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As far as i know, Sockets give you a complete control over threads.

Best of luck ...
 
Mattias Johansson
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, but in what way will sockets help me to perform better in this kind of application?
I read somewhere that when sending small amounts of data sockets wasn't a good option because of starting a new socket connection, send the data and then close the connection make a big overhead. Is it better to keep the socket open? But won't that affect the server if there is a lot of users connected to it?
[ October 24, 2007: Message edited by: Mattias Johansson ]
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Multi-Threading is the way to go then!

Best of luck ...
 
Mattias Johansson
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, but in what way should I use multi-threading? Connecting by sockets and then create a new thread per connected client? Or use RMI where threads are created automatically when you connect to the RMI server?
Is it preferred to use a thread pool together with sockets or might that slow down the performance if the clients have to wait for a long time before their requests are dealt with?
Does anyone have any good websites that talk about this topic?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic