Skip to content

[Architecture] Proposing a Snap-Backend for Sub-microsecond IPC Channels Body#152

Open
KunshrJain wants to merge 1 commit intoFlow-IPC:mainfrom
KunshrJain:snap-integration
Open

[Architecture] Proposing a Snap-Backend for Sub-microsecond IPC Channels Body#152
KunshrJain wants to merge 1 commit intoFlow-IPC:mainfrom
KunshrJain:snap-integration

Conversation

@KunshrJain
Copy link
Copy Markdown

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.

@ygoldfeld
Copy link
Copy Markdown
Contributor

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?

@KunshrJain
Copy link
Copy Markdown
Author

Hello,
Ill complete the changes as per required
Make it cleaner and also leave a good explanation for the Integration and under-the-hood working.
Ill make the changes and get back to you

@KunshrJain
Copy link
Copy Markdown
Author

"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.
Now i made more changes and the latest is in https://github.com/KunshrJain/open-source-ipc branch v2

Thank you, awaiting for your response and feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants