InterProcessPyObjects - Fast IPC. Share and modify Python objects across processes using shared memory.

Fast IPC. Share and modify Python objects across processes using shared memory.

https://github.com/FI-Mihej/InterProcessPyObjects

https://pypi.org/project/InterProcessPyObjects

Throughput GiB/s

Dict performance comparison

This high-performance package delivers blazing-fast inter-process communication through shared memory, enabling Python objects to be shared across processes with exceptional efficiency. By minimizing the need for frequent serialization-deserialization, it enhances overall speed and responsiveness. The package offers a comprehensive suite of functionalities designed to support a diverse array of Python types and facilitate asynchronous IPC, optimizing performance for demanding applications.

Comparison With "multiprocessing.shared_memory"

While both "InterProcessPyObjects" and "multiprocessing.shared_memory" facilitate inter-process communication, there are several key differences to note. Unlike "multiprocessing.shared_memory", "InterProcessPyObjects" offers the following enhancements:

  • High-Performance Mutable Objects: Both connected processes can modify shared objects at runtime, and these changes are immediately reflected on the other side. This feature not only increases flexibility but also delivers exceptional performance, with the capability to handle up to several million changes per second.
  • Synchronization Features: Ensures that operations are thread-safe and data integrity is maintained across processes.
  • Message Queue: Integrates a system for queuing messages, making communication between processes more structured and reliable.
  • Extended Type Support: Supports a broad range of data types, including custom classes, which goes beyond the basic types typically handled by multiprocessing.shared_memory.

These features make InterProcessPyObjects a more robust option for developers requiring advanced inter-process communication capabilities.

API State

Stable. Guaranteed to not have braking changes in the future.

License

Licensed under the Apache License, Version 2.0.