Re: [twsocket] Pinging multipe hosts

2016-03-12 Thread Angus Robertson - Magenta Systems Ltd
> 2- clients that complete ping without error, do additional test 
> if client software is actually running.

What client software, something you wrote or different?  Does it
contact the web server or vice versa. 

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Pinging multipe hosts

2016-03-12 Thread Angus Robertson - Magenta Systems Ltd
> *Subject:* Re: [twsocket] Pinging multipe hosts
> *From:* Ertan Küçüko_lu 
> *To:* "'ICS support mailing'" 
> *Date:* Sat, 12 Mar 2016 19:34:21 +0200
> 
> I thought, at first, that ping might be a solution. After reading 
> your post, I better find another way to check if client is
> running.  More details about subject:
> - I will be writing both applications that running on server and 
> client.
> - Client will inform server first time it is running thru a 
> webservice.
> - Client will inform server every minute it is running thru a 
> webservice. - If it is more than a minute and client still didn't 
> inform that it is
> running, I would like to know that client is really alive, or 
> busy and couldn't say that it is running.
> - If client is really closed, I will do some database operations 
> on server side.

Look at the sample OverbyteIcsPingTst which illustrates ping using a
thread, so your application is not blocked while testing a host.  

As François says, it's better to test the protocol, in your case by
sending your own defined packets back and forth every minute. This is
very low overhead.  But there is no notification if an open TCP
connection is lost, until you try to send more data when it will fail
after a timeout.  

But beware opening a TCP connection to a host that is offline is a
effectively a blocking operation and will timeout after about 40
seconds preventing any other new connections during that time. That is
when it's better to ping first since it has a controlled timeout of a
few seconds so you get a failed response more quickly. 

I did all this 10 years ago tracking 500 London buses with wifi on
parts of their routes, so connections dropping all the time, but had to
FTP data to and from them when they were online.  All this was
controlled from a SQL database with a web application showing which
buses were online, last contact, and environmental stuff like failed
fans that meant the PC would overheat and die, as dozens did. 

Angus
 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Pinging multipe hosts

2016-03-12 Thread Ertan Küçükoğlu
I thought, at first, that ping might be a solution. After reading your post,
I better find another way to check if client is running.  More details about
subject:
- I will be writing both applications that running on server and client.
- Client will inform server first time it is running thru a webservice.
- Client will inform server every minute it is running thru a webservice. 
- If it is more than a minute and client still didn't inform that it is
running, I would like to know that client is really alive, or busy and
couldn't say that it is running.
- If client is really closed, I will do some database operations on server
side.

I avoid to use a webservice on client, too. Need something faster and
simple, if possible. That won't be much of a CPU and network resource user.

Maybe a port listenning on client side for a connection. If a connection
occurs from server side, it means it is alive, and connection will be
closed. Or, client will say it is alive and connection will be closed?

Thanks.
--Ertan

-Original Message-
From: TWSocket [mailto:twsocket-boun...@lists.elists.org] On Behalf Of
François Piette
Sent: Saturday, March 12, 2016 6:37 PM
To: 'ICS support mailing' 
Subject: Re: [twsocket] Pinging multipe hosts

> I have a Windows service application. That needs to check if several 
> hosts
(IP numbers, 
> no need to DNS resolve) are still alive. Assuming easiest way to ping
them. Since that will
> require no installation on my clients at all. Please suggest other 
> ways
that you think apply.

Ping messages (ICMP) are frequently blocked for servers.
If you have control over the hosts, you can be sure to enable it.

But ping doesn't mean the services are running, it only means that the
server OS is running.
The best way to check for an alive host is to try a connection to the host,
connection to the application that you must verify.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare The author of the
freeware Internet Component Suite (ICS) http://www.overbyte.be




--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Pinging multipe hosts

2016-03-12 Thread François Piette
> I have a Windows service application. That needs to check if several hosts
(IP numbers, 
> no need to DNS resolve) are still alive. Assuming easiest way to ping
them. Since that will
> require no installation on my clients at all. Please suggest other ways
that you think apply.

Ping messages (ICMP) are frequently blocked for servers.
If you have control over the hosts, you can be sure to enable it.

But ping doesn't mean the services are running, it only means that the
server OS is running.
The best way to check for an alive host is to try a connection to the host,
connection to the application that you must verify.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be