Yes, _some_ form of synchronization is needed.
The details of course depend on the nature of the heartbeat (e.g. can it
be omitted if there was regular traffic in the meantime? How much delay
for the heartbeat is allowed etc.).
We could certainly come up with better solutions if we had more
information about the scenario.
Kind regards
robert
Agree with the last. It may be that dealing at the level of sockets is
not the best way at all. It may also be that there is some discussion
required about *what* we are calling a heartbeat, whether it is actually
a "heartbeat" that we are wanting here, or whether external status
polling is better.
I myself think of a heartbeat as being a periodic signal initiated by
the server or application that is being monitored, and generally a push
to a central monitor.
I consider that for servers ("server" being loosely defined here as
*any* standalone app that is taking requests) that the best type of
status checking in many circumstances is pull by a client. And the best
type of status check is a request that looks more or less like any other
kind of request that the server accepts. So, if I was testing a web
server, I'd send an HTTP request; if email, an SMTP; if messaging I'd
try to put or get a JMS message.
AHS