# xacrimon/dashmap

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/xacrimon-dashmap).**

4,064 stars · 187 forks · Rust · MIT

## Links

- GitHub: https://github.com/xacrimon/dashmap
- awesome-repositories: https://awesome-repositories.com/repository/xacrimon-dashmap.md

## Topics

`concurrent` `concurrent-data-structure` `concurrent-map` `concurrent-programming` `data-structures` `hashmap` `hashtable`

## Description

DashMap is a concurrent hash map for Rust, providing a thread-safe associative array designed for high-performance multi-threaded access. It serves as a concurrent data structure that allows simultaneous reads and writes without requiring a global lock.

The project utilizes a sharded lock architecture to reduce thread contention, employing fine-grained locking at the shard level. It is a Serde-compatible map, implementing serialization and deserialization to convert map data to and from common formats.

The library covers capabilities for concurrent data storage, shared state management, and the implementation of thread-safe caches.

## Tags

### Data & Databases

- [Concurrent Map Implementations](https://awesome-repositories.com/f/data-databases/key-value-pair-managers/concurrent-map-implementations.md) — Provides a thread-safe concurrent map implementation optimized for high-concurrency read and write operations.
- [Hash Maps](https://awesome-repositories.com/f/data-databases/hash-maps.md) — Provides a high-performance hash map implementation for concurrent access.
- [Shard-Level Granularity](https://awesome-repositories.com/f/data-databases/acid-transactional-cores/concurrent-read-write-transactions/exclusive-write-access/read-write-lock-shared-data-protection/shard-level-granularity.md) — Employs fine-grained locking at the shard level to allow multiple simultaneous readers.
- [Thread-Safe Sharded Caches](https://awesome-repositories.com/f/data-databases/distributed-caching/distributed-data-caching-layers/thread-safe-sharded-caches.md) — Provides the underlying primitives necessary to build thread-safe sharded caches.

### Operating Systems & Systems Programming

- [Concurrent Rust Collections](https://awesome-repositories.com/f/operating-systems-systems-programming/concurrent-rust-collections.md) — Provides a high-performance, thread-safe associative array specifically for Rust.

### Programming Languages & Runtimes

- [Concurrent Data Structures](https://awesome-repositories.com/f/programming-languages-runtimes/concurrent-data-structures.md) — Implements a thread-safe concurrent map as a fundamental collection for multi-threaded environments.

### Software Engineering & Architecture

- [Concurrent State Management](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-state-management.md) — Maintains shared application state requiring fast, simultaneous read and write access from many threads.
- [Sharded Maps](https://awesome-repositories.com/f/software-engineering-architecture/producer-consumer-workflow-managers/lock-free-concurrent-queues/locking-optimizations/lock-striped-sharding/sharded-maps.md) — Uses a sharded lock architecture to divide the map into independent segments and reduce contention.
- [Shared Memory Stores with Thread Safety](https://awesome-repositories.com/f/software-engineering-architecture/shared-memory-management/shared-knowledge-graph-memory/shared-memory-stores-with-thread-safety.md) — Enables multiple threads to safely read and modify a common memory store without a global lock. ([source](https://cdn.jsdelivr.net/gh/xacrimon/dashmap@master/README.md))
- [Memory Bucket Distribution](https://awesome-repositories.com/f/software-engineering-architecture/hash-based-data-distribution/memory-bucket-distribution.md) — Implements hashed slot distribution to ensure constant time complexity for data retrieval.
- [Lock-Free Read Paths](https://awesome-repositories.com/f/software-engineering-architecture/producer-consumer-workflow-managers/lock-free-concurrent-queues/locking-optimizations/lock-striped-sharding/lock-free-read-paths.md) — Allows concurrent reads on shards without blocking other readers or writers.
