generic php component heartbeat monitoring solution client observer pattern