Implement basic RPC system

Signed-off-by: Julien Danjou <julien@danjou.info>