Remote method invocation using websockets (socket.io)