grpclib-transports¶
gRPC over custom asyncio transports — stdio subprocess pipes, SSH sessions, Unix-domain sockets, and multiprocessing pipe pairs.
This is a subproject of this repository (grpclib-transports/), not a
third-party dependency. nanopynix is its only consumer: the rpc engine runs
each Nix evaluator in a worker process and speaks gRPC to that process over
the stdio and multiprocessing transports below. The library is meant to be
changed for that consumer.
Contents
Where to start¶
No quick-start snippet on this page, deliberately. Every transport already has
a complete, runnable script on the Examples page, and
grpclib-transports/tests/test_examples.py runs each one — so a change that
breaks an example fails the suite, which is not true of a snippet written out
here. Read the script for the transport you need:
Transport |
Example |
What it shows |
|---|---|---|
Unix-domain socket |
|
|
Stdio subprocess |
|
|
Multiprocessing pipe pair |
|
a forkserver worker reached over dup'd OS pipes — the transport nanopynix's worker pool uses |
SSH |
|
|
Bidirectional logical RPC |
|
|
All five share the service implementations in services.py, and they talk to
greeter-proto/, the generated fixture service this repository builds for
exactly this purpose.
The API reference documents each transport, channel and server type directly from its docstrings.