Hi!
I just built a RMI Server and Client. It works very good on a single
machine.
Now i would like to run the server and 2 clients on differet machines.
This works too.
But after Client 1 has calld a remote Method, it seems that client2
need to reconnect to the server. The result is a bad perfomance. For me
it is not ok, to wait 5 to 8 seconds before i get a return from the
remote method.
The remote method returns me only an ID not more or less.
Do you have any hints for me??
Thanks
Tokka aka Claus-Martin
Excuse me for my bad english ;(
Wil Hadden - 06 Dec 2005 14:06 GMT
Are you using RMI callbacks, ala
http://www.javaworld.com/javaworld/jw-05-1999/jw-05-javaqa.html#4 ?
If so then you may want to stick some kind of profiler on client2 to see
where the overhead is, or can you try sending the serialised data from
client2 to a flat file, just to see exactly what is being sent as you may
find you are sending a huge chunk of data.
Wil
> Hi!
>
[quoted text clipped - 16 lines]
>
> Excuse me for my bad english ;(
Roedy Green - 06 Dec 2005 20:48 GMT
>But after Client 1 has calld a remote Method, it seems that client2
>need to reconnect to the server. The result is a bad perfomance. For me
>it is not ok, to wait 5 to 8 seconds before i get a return from the
>remote method.
get a packet sniffer and have a look what is happening. Are machines
just waiting or transmitting great hunks of data?
http://mindprod.com/jgloss/sniffer.html
Also try putting all three machines on the same LAN to rule out router
problems and slow Internet connections.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
E.J. Pitt - 11 Dec 2005 08:28 GMT
> Do you have any hints for me??
This is almost certainly a slow/misconfigured DNS issue rather than RMI.
Try pinging the server host from the client host and see how long that
takes.