Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

RPC frameworks offer a nice solution to this problem: write the interface you want and your messaging to take message definition in some Interface Definition Language (IDL), and then compile it to working (and hopefully idiomatic) code in a multitude of languages.

...

  • We don't control the implementation, which means it is hard to optimize for performance, and harder to add new features later.
  • many of the RPC frameworks don't support push notifications from the server to client (implemented by some as "streaming").
  • Generally, IDLs require static type definition. This means that we would have to define remote procedure calls as only taking one type. The only really workable approach would be to take a byte array serialized with some other data serializer , and pass that through the RPC. This reduces the usefulness of an RPC framework somewhat, as it can't handle everything. However, having function stubs and having the transport taken care of is still quite useful, especially as the code works in multiple languages.

...

RPC FrameworkSupported LanguagesSerializationTransport LayerServer-Client push?Dynamic type definition?Throughput (msg/s)Comments
Avroat least Java, Python, Ruby, C#, C++Binary or JSONtransport-agnosticNoYes  
BERTscroll to the bottom on the website to see. NO native Java support (though there is Scala).Erlangtransport-agnostic or BERP (custom)NoNo  
gRPC10 (incl C++,Java,C#,Go)ProtobufHttp2, Java uses NettyYesNo  

Apache Thrift

quite a few (incl C++,Java,C#, (unofficial) Go)CustomPluggable: TTransport interface.NoNo  

Testing Setup

All perf tests were run on a MacPro 2.5Ghz i7, 16Gb RAM.

Two sets of performance tests were run:

  • 1x server with 1 client doing 10mil blocking put messages
  • 1x server with 2 clients doing 10mil blocking put messages each

Each test was run with the same message structure and key/value size.

Key Size: 64bytes

Value Size: 512bytes

The put message definition for Avro, Protobuf or Cap n Proto can be found HERE. GRPC uses Protobuf for message and service definition.