views:

50

answers:

1

Hello, we have a Java software to receive and send customer and contracts data from and to our servers. The software runs in a web browser. Sometimes our agents complain about the lag, but it is related to their network connection. It's our thought to build in some kind of network monitor to show the current network speed. My first thought was it to implement a java version of the Ping program to measure the time before the ping and after the ping. With this information I would have been able to calculate the connection speed. The problem is that Java doesn't support SOCK_RAW type sockets so I can't send ICMP packets. Due to security reasons I can not create some kind of UDP client-server-connection to use UDP sockets. The servers with our customer and contract data is not modifiable due to security reasons so you can't use any sockets at all. In my opinion there doesn't seem to be a convenient way to solve this with Java. My colleage has another approach. He thought about downloading a picture to measure the download time but this is no good solution to permanently measure the connection speed.

So are there any usable possibilities to measure the connection speed with Java (JSF,JSP) or Javascript (jquery) and embed it on a web site?

+1  A: 

To do a good measurement of the network connection, you should probably try and send as much information as possible to see how long it took. A picture would be great, but another approach might be to measure the RTT (Round trip time) to your servers to detect possible latency-related problems.

If you don't want to program it yourself and do not have the need to bundle it with your software you might use http://www.speedtest.net for example :-)

Burbas
The problem is that there has to be something like a special JavaScript or the like on client site. The application runs on the server side. So more and more I don't think that there is a practical solution for this.
Bevor
I came to the conclusion that downloading a picture to measure kbit/s is the only one solution for this. In this case the webpage could only show the speed when I click on the (download) button to check the speed. It cannot show it continuously.
Bevor