Jeremy Nix wrote:
We have an instance where tomcat instance (A) is communicating with tomcat instance (B), where instance (B) is located at another site. Instance (A) formulates a request to instance (B) and instance (B) responds with some valid response. Now, my question is, from a standpoint of instance (B), is it possible to measure latency? If so, how?
In order to measure latency between two systems (regardless of the application performing the measurement), you first need a way to synchronise the clocks at both sites. In most cases this brings a certain amount of tolerance you can't overcome. (For instance, synchronizing with an internet time server imposes a tolerance of a few miliseconds du to network packet delays).
Since you will only get accurate readings from withing the application (i.e. tomcat) you will then have to make sure that both OS'es system clocks are equally accurate. (For example System.currentTimeMillis() has a range of up to 50ms on Windows9x systems).
That said is it simple to write a small servlet that runs on A and makes a request to B including it's current time. A servlet on B then echos that request back to A and adds it's current time as well. Finally the servlet on A generates some kind of user output containing the measured runtimes.
HTH
Phil
-- And on the seventh day, He exited from append mode. (Book of create(2), line 255)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
