Minimalistic RPC and event loop