Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Doing 40 differnt things at once

Reply
Thread Tools

Doing 40 differnt things at once

 
 
colin.steadman@gmail.com
Guest
Posts: n/a
 
      01-13-2005
I'm building a statistics page and would like to ping a server and show
the result in ASP. This shouldn't be a problem, but I'd like to be
able to get the same information for 40 other servers all at the same
time.

The only solution I can think of would be to put the list of servers
into an array and loop through it. But this approach would take
seconds to process each server and therefore the entire page would take
an age to load.

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds? I've never done
anything like this before so I have no idea where to start.
Any suggests or comments would be greatly appreciated.

TIA,

Colin

 
Reply With Quote
 
 
 
 
Steven Burn
Guest
Posts: n/a
 
      01-13-2005
> Is there any way ASP can ping all the server at the same time so that
> the results for all server could be seen in seconds?


Probably not (best people to ask would be Aaron Bertrand, Ray Constanzo or
Bob Barrows)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'm building a statistics page and would like to ping a server and show
> the result in ASP. This shouldn't be a problem, but I'd like to be
> able to get the same information for 40 other servers all at the same
> time.
>
> The only solution I can think of would be to put the list of servers
> into an array and loop through it. But this approach would take
> seconds to process each server and therefore the entire page would take
> an age to load.
>
> Is there any way ASP can ping all the server at the same time so that
> the results for all server could be seen in seconds? I've never done
> anything like this before so I have no idea where to start.
> Any suggests or comments would be greatly appreciated.
>
> TIA,
>
> Colin
>



 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-13-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I'm building a statistics page and would like to ping a server and
> show the result in ASP. This shouldn't be a problem, but I'd like to
> be able to get the same information for 40 other servers all at the
> same time.
>
> The only solution I can think of would be to put the list of servers
> into an array and loop through it. But this approach would take
> seconds to process each server and therefore the entire page would
> take an age to load.
>
> Is there any way ASP can ping all the server at the same time so that
> the results for all server could be seen in seconds? I've never done
> anything like this before so I have no idea where to start.
> Any suggests or comments would be greatly appreciated.
>
> TIA,
>
> Colin



I suspect you will need to find a third-party component capable of doing
asynchronous pings (I'm not sure such a beast even exists - maybe you should
ask on .iis or .asp.components). I know this is not possible using asp by
itself.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
colin.steadman@gmail.com
Guest
Posts: n/a
 
      01-13-2005
OK thanks Bob, I thought as much!

 
Reply With Quote
 
Chris Hohmann
Guest
Posts: n/a
 
      01-13-2005
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'm building a statistics page and would like to ping a server and show
> the result in ASP. This shouldn't be a problem, but I'd like to be
> able to get the same information for 40 other servers all at the same
> time.
>
> The only solution I can think of would be to put the list of servers
> into an array and loop through it. But this approach would take
> seconds to process each server and therefore the entire page would take
> an age to load.
>
> Is there any way ASP can ping all the server at the same time so that
> the results for all server could be seen in seconds? I've never done
> anything like this before so I have no idea where to start.
> Any suggests or comments would be greatly appreciated.
>
> TIA,
>
> Colin
>

What kind of response times are you getting from your servers. I did a proof
of concept against google.com and it took approximately 7 seconds with and
average response time of about 85ms. Here's the code:

<%
Dim start : start = Timer
Dim shell, exec, i
Response.Write "<pre>"
Set shell = CreateObject("WScript.Shell")
For i = 0 To 39
Set exec = shell.Exec("ping google.com -n 1")
Response.Write exec.StdOut.ReadAll()
Next
Set exec = Nothing
Set shell = Nothing
Response.Write "</pre>"
Response.Write Timer - start
%>


 
Reply With Quote
 
Rob Meade
Guest
Posts: n/a
 
      01-15-2005
<(E-Mail Removed)> wrote...

> Is there any way ASP can ping all the server at the same time so that
> the results for all server could be seen in seconds? I've never done
> anything like this before so I have no idea where to start.
> Any suggests or comments would be greatly appreciated.


Slightly different approach perhaps and it relies on SQL Server if you have
it...but you *could*.... have SQL Server ping the servers and record the
results to a table, run this in a job at what ever frequency you wanted, per
minute, per hour etc, then in the ASP just dump the table results to the
page - you could add a feature to the page enabling a user to get a 'real
time' result but warn them it might take longer to load...

Just a suggestion

Regards

Rob


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenating Date and Time from two differnt fields Tamer Ibrahim ASP .Net 1 01-17-2008 12:54 PM
mail in/out stored in differnt folders according to sender/recipient name? meerkat Computer Support 3 03-13-2007 10:22 AM
How to allow access to HD that was used with a differnt computer =?Utf-8?B?QWxwaGFRdXAybml0ZQ==?= ASP .Net 1 11-06-2006 09:22 AM
vs2005 publish website doing bad things, bad things =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?= ASP .Net 1 10-25-2006 06:18 PM
Hosting files at two differnt places Galsaba HTML 6 04-17-2004 11:46 AM



Advertisments