Expand description
mmap-sync is a high-performance, concurrent data access library for Rust. It is designed to handle data access between a single writer process and multiple reader processes efficiently using memory-mapped files, wait-free synchronization, and zero-copy deserialization.
§Features
-
Memory-mapped files: This allows different processes to access the same memory space, bypassing the need for costly serialization and deserialization. As a result,
mmap-syncprovides fast, low-overhead data sharing between processes. -
Wait-free synchronization: Inspired by Linux kernel’s Read-Copy-Update (RCU) pattern and the Left-Right concurrency control technique. Write access to the data is managed by a single writer, with multiple readers able to access the data concurrently.
-
Zero-copy deserialization: Leveraging the rkyv library,
mmap-syncachieves efficient data storage and retrieval. The templated typeTforSynchronizercan be any Rust struct implementing specifiedrkyvtraits.
To get started with mmap-sync, please see the examples provided.
Modules§
- guard
- The
guardmodule manages read access to shared memory, utilizing RAII (Resource Acquisition Is Initialization) principles to control access lifecycle. - instance
- locks
- Lock strategies.
- synchronizer
- The
synchronizermodule is the core component of themmap-synclibrary, providing aSynchronizerstruct for concurrent data access.