Search code examples
javarpcprotocolsprotocol-buffers

Protocol Buffers Java RPC Stack


According to this Wikipedia entry:

"Protocol Buffers is very similar to Facebook’s Thrift protocol, except it does not include a concrete RPC stack to use for defined services. Since Protocol Buffers was open sourced, a number of RPC stacks have emerged to fill this gap."

However, there are no examples of RPC stacks cited. Can anyone suggest a Java-based implementation of an RPC stack?


Solution

  • If you want Java-based RPC stack, it's RMI. However, it doesn't work well cross platform.

    I've been using ProtoBuf to do RPC. You can pretty much simulate an RPC stack by wrapping a protobuf message inside another protobuf, which defines the services or calls. Find my answer to this question for details,

    Google Protocol Buffers and HTTP

    Thrift looks like a very good alternative if you want support more platforms like PHP, Ruby, C# etc. However, it looks very complex to me compared to ProtoBuf.