[Architecture] Proposing a Snap-Backend for Sub-microsecond IPC Channels Body#152
[Architecture] Proposing a Snap-Backend for Sub-microsecond IPC Channels Body#152KunshrJain wants to merge 1 commit intoFlow-IPC:mainfrom
Conversation
|
Hi there. I see you! I've only glanced for the moment, and I am certainly interested in the substance of what this is doing. However just at a surface level, this PR seems to include the build directory with generated object files and such. Perhaps a cleaner approach? |
|
Hello, |
|
"Hey! I took your feedback and did a major cleanup. I stripped away all the Windows-specific parts and replaced them with standard, high-performance Linux code. I also cleaned up the repo—no more binaries or build files in the submission, thanks to a much better .gitignore. Snap is a lean, ultra-fast bridge that focuses purey on moving data with zero extra 'weight.' It’s designed to be the fastest possible way to send a message between two points on Linux. Under the hood, Snap sets up a small 'shared memory window' that both processes can see. Instead of asking the OS to move data (which is slow), Snap just writes it to that memory and uses a high-speed loop to detect new messages instantly. It’s basically a direct, zero-copy wire between the CPUs. Traditional IPC uses standard OS-based operations (like read/write sockets). Snap replaces those with a direct Shared Memory segment and throws away the slow 'notifications' in favor of high-speed polling. This is how we get latency down to nanoseconds, not milliseconds." There also exists a snapintegrations.md that explains more about the change and integrations. Thank you, awaiting for your response and feedback |
The Problem
Flow-IPC provides enterprise-grade abstractions but can benefit from a specialized "Zero-Bypass" backend for ultra-low latency scenarios.
The Solution
Implemented a new Snap transport backend:
snap_shm_transport: A backend that natively implements the
Blob_sender
and
Blob_receiver
concepts using Snap v3.0.
Performance: Provides a direct path for zero-copy message exchange that bypasses the kernel's message queue logic.
Benefit
Enables the highest possible performance for Flow-IPC channels on local hosts.