I'd like to solicit some feedback/learned opinion based on your
experience in the following scenario.
Although our application is not time 'critical' we have some
We are using JDK 1.5_10, JBoss 4.0.5 and EJB (very thin layer!) with
communication from a rich client.
The application seems to suffer from some latency issues when called
between say, London and New York.
That is to be expected but it is not proportional and puzzles us a
e.g. we have a very very simple EJB that simply does:
byte getPayload(int size);
for an array 1,000 bytes, we have a time measured on the client of:
- same machine 6 ms
- same subnet 33 ms
- across VPN to New York ~300 ms
The times are nearly identical for 1 byte and seem very similar for up
Now a simple PING from DOS command line to NY takes 85~100 ms which,
we are told, is pretty good.
Our current thoughts:
- We were initially using HTTPS (256) for all communications but
reverting to JRMP does NOT seem to improve at all. This surprised us
quite a bit...
- if encryption was the issue, the local or same subnet test should
also show large delays
- is this in line with your own experience of RMI call to JBoss across
- How many 'roundtrips' are required by the JRMP protocol for a
single call to the server?
- Any suggestion to speed things up in the current architecture? e.g.
is IIOP faster? or requires less round-trips?
You need to test for yourself. A simple thing to do is to use different invokers to access the same EJB and measure the time:
- classic rmi invoker
- pooled invoker
- iiop invoker
- http invoker
My guess would be that the pooled and iiop invokers would be a bit faster because they can keep the TCP connection open between calls.