Implement client heartbeat system.