Summary
rusty-comms currently supports UDS (stream), TCP, SHM, and PMQ. Three common Linux IPC mechanisms are missing:
- UDP (IPv4/IPv6 loopback) — the simplest connectionless datagram transport
- Unix datagram sockets — local datagram delivery with atomic message boundaries
- Named pipes (FIFO) — the classic unidirectional IPC primitive
These are significant gaps for comprehensive IPC mechanism comparison, particularly when comparing results against other benchmarking tools that include these transports.
Why These Matter
UDP: The baseline network-stack datagram transport. Comparing UDP loopback vs. Unix dgram isolates the cost of the IP/UDP header processing. UDP is also the foundation for many automotive middleware protocols.
Unix datagram: Provides atomic message delivery (no framing needed) with lower overhead than stream sockets. The current UDS implementation uses SOCK_STREAM, which requires length-prefix framing and can deliver partial messages — a fundamentally different kernel path than SOCK_DGRAM.
Named pipes (FIFO): The simplest kernel-mediated IPC primitive. Pipes have different buffering semantics than sockets (configurable via F_SETPIPE_SZ) and are commonly used in embedded systems for signal-like communication.
Implementation Notes
All three transports are straightforward to implement using existing libc bindings:
- UDP:
socket(AF_INET, SOCK_DGRAM) + sendto/recvfrom. No connection state, no framing needed (datagrams are atomic).
- Unix dgram:
socket(AF_UNIX, SOCK_DGRAM) + sendto/recvfrom. Similar to UDP but local-only.
- Named pipe:
mkfifo + open(O_RDONLY)/open(O_WRONLY) + read/write. Unidirectional, so round-trip requires two FIFOs.
Each would need both async (Tokio) and blocking implementations, following the existing transport pattern.
Scope
This could be split into three separate PRs (one per transport) or a single PR if the implementations are kept minimal. The blocking implementations are simpler and higher priority for latency benchmarking; async variants can follow.
Summary
rusty-comms currently supports UDS (stream), TCP, SHM, and PMQ. Three common Linux IPC mechanisms are missing:
These are significant gaps for comprehensive IPC mechanism comparison, particularly when comparing results against other benchmarking tools that include these transports.
Why These Matter
UDP: The baseline network-stack datagram transport. Comparing UDP loopback vs. Unix dgram isolates the cost of the IP/UDP header processing. UDP is also the foundation for many automotive middleware protocols.
Unix datagram: Provides atomic message delivery (no framing needed) with lower overhead than stream sockets. The current UDS implementation uses
SOCK_STREAM, which requires length-prefix framing and can deliver partial messages — a fundamentally different kernel path thanSOCK_DGRAM.Named pipes (FIFO): The simplest kernel-mediated IPC primitive. Pipes have different buffering semantics than sockets (configurable via
F_SETPIPE_SZ) and are commonly used in embedded systems for signal-like communication.Implementation Notes
All three transports are straightforward to implement using existing
libcbindings:socket(AF_INET, SOCK_DGRAM)+sendto/recvfrom. No connection state, no framing needed (datagrams are atomic).socket(AF_UNIX, SOCK_DGRAM)+sendto/recvfrom. Similar to UDP but local-only.mkfifo+open(O_RDONLY)/open(O_WRONLY)+read/write. Unidirectional, so round-trip requires two FIFOs.Each would need both async (Tokio) and blocking implementations, following the existing transport pattern.
Scope
This could be split into three separate PRs (one per transport) or a single PR if the implementations are kept minimal. The blocking implementations are simpler and higher priority for latency benchmarking; async variants can follow.