Buffer Interprocess Sharing - v0.1.0
Buffer Interprocess Sharing! Buffer Interprocess Sharing.
|
| |||||||||||||||||||||
Buffer Interprocess Sharing | ||||||||||||||||||||||
This wiki is a user guide for our Buffer Interprocess Sharing project. What is Buffer Interprocess Sharing?Buffer Interprocess Sharing, or BIPS, is RidgeRun's optimized IPC library fully compatible with C++ and Python. In this case, BIPS allows sharing of data buffers between two or more processes with zero copy. They can be classified as Producers or Consumers according to their role in the system. The producer is responsible for generating and filling in the information on the buffers that the Consumers will read. The synchronization between these entities is handled by the Signaler, which ensures that all operations are concurrent-safe. This means that Consumers can only read buffers that are fully written by Producers and that Producers can only write buffers already read by Producers. These buffers are created and managed by a shared structure known as the Buffer Pool, which has a fixed capacity. The Signaler handles the synchronization between the BP and the Consumers/Producers. | ||||||||||||||||||||||
Use casesWondering how and when to use BIPS? BIPS is a solution to exchange memory buffers between two isolated processes with zero copies without requiring additional processes. You can find BIPS in the following use cases:
BIPS allows communication between C++ and Python back and forth. A particular case is using a GStreamer capture application that requires transmitting the frames captured by a camera to a PyTorch-based Python application. From C++, you can define an agnostic memory buffer to submit it through BIPS and receive it by a Python application using the Buffer Protocol. Python can handle these buffers in an agnostic fashion or cast them to NumPy straight-forward without any memory copy.
BIPS allows zero-copy communication between applications isolated through containers. This makes BIPS a friend in your applications based on microservices without requiring any other container or process for the data exchange. TensorFlow, the TensorFlow logo, and any related marks are trademarks of Google Inc. PyTorch, the PyTorch logo and any related marks are trademarks of The Linux Foundation. SciPy is developed in the open on GitHub, through the consensus of the SciPy and wider scientific Python community. The Python logo is a trademark of the Python Software Foundation For testing purposes, RidgeRun offers an evaluation version. Please refer to Contact Us. Supported BackendsBIPS is used to communicate processes that need to share information, which helps optimize memory usage and application performance. BIPS supports:
The backend is responsible for allocating the pool of buffers with a fixed size, which will be known before processing. This is to avoid expensive allocation and free operations at runtime and to avoid memory fragmentation. Shared Memory is a standard way to communicate data between processes (IPC - Inter Process Communication, see the diagram below). In this methodology, data is allocated in a commonplace. So, when any process updates some value in the shared zone, the other processes can see the updated value immediately. BIPS shared memory implementation is based on the POSIX Shared Memory (shm) to offer great compatibility.
Tested PlatformsSince BIPS is based on POSIX, it is compatible with POSIX-complaint systems. We have tested it on:
| ||||||||||||||||||||||
RidgeRun Support | ||||||||||||||||||||||
RidgeRun provides support for embedded Linux development for NVIDIA, Xilinx, Freescale/NXP, and Texas Instruments platforms, specializing in multimedia applications. This page contains detailed guides and information on how to get started with Buffer Interprocess Sharing and start using its full capabilities. To get up-to-speed with your Buffer Interprocess Sharing, start by clicking below:
For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.
Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.
|