good RPC framework for D?

Neia Neutuladh via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 5 20:06:58 PDT 2017


On Tuesday, 6 June 2017 at 01:01:34 UTC, Timothee Cour wrote:
> Is there a good RPC framework for D?

Last time I needed one, I used Thrift. D support in Thrift is 
maintained upstream. Unfortunately, the version available in dub 
is really old. Also unfortunately, it's std.socket only -- no 
vibe.d.

https://thrift.apache.org/docs/features
https://github.com/apache/thrift/tree/master/lib/d

> requirements:
> * efficient (no json/xml)

Thrift uses a binary format relatively similar to protocol 
buffers.

> * supports at least sending/receiving raw bytes

Thrift supports a `binary` data type representing a byte array.

> Additional requirements: supports streaming data (either input 
> or output or both)

I'm not sure what you mean by "streaming data", precisely, but 
Thrift supports multiple RPCs per  connection. This alone made a 
huge difference in my testing: a Thrift server on an AWS t2.micro 
  managed 2400 requests per second across ten clients, while HTTP 
handlers returning a fixed string only managed 75.

> and timeouts.

Definitely supports timeouts.


More information about the Digitalmars-d mailing list