Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

my RMI server is sloooooooow.

 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It takes a while for my app to open when using the rmi server. Probably a minute or two. Are there any general guidelines for speeding up rmi? Or are there any common mistakes that slow it down?
 
R Bischof
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem (JDK1.3 on Win2k) when using the external command "rmiregistry" to start the registry. Now I use the following command inside my RMIServer programm and the connection is really fast (subsecond):
java.rmi.registry.LocateRegistry.createRegistry(serverPort);
rainer
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I implemented this and it functions properly, but it still takes a long time for my gui to appear.
Even though it didn't improve the speed, it's one less manual step required to start the server. Thanks.
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the exact same problem with mine. Of course, in local mode it's in, but I have 2 computers networked and when I run
the client on one and the server on the other it's as you have said. I have a cable modem connection to the internet, so I would think it would be better, but both computers are going
through the same modem, so perhaps that is why it is so slow. I THINK when I run it on the same computer in different VMs then it's not a problem, although I need to check this, I might have had my classpath set to both key directories which would help speed significantly...
With Respect,
Matt
 
vin miller
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm connecting through a lan - which should be even faster. It's also slow running it on the same pc as the client.
I've isolated the client call to Naming.lookup to be the time hog.
I'll have to do some reasearch on this..
 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also having a problem. I have two computers. When I try running the server on computer 1 and the client on computer 2 it varies, but often it takes minutes for the naming.lookup to connect. I adjusted the hosts file so that the resolution is a little bit faster. But it still is very inconsistent. I am pretty sure this is a networking issue rather than a programming issue so I am not terribly concerned about it, but I am sure like many others out there that it would drive them nuts!
Any suggestions would be greatly appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic