Echometer v1.7 Home Page

README.TXT echometer.zipRoundtrip to moriartys.com:

The problem:

Mirror sites are a common way of distributing thousands of copies of the same software, they are also used for web sites that are very popular. When a web designer includes a list of mirrors, it is usually with a suggestion to the user to click on the closest site to the users machine.

To click on a site in the same country is generally a good hint, but depending on to what networks are the user and the site conected, the information may have to be routed through another country. This situation is quite common in Europe, with competing communications companies that offer internet access, but that do not conect to other companies int the same region. Sometimes the linking point is as far away as the U.S.!

Also, to click in the geographically closest site, ignores the fact that depending on the time of the day, some servers may be very busy while others (maybe further away) may be almost unused and may responde faster.
 

The solution:

Web designers that include a list of mirrors in their pages can help the users make an informed decision by including an Echometer applet for each mirror. The applet will measure the round trip delay to the server and display the result. This information may change during the day but the best decision is always to connect to the server with the lowest round trip delay.
 
 

To include Echometer in your html pages:

Echometer v1.7 is compiled in J2SE 5.0, that means it runs in about 97% of the browsers out there. The echometer.jar file is signed by Diego Moriarty. You don't have to know anything about Java, just include something like this in your HTML page:

  <a href=http://some.site.com/page.html>Click to go to the site</a>
  <applet codebase="/echometer"
  archive="echometer.jar" code="Echometer.class" WIDTH="95" HEIGHT="16">
  <param name="url" value="http://some.site.com/page.html">
  <a href="/echometer">Echometer</a></applet>

The only pieces of information used from the "url" parameter are the protocol and the address (maybe in a future version the rest will be used). Valid protocols are http, https, ftp, telnet and gopher. The address can be a host name or an ip address. Note that http connections are often handled by proxies that respond immediately, this makes the results completely uninformative for many users.

There are three ways of using the codebase attribute:

The user may see these messages:


 

Other parameters/funtionality:

By default Echometer returns and displays the average round trip, not the result of the last measurement. By adding the parameter window you can specify that only the last N measurements be used to calculate the average. The default is all.
You can pass a further pause parameter to specify the number of milliseconds to pause between measurements. The default pause is 5000 milliseconds.
By default the measurements will be repeated for ever, if you want to restrict this to just a few measurements you can pass the parameter measurements with the number of maesurements to perform before stopping. After that (or when the user leaves the page) the applet will no longer consume any system resources.
With the type parameter you can specify the type of connection that you want echometer to use: TCP/IP, UDP or ICMP. When using UDP the port number is taken from the URL. Trying to use ICMP is mostly useless, it is not fully implemented in any current version of J2SE. The default, and the most firewall-friendly type is TCP/IP.

The value of the roundtrip is available to JavaScript through the document.echometerAppletName.getResult() function. You will have to add a name or id attribute to the applet. As an example you can check the result when you the value from Java (the average roundtrip to moriartys.com) to JavaScript: . Apart from milliseconds, the returned value can be a code (see list above). With JavaScript you can use the value to do some further processing, like saving it to a database, statistics, etc..


 

Demonstration of the signed Echometer:

In order to see a demo of Echometer connecting to many targets, you can proceed from here in two different ways:

Ok? ready? Now you can see the demo.
 

Demonstration of the unsigned Echometer:

You can forget all about certificates and permissions if you serve an unsigned Echometer applet from the same site that is the target of the Echometer, you can do this by using the unsigned-echometer.jar instead of echometer.jar. For example here is an unsigned echometer: The average roundtrip from your computer to moriartys.com is:
 

That's all!

I hope you find Echometer useful. Please use this anonymous form: , if you have any comments, possible improvements, etc...
 

Enjoy!


Done by Diego Moriarty