Works with your existing gRPC protocol buffer definitions

DRPC works with the protoc compiler to generate RPC stubs for you.


$ go get storj.io/drpc/cmd/protoc-gen-go-drpc
$ protoc --go_out=. --go-drpc_out=. sesamestreet.proto
            

Check out the quickstart here.


message Cookie {
  enum Type {
    Sugar = 0;
    Oatmeal = 1;
    Chocolate = 2;
  }

  Type type = 1;
}

service CookieMonster {
  rpc EatCookie(Cookie) returns (Crumbs) {}
}
            

Simple

At just a few thousand lines of code (including tests), DRPC's enemy is complexity. The state machines are straightforward and simple, there are no hard to debug and diagnose issues, it's just message passing over good old connection-oriented sockets. DRPC does not support concurrent RPCs over a single transport. This eliminates head-of-line blocking concerns, buffering issues, and dramatically simplifies the implementation. Trying to force HTTP/2 into this use case is a specific non-goal, which helps the package have a small binary size and very few dependencies.

Compatible

Care has been taken to preserve gRPC semantics wherever possible. We designed this library to replace our own use of gRPC, and so it supports singleton requests, streaming requests, and gets the error code handling right. It supports metadata (e.g. distributed tracing) and even serving requests over HTTP.

DRPC can be used independently or can be used alongside gRPC. It can be served from the same sockets to support easy live migrations.

Read more about our migration experience in our launch blog post.


Fast and Extensible

DRPC has a small framing format designed around network and CPU efficiency. DRPC is transport agnostic, supports net/http-style middleware, and is designed around clean interfaces.

Battle Tested

DRPC has been used in production for years across tens of thousands of servers across the internet. With less code for bugs to hide in, every second of production experience becomes more valuable.


Check out our documentation.