Daffi is an open-source Python framework for brokerless RPC and inter-process communication, offering direct connections, multiple messaging patterns, streaming and a compiled native core.
Daffi is designed for communication between Python applications without an external message broker. It supports remote function calls, fire-and-forget operations, broadcasts and streaming through a single connection interface.
The framework supports MessagePack, JSON, Pickle and OPAQUE binary transfer, along with TCP and Unix domain sockets, TLS and asyncio integration. It requires Python 3.10 or newer and can be installed with pip.
Its performance-critical connection handling uses a compiled native core, with thread-based and event-driven runtime modes. The reported benchmarks used the threads runtime with one worker, loopback TCP, no TLS and a separate server process.
In the supplied tests, Daffi OPAQUE reached 5,181 MiB/s of goodput for 1 MiB sequential exchanges, compared with 776 MiB/s for gRPC Protobuf. In the 32-client test, however, ZeroMQ reached about 145,000 calls per second versus Daffi's approximately 56,763.
The project is available as open source on GitHub. Its focus is communication between Python applications; the article notes that gRPC may remain a better fit for standardized cross-language RPC contracts, while ZeroMQ is suited to general-purpose messaging patterns.