Comparing the Distance Between Two PCs

J

Justin R.

I'm in an awkward situation.

I help support an internal website that distributes software to
clients. Client's access the website, and choose which software
they'd like to install on their workstation from a set list of
approved applications. To reduce network traffic, we have several
satellite servers set up and we ask that users select the closest
server location from a drop-down list before attempting to download an
application.

A lot of users don't do this, or select the wrong server. I'm curious
about whether or not it's possible for the web server to detect which
server the user is closest to automatically. Here's the solution I've
come to for this "problem":

1. Utilize the System.Net.NetworkInformation.Ping class to generate a
makeshift trace-route to all the servers, as well as the client PC.
The trace-route for the servers can be refreshed once a week, or maybe
even once a month. The trace-route for the user would be generated if
the user clicked a "Help Me Choose" button next to the dropdown list.

2. Compare the trace-route to the user with the stored trace-routes
to the servers, looking for shared points.

Any ideas or suggestions? I'm not complaining about the way that I'm
trying to do it -- I like the challenge it offers. But would there be
another way?
 
J

Justin R.

I'm sure it is.  Lots of Internet download sites do this sort of thing  
(e.g. SourceForge).  I believe at least some do it by looking at your IP  
address, mapping it geographically, and comparing that to a database of  
available servers.




I'm not really sure what you mean by "trace-route".  I'm not aware of a 
way to get the Ping class to give you the same information that the  
"traceroute" utility would.  Are you fiddling with the TTL in the ping or  
something like that?  Maybe I'm just not thinking creatively enough.


See above.  The most reliable way is to use an actual geographical  
database.  But, if you're looking to minimize network traffic, then it  
seems to me that if you have a reliable way to picking a route that has  
the shortest number of hops for that user, that's probably actually a  
_more_ reliable solution than using a geographical database, because the  
Internet topology doesn't necessarily match the geographical topology.

Pete

I constructed a class that repeatedly pings the destination, starting
with a Ttl of one, and autoincrementing by one thereafter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top