• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
My pie came with a little toothpic holding up this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic