Port RPC tutorial to callback API