python grpc server doesn't have an easy way to check whether a
client is dropped or not. This makes it hard to manage endpoint in
the flame channel concept and hence can cause deadlock situations
where an endpoint (working as grpc server) waits for data to arrive
from an endpoint which is dropped.
As a workaround, a heart beat is sent periodically; if it is not
received for a certain duration, it is assumed that the client is
dropped. The grpc server cleans up resources allocated for the
endpoint, which prevents deadlock.