Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

It takes too long to invoke RMI server for the first time around but less time thereafter...why?

 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

I have a RMI server running on a Windows box and the client running on a Linux box. The two communicate via the Internet. My problem is that when I
invoke the server from the client for the first time it can take up to 62 seconds for the server to receive the call. I know this because I watch the console and I can tell
exactly when the server receives the call from the client. Subsequent calls take about 6 seconds to reach the server thereafter, which is aceptable.

Why is this happening? Could it be a DNS lookup issue or a process in the RMI system downloading files over the network? I doubt if the problem is related
to client downloading files since the files are tiny anyway. So what could it be?

Thanks for your help in advance.
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ernest,

DNS requests can indeed be a reason for high latency in networks but over 1 minute would mean that the DNS server is really, really slow. I guess there must be another reason.

Class file downloading could be a problem, too. This depends of course on the number and size of classes and the connection speed between client and server. But in general the class files aren't that big and should be no real problem. The easiest way would be to put all up to date classes into the client and server code in order to prevent remote class loading for testing purposes.

If this doesn't help then you should probably use a sniffer (like Wireshark) so you can simply monitor what's going on. Then you will definitely see if there's just too much traffic for your internet connection or if the client/server is waiting for something.

Hope this helps ;-)

Marco
 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marco for taking your time to help. I will explore the suggestions which you have raised.

Kind regards,
Ernest
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!