Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

taking a long time to send an object in rmi??

Thread view: 
Elhanan - 09 Apr 2006 14:01 GMT
hi..
i tried to create a rmi server sample and a client, problem is if i try
to send an object (even one with no fields or nothing just a dummy) it
takes the server 60-80 seconds just to recieve it!! (this is between 2
computers).
Remon van Vliet - 10 Apr 2006 11:28 GMT
> hi..
> i tried to create a rmi server sample and a client, problem is if i try
> to send an object (even one with no fields or nothing just a dummy) it
> takes the server 60-80 seconds just to recieve it!! (this is between 2
> computers).

That's way too long, you probably forget to flush your stream or otherwise
made a mistake within your IO code. How about you post the relevant bits of
your code so we can have a look?
Elhanan - 10 Apr 2006 17:59 GMT
i didn't flush anything, all i have is a method that simply accepts and
object and stores in a members.
and on the client i have somethign that sends a new object
this only happens with new objects btw, let's say for example i created
a new object and send it to the remote object, if i send the same
object again, i won't get a laaag.

but i created this becluse i have a closed java application which has
the same issues and i wanted to pin point where is the problem, on
another network, this takes around 200ms, but on this network it takes
such a long a time.

would you happen to know what in a network could cause this? (intranet
same building ).
Oliver Wong - 10 Apr 2006 22:43 GMT
>i didn't flush anything.

   Maybe that's your problem. You should be flushing after you finished
sending whatever it is you're trying to send.

   - Oliver
EJP - 11 Apr 2006 02:26 GMT
>> i didn't flush anything.
>
>    Maybe that's your problem. You should be flushing after you finished
> sending whatever it is you're trying to send.

Err, no, this is RMI, there are no flushes, there are just remote method
calls.

Most RMI performance problems are in reality DNS problems. Check how
long it takes to ping the server host from the client.
Elhanan - 11 Apr 2006 07:48 GMT
but what if i use a actual ips? even then i get the same slowness
Thomas Weidenfeller - 11 Apr 2006 08:04 GMT
> but what if i use a actual ips? even then i get the same slowness

Get a network sniffer an check what is really going on.

/Thomas
Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/

Gordon Beaton - 11 Apr 2006 08:06 GMT
> but what if i use a actual ips? even then i get the same slowness

Stop guessing and download Ethereal. Use it to see what is really
happening on the network while your call is taking time.

/gordon

Signature

[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e

EJP - 12 Apr 2006 01:25 GMT
> but what if i use a actual ips? even then i get the same slowness

RMI (or something lower in the Java stack) does a reverse lookup on an
IP address so DNS is still involved.
Roedy Green - 12 Apr 2006 02:48 GMT
>i tried to create a rmi server sample and a client, problem is if i try
>to send an object (even one with no fields or nothing just a dummy) it
>takes the server 60-80 seconds just to recieve it!! (this is between 2
>computers).

In windows, you can set up some name:ip pairs in the hosts. file.
Presumably other OS have a similar mechanism for setting up high speed
DNS lookup on a few names.

see http://mindprod.com/jgloss/hosts.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Martin Gregorie - 12 Apr 2006 18:56 GMT
> In windows, you can set up some name:ip pairs in the hosts. file.
> Presumably other OS have a similar mechanism for setting up high speed
> DNS lookup on a few names.

In and *nix you can do exactly the same in /etc/hosts

You can also run a local copy of named, the DNS server, which can be
configured to caches non-local name:IP pairs. This is the best solution
because it automatically tracks IP changes.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.