I've got this simple Java server process running as a MessagePack RPC service. I want to invoke the hello()
service from Javascript, not Java, but have yet to find an example on how to achieve it. There does not appear to be a RPC implementation for Javascript on the MessagePack site.
import org.msgpack.rpc.Server;
import org.msgpack.rpc.loop.EventLoop;
public class ServerApp {
public String hello() {
return "OK";
}
public static void main(String[] args) throws Exception {
EventLoop loop = EventLoop.defaultEventLoop();
Server svr = new Server();
svr.serve(new ServerApp());
svr.listen(1985);
loop.join();
}
}
UPDATE Found a Javascript RPC client for MessagePack here...