msoucy / dproto

D Protocol Buffer mixins to create structures at compile time
Boost Software License 1.0
37 stars 16 forks source link

your advice/opinions on integrating with grpc? #113

Open Laeeth opened 7 years ago

Laeeth commented 7 years ago

Hi.

I'm thinking about writing a dlang wrapper for grpc - starting with bindings to Juniper's grpc-c (the C API of grpc is a bit uneven), then a simple wrapper on top, with code generation coming next. There is a grpc plugin to dprotoc that generates rpc code on client and server for you.

Context is that it seems a more generally useful answer to problem of moving things to microservices in a cross-language environment. So I can write clients once with a small amount of auto-generated code on top.

Any thoughts on best way to integrate your work with this? I haven't yet looked properly, but I think for rpc your code generates an interface but I would then need to introspect on this to pass details of methods to RPC server code and write some glue that would actually translate callback into something nicer to use from D. And just glue code on client.

I would love to hear any thoughts.

Laeeth.

timotheecour commented 7 years ago

I wish we had a core library on which each one would be built:

A lot of the logic should be the same regardless of serialization protocol. The core would provide: call_sync, call_async+callback, notify, accept, etc

Then msgpackrpc-d grpc-d can build on top of it to avoid reinventing the wheel (and the bugs)