RPC example refactoring

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>