[protobuf] New Protocol Buffer RPC implementation using Apache MINA on Java side

154 views
Skip to first unread message

jpenguin

unread,
Apr 30, 2010, 2:46:51 PM4/30/10
to Protocol Buffers
I have posted a new RPC channel implementation at
http://code.google.com/p/protobuf-mina-rpc/.

Currently only synchronously calling Java protobuf services from a
Python client is supported.

At Java side, Apache MINA (http://mina.apache.org/features.html) is
used to run the server which means things like SSL, JMX, custom
threading could be done easily and transports other than TCP are
possible. Sample server code that has one protobuf service registered:

public static void main(String[] args) throws IOException {
RpcServer server = new RpcServer("localhost", 33789);
MockArithmeticService service = new MockArithmeticService();
RpcServer.registerServiceImpl(service);
server.start();
}
Sample Python client code (see python/examples for details):


channel = MinaRpcChannel('localhost', 33789)
service = ArithmeticService_Stub(channel)
req = arithmetic_pb2.OpRequest()
...
# calling the service which runs on Java side , this is a blocking
call
result = service.performOperation(MinaRpcController(),req)

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.

Kenton Varda

unread,
May 3, 2010, 12:59:36 PM5/3/10
to jpenguin, Protocol Buffers
Cool.  I've added this to the wiki:

Reply all
Reply to author
Forward
0 new messages