Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Decrease time out period if server is not registered in the rmiregistery

Reply
Thread Tools

Decrease time out period if server is not registered in the rmiregistery

 
 
ashwin.dasanahalli@gmail.com
Guest
Posts: n/a
 
      03-21-2007
I have written a tiny RMI client. Before I bind to the RMI server, I'm
doing a Naming.lookup to check if the server is registered. It is
taking too much time to throw an exception if the server is not
registered in the rmiregistery. Is there any way I can decrease this
time???

Any help will be appreciated..........

Thanks
Ashwin

 
Reply With Quote
 
 
 
 
Esmond Pitt
Guest
Posts: n/a
 
      03-22-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> I have written a tiny RMI client. Before I bind to the RMI server, I'm
> doing a Naming.lookup to check if the server is registered. It is
> taking too much time to throw an exception if the server is not
> registered in the rmiregistery. Is there any way I can decrease this
> time???


How much time is too much? It should take less than a second if the
registry is running.
 
Reply With Quote
 
 
 
 
ashwin.dasanahalli@gmail.com
Guest
Posts: n/a
 
      03-22-2007
On Mar 22, 5:27 am, Esmond Pitt <(E-Mail Removed)>
wrote:
> (E-Mail Removed) wrote:
> > I have written a tiny RMI client. Before I bind to the RMI server, I'm
> > doing a Naming.lookup to check if the server is registered. It is
> > taking too much time to throw an exception if the server is not
> > registered in the rmiregistery. Is there any way I can decrease this
> > time???

>
> How much time is too much? It should take less than a second if the
> registry is running.


Thanx for a quick reply.
I have an up and running registry. Lets say, the server fails to
register itself with the rmiregistery. Now when the client tries to
lookup this server in the registry, it will fail. The amount of time
Naming.lookup is taking to throw an exception is approx 2mins. My
concern is to reduce this time. Is there a way to do it?

 
Reply With Quote
 
Esmond Pitt
Guest
Posts: n/a
 
      03-22-2007
(E-Mail Removed) wrote:
> On Mar 22, 5:27 am, Esmond Pitt <(E-Mail Removed)>
> wrote:
>
>>(E-Mail Removed) wrote:
>>
>>>I have written a tiny RMI client. Before I bind to the RMI server, I'm
>>>doing a Naming.lookup to check if the server is registered. It is
>>>taking too much time to throw an exception if the server is not
>>>registered in the rmiregistery. Is there any way I can decrease this
>>>time???

>>
>>How much time is too much? It should take less than a second if the
>>registry is running.

>
>
> Thanx for a quick reply.
> I have an up and running registry. Lets say, the server fails to
> register itself with the rmiregistery. Now when the client tries to
> lookup this server in the registry, it will fail. The amount of time
> Naming.lookup is taking to throw an exception is approx 2mins. My
> concern is to reduce this time. Is there a way to do it?


How much time does it take if the lookup is successful?

RMI delays of this order are almost always due to incorrect DNS
configuration, not RMI itself.
 
Reply With Quote
 
steve
Guest
Posts: n/a
 
      03-23-2007
On Wed, 21 Mar 2007 15:24:59 +0800, (E-Mail Removed) wrote
(in article <(E-Mail Removed) .com>):

> I have written a tiny RMI client. Before I bind to the RMI server, I'm
> doing a Naming.lookup to check if the server is registered. It is
> taking too much time to throw an exception if the server is not
> registered in the rmiregistery. Is there any way I can decrease this
> time???
>
> Any help will be appreciated..........
>
> Thanks
> Ashwin
>

we did an analysis of this problem about a year ago, in the java group. it
is a problem with various windows platforms and the implementation of the
look-up, if the ip port does not respond.

Even setting a time-out value on a port you open will not circumvent the
problem.

as i say It was worse on windows, and non-existent on OSX, but recently even
that platform is ignoring the time out values, so that if it is set for 5
seconds , it can still take like 30!!!

AHHHH you lucky guy, I still have the notes from another java group.
here we found 4 seconds on an internal network.


/* bug found on windows!!
Output for this always is something like
< ----------------------------------------------------------------
4802
282
281
282
266
282
281
282
281
282
282
4771
problem found: the JVM is running on Windows XP with netbios over
TCP/IP activated. On connect() the JVM tries to resolve the hostname
(java.net.InetAddress.getHostFromNameService, getHostByAddr).

Windows tries a netbios ns query on udp port 137 with a timeout of
1500ms, ignores any ICMP "port unreachable" packages and repeats this
two more times, adding up to a value of 4.5 seconds (!).

Deactivating netbios "fixes" this, but isnīt always an option ... any
ideas very welcome.

*/




Steve








Steve






 
Reply With Quote
 
ashwin.dasanahalli@gmail.com
Guest
Posts: n/a
 
      03-27-2007
On Mar 23, 4:51 am, Esmond Pitt <(E-Mail Removed)>
wrote:
> (E-Mail Removed) wrote:
> > On Mar 22, 5:27 am, Esmond Pitt <(E-Mail Removed)>
> > wrote:

>
> >>(E-Mail Removed) wrote:

>
> >>>I have written a tiny RMI client. Before I bind to the RMI server, I'm
> >>>doing a Naming.lookup to check if the server is registered. It is
> >>>taking too much time to throw an exception if the server is not
> >>>registered in the rmiregistery. Is there any way I can decrease this
> >>>time???

>
> >>How much time is too much? It should take less than a second if the
> >>registry is running.

>
> > Thanx for a quick reply.
> > I have an up and running registry. Lets say, the server fails to
> > register itself with the rmiregistery. Now when the client tries to
> > lookup this server in the registry, it will fail. The amount of time
> > Naming.lookup is taking to throw an exception is approx 2mins. My
> > concern is to reduce this time. Is there a way to do it?

>
> How much time does it take if the lookup is successful?
>
> RMI delays of this order are almost always due to incorrect DNS
> configuration, not RMI itself.- Hide quoted text -
>
> - Show quoted text -


If the server is registerd in the rmiregistery, it takes hardly a
fraction o second to lookup and respond back with result!!!

 
Reply With Quote
 
Esmond Pitt
Guest
Posts: n/a
 
      03-28-2007
(E-Mail Removed) wrote:
> If the server is registerd in the rmiregistery, it takes hardly a
> fraction o second to lookup and respond back with result!!!


If the registry is running and the server is not registered in it, it
should take more or less exactly the same time as if the server is
registered. It just has to transmit an exception instead of a remote
stub. I've never seen it take longer in ten years of using and writing
about RMI, and I've never seen a reason in the RMI source code why it
would. Are you sure you aren't retrying or doing something else at the
application level in the NotBound case?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
router speeds slowly decrease over time ofn01 NZ Computing 3 02-10-2008 10:59 AM
VoIPCheap/Stunt/SIPDiscount/Et.al - Mobile - Top-up Expiry Period -- Campaign for Correct Expiry Period on Finarea VOIP Service Mobile Top-Ups News Reader UK VOIP 16 06-26-2006 05:03 PM
How do I decrease first page load time when there are 300 dll's on bin folder? Ravi Ambros Wallau ASP .Net 1 02-14-2006 09:06 PM
how to decrease link time baibaichen C++ 12 01-11-2006 12:47 PM
Memory leakage on win98SE server : system resouces decrease form 70% -> 0% in 24 hours No Shit ! Computer Support 5 05-09-2004 08:31 AM



Advertisments