adding pub/sub and object methods to RPC websocket example