{"id":45778779,"url":"https://github.com/golocron/rpcz","last_synced_at":"2026-02-26T10:52:39.883Z","repository":{"id":47314797,"uuid":"401645549","full_name":"golocron/rpcz","owner":"golocron","description":"A lightweight library for RPC over TCP","archived":false,"fork":false,"pushed_at":"2024-05-11T07:24:16.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-11T08:36:07.549Z","etag":null,"topics":["go","protobuf","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golocron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-31T09:28:17.000Z","updated_at":"2024-05-11T07:24:19.000Z","dependencies_parsed_at":"2022-08-27T08:40:29.548Z","dependency_job_id":null,"html_url":"https://github.com/golocron/rpcz","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/golocron/rpcz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golocron%2Frpcz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golocron%2Frpcz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golocron%2Frpcz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golocron%2Frpcz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golocron","download_url":"https://codeload.github.com/golocron/rpcz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golocron%2Frpcz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29856759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","protobuf","rpc"],"created_at":"2026-02-26T10:52:34.929Z","updated_at":"2026-02-26T10:52:39.876Z","avatar_url":"https://github.com/golocron.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpcz\n\nRPCz is a library for RPC-style interservice communication over network. It's simple, lightweight yet performant. It provides you with the infrastructure for building services and clients, taking care of the low level details such as connection handling and lifecycle management.\n\nIt's designed to work over plain TCP or Unix sockets, or with TLS on top of it. The primary encoding is Protobuf, with JSON available as an alternative. Adjustable bufferring helps achieve better throughput based on the needs of your application.\n\nWhile providing similar functionality to gRPC, Twirp and the standard library's `rpc` package, RPCz differs from each in some way:\n- it's lightweight\n- it focuses on solving one particular task – performant communication over TCP\n- the public API is minimal, and consists primarily of a handful of convenience constructors\n- supports only two encodings\n- it handles connections gracefully, and supports (even enforces) use of `context.Context`.\n\nThe library code uses only one external dependency, Protobuf.\n\n\n## Examples\n\nAn example of a server running an RPC service and a client that interacts with it are available in [this repository](https://github.com/golocron/rpcz_example).\n\n\n## In Other Languages\n\nThe most obvious use case is communication between services developed in Go. However, one of the main reasons for creating this library was the need to interact with software written in different languages.\n\nThe simple protocol of RPCz and the use of Protobuf allow for such cross-language comminication. A server implementing the RPCz protocol must accept and correctly handle a request from a client implementing the protocol.\n\n\n| Language | Server | Client | Status |\n|--- | --- | --- | --- |\n| Go | ✅ | ✅ | Initial release |\n| Rust | ⚪ | ⚪ | Planned |\n| Zig | ⚪ | ⚪ | Planned |\n\n\nThere are currently no plans on implementations for languages other than the listed above.\n\n\n## Benchmarks\n\nThe developer's machine has the following configuation:\n\n```bash\ngoos: darwin\ngoarch: amd64\ncpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\n```\n\n\nThe benchmark resutls have been obtained by running:\n\n```bash\ngo test -benchmem -benchtime 5s -bench=Benchmark -count 5 -timeout 600s -cpu=8 | tee results.bench\n\nbenchstat results.bench\n```\n\n\nAnd here are the results:\n\n```text\nname                time/op\nProtobuf_1K-8         13.4µs ± 7%\nProtobuf_4K-8         19.2µs ± 1%\nProtobuf_16K-8        38.0µs ± 3%\nProtobuf_32K-8        65.9µs ± 2%\nProtobuf_64K-8        91.6µs ±14%\nProtobufTLS_4K-8      19.6µs ± 3%\nProtobufNoBuf_4K-8    25.9µs ± 5%\nJSON_1K-8             20.4µs ± 4%\nJSON_4K-8             53.6µs ± 5%\nJSON_16K-8             185µs ± 2%\nJSONTLS_4K-8          55.9µs ± 2%\n\nname                speed\nProtobuf_1K-8        153MB/s ± 7%\nProtobuf_4K-8        427MB/s ± 1%\nProtobuf_16K-8       862MB/s ± 3%\nProtobuf_32K-8      1.00GB/s ± 2%\nProtobuf_64K-8      1.44GB/s ±13%\nProtobufTLS_4K-8     417MB/s ± 3%\nProtobufNoBuf_4K-8   317MB/s ± 5%\nJSON_1K-8            100MB/s ± 4%\nJSON_4K-8            153MB/s ± 5%\nJSON_16K-8           177MB/s ± 2%\nJSONTLS_4K-8         147MB/s ± 2%\n\nname                alloc/op\nProtobuf_1K-8         9.42kB ± 0%\nProtobuf_4K-8         40.1kB ± 0%\nProtobuf_16K-8         155kB ± 0%\nProtobuf_32K-8         333kB ± 0%\nProtobuf_64K-8         614kB ± 0%\nProtobufTLS_4K-8      37.9kB ± 0%\nProtobufNoBuf_4K-8    47.6kB ± 0%\nJSON_1K-8             5.56kB ± 0%\nJSON_4K-8             19.2kB ± 0%\nJSON_16K-8            72.3kB ± 0%\nJSONTLS_4K-8          19.3kB ± 0%\n\nname                allocs/op\nProtobuf_1K-8           21.0 ± 0%\nProtobuf_4K-8           21.0 ± 0%\nProtobuf_16K-8          21.0 ± 0%\nProtobuf_32K-8          21.0 ± 0%\nProtobuf_64K-8          21.0 ± 0%\nProtobufTLS_4K-8        22.0 ± 0%\nProtobufNoBuf_4K-8      27.0 ± 0%\nJSON_1K-8               29.0 ± 0%\nJSON_4K-8               29.0 ± 0%\nJSON_16K-8              29.0 ± 0%\nJSONTLS_4K-8            30.0 ± 0%\n```\n\nYou can also have a look \u003ca target=\"_blank\" href=\"https://github.com/cockroachdb/rpc-bench\"\u003ehere\u003c/a\u003e for benchmarks of other systems, such as gRPC and the `rpc` package from the standard library.\n\n\n## Open-Source, not Open-Contribution\n\nSimilar to [SQLite](https://www.sqlite.org/copyright.html) and [Litestream](https://github.com/benbjohnson/litestream#open-source-not-open-contribution), RPCz is open-source, but is not open to contributions. This helps keep the code base free of confusions with licenses or proprietary changes, and prevent feature bloat.\n\nIn addition, experiences of many open-source projects have shown that maintenance of an open-source code base can be quite resource demanding. Time, mental health and energy – are just a few.\n\nTaking the above into account, I've made the decision to make the project closed to contributions.\n\nThank you for understanding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolocron%2Frpcz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolocron%2Frpcz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolocron%2Frpcz/lists"}