{"id":13492148,"url":"https://github.com/storj/drpc","last_synced_at":"2025-05-15T08:05:24.247Z","repository":{"id":37444190,"uuid":"204571899","full_name":"storj/drpc","owner":"storj","description":"drpc is a lightweight, drop-in replacement for gRPC","archived":false,"fork":false,"pushed_at":"2024-07-26T17:47:31.000Z","size":794,"stargazers_count":1552,"open_issues_count":12,"forks_count":57,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-05-12T02:03:06.121Z","etag":null,"topics":["drpc","go","grpc","microservices","nanoservices","proto","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/storj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-26T22:24:10.000Z","updated_at":"2025-05-11T08:25:58.000Z","dependencies_parsed_at":"2023-02-02T20:01:44.440Z","dependency_job_id":"a92ec35a-4dee-45da-b881-aba773c63d08","html_url":"https://github.com/storj/drpc","commit_stats":{"total_commits":204,"total_committers":17,"mean_commits":12.0,"dds":0.3529411764705882,"last_synced_commit":"0075ac8716613e0869c41714a92cdaacf761416d"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storj%2Fdrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storj%2Fdrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storj%2Fdrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storj%2Fdrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/storj","download_url":"https://codeload.github.com/storj/drpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drpc","go","grpc","microservices","nanoservices","proto","rpc"],"created_at":"2024-07-31T19:01:03.526Z","updated_at":"2025-05-15T08:05:24.193Z","avatar_url":"https://github.com/storj.png","language":"Go","funding_links":[],"categories":["Go","RPC Frameworks","Web 3.0","Repositories"],"sub_categories":[],"readme":"# [![DRPC](logo.png)](https://storj.github.io/drpc/)\n\nA drop-in, lightweight gRPC replacement.\n\n[![Go Report Card](https://goreportcard.com/badge/storj.io/drpc)](https://goreportcard.com/report/storj.io/drpc)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://pkg.go.dev/storj.io/drpc)\n![Beta](https://img.shields.io/badge/version-beta-green.svg)\n[![Zulip Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://drpc.zulipchat.com)\n\n## Links\n\n * [DRPC website](https://storj.github.io/drpc/)\n * [Examples](https://github.com/storj/drpc/tree/main/examples)\n * [Quickstart documentation](https://storj.github.io/drpc/docs.html)\n * [Launch blog post](https://www.storj.io/blog/introducing-drpc-our-replacement-for-grpc)\n\n## Highlights\n\n* Simple, at just a few thousand [lines of code](#lines-of-code).\n* [Small dependencies](./blob/main/go.mod). Only 3 requirements in go.mod, and 9 lines of `go mod graph`!\n* Compatible. Works for many gRPC use-cases as-is!\n* [Fast](#benchmarks). DRPC has a lightning quick [wire format](https://github.com/storj/drpc/wiki/Docs:-Wire-protocol).\n* [Extensible](#external-packages). DRPC is transport agnostic, supports middleware, and is designed around interfaces.\n* Battle Tested. Already used in production for years across tens of thousands of servers.\n\n## External Packages\n\n * [go.bryk.io/pkg/net/drpc](https://pkg.go.dev/go.bryk.io/pkg/net/drpc)\n    - Simplified TLS setup (for client and server)\n    - Server middleware, including basic components for logging, token-based auth, rate limit, panic recovery, etc\n    - Client middleware, including basic components for logging, custom metadata, panic recovery, etc\n    - Bi-directional streaming support over upgraded HTTP(S) connections using WebSockets\n    - Concurrent RPCs via connection pool\n\n* [go.elara.ws/drpc](https://pkg.go.dev/go.elara.ws/drpc)\n    - Concurrent RPCs based on [yamux](https://pkg.go.dev/github.com/hashicorp/yamux)\n    - Simple drop-in replacements for `drpcserver` and `drpcconn`\n\n * Open an issue or join the [Zulip chat](https://drpc.zulipchat.com) if you'd like to be featured here.\n\n ## Examples\n\n  * [A basic drpc client and server](../../tree/main/examples/drpc)\n  * [A basic drpc client and server that also serves a Twirp/grpc-web compatible http server on the same port](../../tree/main/examples/drpc)\n  * [Serving gRPC and DRPC on the same port](../../tree/main/examples/grpc_and_drpc)\n\n## Other Languages\n\nDRPC can be made compatible with RPC clients generated from other languages. For example, [Twirp](https://github.com/twitchtv/twirp) clients and [grpc-web](https://github.com/grpc/grpc-web/) clients can be used against the [drpchttp](https://pkg.go.dev/storj.io/drpc/drpchttp) package.\n\nNative implementations can have some advantages, and so some support for other languages are in progress, all in various states of completeness. Join the [Zulip chat](https://drpc.zulipchat.com) if you want more information or to help out with any!\n\n| Language | Repository                          | Status     |\n|----------|-------------------------------------|------------|\n| C++      | https://github.com/storj/drpc-cpp   | Incomplete |\n| Rust     | https://github.com/zeebo/drpc-rs    | Incomplete |\n| Node     | https://github.com/mjpitz/drpc-node | Incomplete |\n\n## Licensing\n\nDRPC is licensed under the MIT/expat license. See the LICENSE file for more.\n\n---\n\n## Benchmarks\n\nThese microbenchmarks attempt to provide a comparison and come with some caveats. First, it does not send data over a network connection which is expected to be the bottleneck almost all of the time. Second, no attempt was made to do the benchmarks in a controlled environment (CPU scaling disabled, noiseless, etc.). Third, no tuning was done to ensure they're both performing optimally, so there is an inherent advantage for DRPC because the author is familiar with how it works.\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd rowspan=2\u003eMeasure\u003c/td\u003e\n        \u003ctd rowspan=2\u003eBenchmark\u003c/td\u003e\u003ctd rowspan=2\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003eSmall\u003c/td\u003e\u003ctd rowspan=2\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003eMedium\u003c/td\u003e\u003ctd rowspan=2\u003e\u003c/td\u003e\n        \u003ctd colspan=3\u003eLarge\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003egRPC\u003c/td\u003e\u003ctd\u003eDRPC\u003c/td\u003e\u003ctd\u003edelta\u003c/td\u003e\n        \u003ctd\u003egRPC\u003c/td\u003e\u003ctd\u003eDRPC\u003c/td\u003e\u003ctd\u003edelta\u003c/td\u003e\n        \u003ctd\u003egRPC\u003c/td\u003e\u003ctd\u003eDRPC\u003c/td\u003e\u003ctd\u003edelta\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=14\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd rowspan=4\u003etime/op\u003c/td\u003e\n        \u003ctd\u003eUnitary\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e29.7µs\u003c/td\u003e\u003ctd\u003e8.3µs\u003c/td\u003e\u003ctd\u003e-72.18%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e36.4µs\u003c/td\u003e\u003ctd\u003e11.3µs\u003c/td\u003e\u003ctd\u003e-68.92%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e1.70ms\u003c/td\u003e\u003ctd\u003e0.54ms\u003c/td\u003e\u003ctd\u003e-68.24%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eInput Stream\u003c/td\u003e\n        \u003ctd\u003e1.56µs\u003c/td\u003e\u003ctd\u003e0.79µs\u003c/td\u003e\u003ctd\u003e-49.07%\u003c/td\u003e\n        \u003ctd\u003e3.80µs\u003c/td\u003e\u003ctd\u003e2.04µs\u003c/td\u003e\u003ctd\u003e-46.28%\u003c/td\u003e\n        \u003ctd\u003e784µs\u003c/td\u003e\u003ctd\u003e239µs\u003c/td\u003e\u003ctd\u003e-69.48%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOutput Stream\u003c/td\u003e\n        \u003ctd\u003e1.51µs\u003c/td\u003e\u003ctd\u003e0.78µs\u003c/td\u003e\u003ctd\u003e-48.47%\u003c/td\u003e\n        \u003ctd\u003e3.81µs\u003c/td\u003e\u003ctd\u003e2.02µs\u003c/td\u003e\u003ctd\u003e-47.06%\u003c/td\u003e\n        \u003ctd\u003e691µs\u003c/td\u003e\u003ctd\u003e224µs\u003c/td\u003e\u003ctd\u003e-67.55%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBidir Stream\u003c/td\u003e\n        \u003ctd\u003e8.79µs\u003c/td\u003e\u003ctd\u003e3.25µs\u003c/td\u003e\u003ctd\u003e-63.07%\u003c/td\u003e\n        \u003ctd\u003e13.7µs\u003c/td\u003e\u003ctd\u003e5.0µs\u003c/td\u003e\u003ctd\u003e-63.73%\u003c/td\u003e\n        \u003ctd\u003e1.73ms\u003c/td\u003e\u003ctd\u003e0.47ms\u003c/td\u003e\u003ctd\u003e-72.72%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=14\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd rowspan=4\u003espeed\u003c/td\u003e\n        \u003ctd\u003eUnitary\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e70.0kB/s\u003c/td\u003e\u003ctd\u003e240.0kB/s\u003c/td\u003e\u003ctd\u003e+242.86%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e56.3MB/s\u003c/td\u003e\u003ctd\u003e181.1MB/s\u003c/td\u003e\u003ctd\u003e+221.52%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e618MB/s\u003c/td\u003e\u003ctd\u003e1939MB/s\u003c/td\u003e\u003ctd\u003e+213.84%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eInput Stream\u003c/td\u003e\n        \u003ctd\u003e1.28MB/s\u003c/td\u003e\u003ctd\u003e2.52MB/s\u003c/td\u003e\u003ctd\u003e+96.11%\u003c/td\u003e\n        \u003ctd\u003e540MB/s\u003c/td\u003e\u003ctd\u003e1006MB/s\u003c/td\u003e\u003ctd\u003e+86.16%\u003c/td\u003e\n        \u003ctd\u003e1.34GB/s\u003c/td\u003e\u003ctd\u003e4.38GB/s\u003c/td\u003e\u003ctd\u003e+226.51%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOutput Stream\u003c/td\u003e\n        \u003ctd\u003e1.33MB/s\u003c/td\u003e\u003ctd\u003e2.57MB/s\u003c/td\u003e\u003ctd\u003e+93.88%\u003c/td\u003e\n        \u003ctd\u003e538MB/s\u003c/td\u003e\u003ctd\u003e1017MB/s\u003c/td\u003e\u003ctd\u003e+89.14%\u003c/td\u003e\n        \u003ctd\u003e1.52GB/s\u003c/td\u003e\u003ctd\u003e4.68GB/s\u003c/td\u003e\u003ctd\u003e+208.05%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBidir Stream\u003c/td\u003e\n        \u003ctd\u003e230kB/s\u003c/td\u003e\u003ctd\u003e616kB/s\u003c/td\u003e\u003ctd\u003e+167.93%\u003c/td\u003e\n        \u003ctd\u003e149MB/s\u003c/td\u003e\u003ctd\u003e412MB/s\u003c/td\u003e\u003ctd\u003e+175.73%\u003c/td\u003e\n        \u003ctd\u003e610MB/s\u003c/td\u003e\u003ctd\u003e2215MB/s\u003c/td\u003e\u003ctd\u003e+262.96%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=14\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd rowspan=4\u003emem/op\u003c/td\u003e\n        \u003ctd\u003eUnitary\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e9.42kB\u003c/td\u003e\u003ctd\u003e1.42kB\u003c/td\u003e\u003ctd\u003e-84.95%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e22.7kB\u003c/td\u003e\u003ctd\u003e7.8kB\u003c/td\u003e\u003ctd\u003e-65.61%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e6.42MB\u003c/td\u003e\u003ctd\u003e3.16MB\u003c/td\u003e\u003ctd\u003e-50.74%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eInput Stream\u003c/td\u003e\n        \u003ctd\u003e465B\u003c/td\u003e\u003ctd\u003e80B\u003c/td\u003e\u003ctd\u003e-82.80%\u003c/td\u003e\n        \u003ctd\u003e7.06kB\u003c/td\u003e\u003ctd\u003e2.13kB\u003c/td\u003e\u003ctd\u003e-69.87%\u003c/td\u003e\n        \u003ctd\u003e3.20MB\u003c/td\u003e\u003ctd\u003e1.05MB\u003c/td\u003e\u003ctd\u003e-67.10%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOutput Stream\u003c/td\u003e\n        \u003ctd\u003e360B\u003c/td\u003e\u003ctd\u003e80B\u003c/td\u003e\u003ctd\u003e-77.81%\u003c/td\u003e\n        \u003ctd\u003e6.98kB\u003c/td\u003e\u003ctd\u003e2.13kB\u003c/td\u003e\u003ctd\u003e-69.52%\u003c/td\u003e\n        \u003ctd\u003e3.20MB\u003c/td\u003e\u003ctd\u003e1.05MB\u003c/td\u003e\u003ctd\u003e-67.21%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBidir Stream\u003c/td\u003e\n        \u003ctd\u003e1.09kB\u003c/td\u003e\u003ctd\u003e0.24kB\u003c/td\u003e\u003ctd\u003e-77.94%\u003c/td\u003e\n        \u003ctd\u003e14.4kB\u003c/td\u003e\u003ctd\u003e4.3kB\u003c/td\u003e\u003ctd\u003e-69.90%\u003c/td\u003e\n        \u003ctd\u003e6.42MB\u003c/td\u003e\u003ctd\u003e2.10MB\u003c/td\u003e\u003ctd\u003e-67.22%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=14\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd rowspan=4\u003eallocs/op\u003c/td\u003e\n        \u003ctd\u003eUnitary\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e182\u003c/td\u003e\u003ctd\u003e7\u003c/td\u003e\u003ctd\u003e-96.15%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e184\u003c/td\u003e\u003ctd\u003e9\u003c/td\u003e\u003ctd\u003e-95.11%\u003c/td\u003e\u003ctd rowspan=4\u003e\u003c/td\u003e\n        \u003ctd\u003e280\u003c/td\u003e\u003ctd\u003e9\u003c/td\u003e\u003ctd\u003e-96.79%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eInput Stream\u003c/td\u003e\n        \u003ctd\u003e11\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e-90.91%\u003c/td\u003e\n        \u003ctd\u003e12\u003c/td\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003e-83.33%\u003c/td\u003e\n        \u003ctd\u003e39.2\u003c/td\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003e-94.90%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOutput Stream\u003c/td\u003e\n        \u003ctd\u003e11\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e-90.91%\u003c/td\u003e\n        \u003ctd\u003e12\u003c/td\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003e-83.33%\u003c/td\u003e\n        \u003ctd\u003e38\u003c/td\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003e-94.74%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBidir Stream\u003c/td\u003e\n        \u003ctd\u003e43\u003c/td\u003e\u003ctd\u003e3\u003c/td\u003e\u003ctd\u003e-93.02%\u003c/td\u003e\n        \u003ctd\u003e46\u003c/td\u003e\u003ctd\u003e5\u003c/td\u003e\u003ctd\u003e-89.13%\u003c/td\u003e\n        \u003ctd\u003e140\u003c/td\u003e\u003ctd\u003e5\u003c/td\u003e\u003ctd\u003e-96.43%\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Lines of code\n\nDRPC is proud to get as much done in as few lines of code as possible. It's the author's belief that this is only possible by having a clean, strong architecture and that it reduces the chances for bugs to exist (most studies show a linear corellation with number of bugs and lines of code). This table helps keep the library honest, and it would be nice if more libraries considered this.\n\n| Package                              | Lines    |\n| ---                                  | ---      |\n| storj.io/drpc/drpcstream             | 486      |\n| storj.io/drpc/drpchttp               | 478      |\n| storj.io/drpc/cmd/protoc-gen-go-drpc | 428      |\n| storj.io/drpc/drpcmanager            | 376      |\n| storj.io/drpc/drpcwire               | 363      |\n| storj.io/drpc/drpcpool               | 279      |\n| storj.io/drpc/drpcmigrate            | 239      |\n| storj.io/drpc/drpcserver             | 164      |\n| storj.io/drpc/drpcconn               | 134      |\n| storj.io/drpc/drpcsignal             | 133      |\n| storj.io/drpc/drpcmetadata           | 115      |\n| storj.io/drpc/drpcmux                | 95       |\n| storj.io/drpc/drpccache              | 54       |\n| storj.io/drpc                        | 47       |\n| storj.io/drpc/drpctest               | 45       |\n| storj.io/drpc/drpcerr                | 42       |\n| storj.io/drpc/drpcctx                | 41       |\n| storj.io/drpc/internal/drpcopts      | 30       |\n| storj.io/drpc/drpcstats              | 25       |\n| storj.io/drpc/drpcdebug              | 22       |\n| storj.io/drpc/drpcenc                | 15       |\n| **Total**                            | **3611** |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstorj%2Fdrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstorj%2Fdrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstorj%2Fdrpc/lists"}