BIPS/BIPS Basics: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
 
mNo edit summary
 
Line 1: Line 1:
<seo title="BIPS/BIPS Basics | RidgeRun" titlemode="replace" metakeywords="GStreamer, NVIDIA, Jetson, TX1, TX2, Jetson AGX Xavier, Xavier, AI, Deep Learning, Machine Learning, Jetson TX1, Jetson TX2, Jetson Xavier, NVIDIA Jetson Xavier, NVIDIA Jetson Orin, Jetson Orin, Orin, NVIDIA Orin, NVIDIA Jetson AGX Orin, Jetson AGX Orin, Assembly Line, Assembly Line Activity, activity recognition, machine learning activity recognition, Exploratory Data Analysis, EDA" description="This RidgeRun wiki page provides more information on the RidgeRun Buffer Interprocess Sharing (BIPS) process."></seo>
<noinclude>
<noinclude>
{{BIPS/Head|previous=|next=Getting Started}}
{{BIPS/Head|previous=|next=Getting Started}}

Latest revision as of 19:33, 25 October 2024


  Index Next: Getting Started






Foundations

RidgeRun Buffer Interprocess Sharing (BIPS) is a library conceived to exchange buffers between processes, allowing exchanging buffers between C++ and Python applications, and among different containers. The key features of BIPS are:

  • Keeps synchronization between producers and consumers
  • Works with both C++ and Python
  • Interlanguage (C++ and Python) intercommunication
  • Docker containers intercommunication capability
  • Python NumPy buffers complaint
  • Compatible with the most popular Deep Learning frameworks: TensorFlow and PyTorch
  • Multiple consumers capability (buffer broadcasting)
  • Zero memory copy buffer exchange with a high exchange rate

The foundations of BIPS consist in having a producer process, which fills buffers with valid data, and one or more consumer processes, that receive the buffers and consume their contents.

BIPS Foundations
BIPS Foundations

Either the producers or the consumers can be in either C++ or Python.

Philosophy

RidgeRun Buffer Interprocess Sharing aims to be as simple as pulling and pushing a buffer, freeing the user from the complexity of synchronizing processes and handling concurrency hazards. Pulling a buffer implies requesting a buffer to fill / read data, and pushing implies returning the buffer for reading / or writing.

To illustrate this principle, please, see the following example:

import bips

producer = bips.Producer(bips.Backends.kShm, '/example', 10, 1024, True)

buffer = producer.Pull()
# Do processing
producer.Push(buffer)

same for the consumer:

import bips

consumer = bips.Consumer(bips.Backends.kShm, '/example', 10, 1024, True)

buffer = consumer.Pull()
# Do processing
consumer.Push(buffer)



  Index Next: Getting Started