naming conventions
process should branch out from main function
socket + fork is unscalable, use libev
heartbeat is too heavy, use thread + light implementation