{"id":14156578,"url":"https://github.com/n0-computer/quic-rpc","last_synced_at":"2025-05-15T09:08:19.124Z","repository":{"id":63665038,"uuid":"566313150","full_name":"n0-computer/quic-rpc","owner":"n0-computer","description":"A streaming rpc system based on quic","archived":false,"fork":false,"pushed_at":"2025-04-03T12:51:53.000Z","size":1141,"stargazers_count":116,"open_issues_count":21,"forks_count":15,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-09T19:19:36.055Z","etag":null,"topics":["crate","quic","rpc-library","rust","stream-processing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n0-computer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2022-11-15T12:14:13.000Z","updated_at":"2025-04-16T13:34:35.000Z","dependencies_parsed_at":"2023-11-08T13:26:58.827Z","dependency_job_id":"930f98b7-f45a-4dbb-98b0-df68bc8ef3ce","html_url":"https://github.com/n0-computer/quic-rpc","commit_stats":{"total_commits":388,"total_committers":9,"mean_commits":"43.111111111111114","dds":0.2912371134020618,"last_synced_commit":"5382c8053853a84a04949c7cf8df75770f29072c"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Fquic-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Fquic-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Fquic-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Fquic-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0-computer","download_url":"https://codeload.github.com/n0-computer/quic-rpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253309361,"owners_count":21887975,"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":["crate","quic","rpc-library","rust","stream-processing"],"created_at":"2024-08-17T08:06:37.257Z","updated_at":"2025-05-15T09:08:14.112Z","avatar_url":"https://github.com/n0-computer.png","language":"Rust","funding_links":[],"categories":["rust"],"sub_categories":[],"readme":"# Quic-Rpc\n\nA streaming rpc system based on quic\n\n[\u003cimg src=\"https://img.shields.io/badge/github-quic_rpc-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\" \u003e][repo link] [![Latest Version]][crates.io] [![Docs Badge]][docs.rs] ![license badge] [![status badge]][status link]\n\n[Latest Version]: https://img.shields.io/crates/v/quic-rpc.svg\n[crates.io]: https://crates.io/crates/quic-rpc\n[Docs Badge]: https://img.shields.io/badge/docs-docs.rs-green\n[docs.rs]: https://docs.rs/quic-rpc\n[license badge]: https://img.shields.io/crates/l/quic-rpc\n[status badge]: https://github.com/n0-computer/quic-rpc/actions/workflows/rust.yml/badge.svg\n[status link]: https://github.com/n0-computer/quic-rpc/actions/workflows/rust.yml\n[repo link]: https://github.com/n0-computer/quic-rpc\n\n## Goals\n\n### Interaction patterns\n\nProvide not just request/response RPC, but also streaming in both directions, similar to [grpc].\n\n- 1 req -\u003e 1 res\n- 1 req, update stream -\u003e 1 res\n- 1 req -\u003e res stream\n- 1 req, update stream -\u003e res stream\n\nIt is still a RPC system in the sense that interactions get initiated by the client.\n\n### Transports\n\n- memory transport with very low overhead. In particular, no ser/deser, currently using [flume]\n- quic transport via the [quinn] crate\n- transparent combination of the above\n\n### API\n\n- The API should be similar to the quinn api. Basically \"quinn with types\".\n\n## Non-Goals\n\n- Cross language interop. This is for talking from rust to rust\n- Any kind of versioning. You have to do this yourself\n- Making remote message passing look like local async function calls\n- Being runtime agnostic. This is for tokio\n\n## Example\n\n[computation service](https://github.com/n0-computer/quic-rpc/blob/main/tests/math.rs)\n\n## Why?\n\nThe purpose of quic-rpc is to serve as an *optional* rpc framework. One of the\nmain goals is to be able to use it as an *in process* way to have well specified\nprotocols and boundaries between subsystems, including an async boundary.\n\nIt should not have noticeable overhead compared to what you would do anyway to\nisolate subsystems in a complex single process app, but should have the *option*\nto also send messages over a process boundary via one of the non mem transports.\n\nWhat do you usually do in rust to have isolation between subsystems, e.g.\nbetween a database and a networking layer? You have some kind of\nchannel between the systems and define messages flowing back and forth over that\nchannel. For almost all interactions these messages itself will again contain\n(oneshot or mpsc) channels for independent async communication between the\nsubsystems.\n\nQuic-rpc with the mem channel does exactly the same thing, except that it hides\nthe details and allows you to specify a clean high level interaction protocol\nin the rust type system.\n\nInstead of having a message that explicitly contains some data and the send side\nof a oneshot or mpsc channel for the response, it creates a pair of flume\nchannels internally and sends one end of them to the server. This has some slight\noverhead (2 flume channels vs. 1 oneshot channel) for a RPC interaction. But\nfor streaming interactions the overhead is negligible.\n\nFor the case where you have a process boundary, the overhead is very low for\ntransports that already have a concept of cheap substreams (http2, quic, ...).\nQuic is the poster child of a network transport that has built in cheap\nsubstreams including per substream backpressure. However, I found that for raw\ndata transfer http2/tcp has still superior performance. This is why the http2\ntransport exists.\n\nCurrently you would use the quinn transport for cases where you want to have\nconnections to many different peers and can't accept a large per connection\noverhead, or where you want low latency for small messages.\n\nYou would use the hyper transport for cases where you have a small number of\nconnections, so per connection overhead does not matter that much, and where\nyou want maximum throughput at the expense of some latency.\n\nThis may change in the future as quic implementations get more optimized.\n\n[quinn]: https://docs.rs/quinn/\n[flume]: https://docs.rs/flume/\n[grpc]: https://grpc.io/\n\n# Docs\n\nProperly building docs for this crate is quite complex. For all the gory details,\nsee [DOCS.md].","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0-computer%2Fquic-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0-computer%2Fquic-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0-computer%2Fquic-rpc/lists"}