mpmc-map

Crates.iompmc-map
lib.rsmpmc-map
version0.2.0
sourcesrc
created_at2021-04-29 00:00:12.529682
updated_at2021-05-04 14:35:02.175977
descriptionMpmc async map implementation for highly concurrent low-write access
homepage
repositoryhttps://github.com/Protryon/mpmc-map
max_upload_size
id390812
size10,007
Max Bruce (Protryon)

documentation

README

mpmc-map

Purpose

This crate provides a rapidly-eventually-consistent multi-producer multi-consumer map. It's intended for high read low write environments.

Design

MpmcMap is backed by an arc-swap of im::HashMap. We use an actor model to receive events through an tokio::sync::mpsc channel to an updater task that will apply updates and update the inner map.

When you should not use this crate

This crate will have high overhead in high-write environments. Look for a debounced eventually consistent map implementation, perhaps evmap, if you have lots of writes.

Or of course, submit a PR to add that functionality here!

Commit count: 8

cargo fmt