You are trying to solve the problem on the wrong end, let windows do it for you 
- look into DFS 
http://www.microsoft.com/windowsserver2003/technologies/storage/dfs/default.mspx

If DFS is not an option, then you have a few choices:


1.       As you mentioned, use a database of some sort (could be a flat file, 
web service, database table, etc) that maps a particular IP subnet to a file 
server.

2.       The other option you mention, ping, might work as well, so long as you 
are using a large packet when you ping. See the docs for Net::Ping.

The way we used to do this was to put our data share on domain controllers 
(because most every remote site had a domain controller). Client applications 
would then reference the share as %LOGONSERVER%\DATASHARE\...

If your ActiveDirectory sites are properly defined, %LOGONSERVER will be the 
"closest" domain controller.



From: activeperl-boun...@listserv.activestate.com 
[mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of 
anthony.okusa...@usbank.com
Sent: Thursday, August 20, 2009 4:20 PM
To: activeperl@listserv.activestate.com
Subject: Fastest Path


Perl Guru's I greet you.
        I am putting together a script which I would be using to update
Windows servers as part of a build process.
I have multiple mirrored shares across my network
My goal is to have this script run and determine the fastest/closest update 
share
that it can use to download  updates from
Can you think of any modules that can help me with this ?

As of now (design phase)
I was thinking of the pseudocode
1. Launch script
2. query host for its IP
3a use static table to determine which is its best share
(problem with this is I have to compile a list of IP network values and 
determine which share best servers which network)
OR
3b. Ping each update server and return the one with the least number of hops or 
the one with the fastest response time.


Any ideas would be appreciated.




Tony B. Okusanya

U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains 
information that is, or may be, covered by electronic communications privacy 
laws, and is also confidential and proprietary in nature. If you are not the 
intended recipient, please be advised that you are legally prohibited from 
retaining, using, copying, distributing, or otherwise disclosing this 
information in any manner. Instead, please reply to the sender that you have 
received this communication in error, and then immediately delete it. Thank you 
in advance for your cooperation.

---------------------------------------------------------------------
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to