(Not sure if it is the right place for this question, but I'll give it a try... If I am wrong -- direct me to proper venue, please.)
Suppose you have a server that performs a very long operation on behalf of the client (i.e. it's API has start(...) and stop(...) calls). Client invokes start() and then (probably 2 days later) stop() is invoked.
In case if client crashed (or someone cut network cable) I need to automatically call stop() on server side. http2-keep-alive feature can be used to break dead connection, but I couldn't figure out how to detect this situation.
Similarly on client side I need to be able to detect broken connection and reconnect (potentially followed by start()).
Is there a way to achieve this? Or I am inventing bicycles here and this problem is solved differently?
Edit: server needs to stop() only actions started by specific client (that is no longer alive).
(Not sure if it is the right place for this question, but I'll give it a try... If I am wrong -- direct me to proper venue, please.)
Suppose you have a server that performs a very long operation on behalf of the client (i.e. it's API has
start(...)
andstop(...)
calls). Client invokesstart()
and then (probably 2 days later)stop()
is invoked.In case if client crashed (or someone cut network cable) I need to automatically call
stop()
on server side.http2-keep-alive
feature can be used to break dead connection, but I couldn't figure out how to detect this situation.Similarly on client side I need to be able to detect broken connection and reconnect (potentially followed by
start()
).Is there a way to achieve this? Or I am inventing bicycles here and this problem is solved differently?
Edit: server needs to
stop()
only actions started by specific client (that is no longer alive).