syncbuf
dashmap
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
syncbuf
-
Is this code sound for concurrent use?
I was trying to do something similar a little while back and ended up writing the Synclist type in Syncbuf. This has the tradeoff that the elements are spread across non-contiguous chunks, so it can't be sliced. But it has the advantage of being able to contain any type, memory usage is monotonic, and "reallocation" is much cheaper since nothing is copied.
-
Noteworthy concurrent data structures?
Since you asked, my little project in this area has been Syncbuf: https://github.com/bplevin36/syncbuf. It has 2 lock-free concurrent buffer types that are low-overhead by being append-only.
-
What's everyone working on this week (7/2021)?
I was writing a toy virtual machine when I realized that in order to make it multi-threaded, it would be very helpful to maintain a global symbol table that allowed adding new symbols without invalidating references to old ones. No such thing appeared to exist yet, so I wrote it: https://github.com/bplevin36/syncbuf
dashmap
- StupidAlloc: what if memory allocation was bad actually
-
dashmap VS scalable-concurrent-containers - a user suggested alternative
2 projects | 13 Apr 2023
-
Samsara, a safe Rust concurrent cycle collector
The problem is, every single one of these half-dozen crates has at least one known major issue (including UAF), exactly like C++ implementations (which isn't surprising since it's the kind of things where the ownership isn't clear and then the borrow checker can't help us).
-
Rust vs Go
Deadlocks and leaks are easy as other languages.
-
Shared mutable state is bad... so how do I create a global cache in a multi-threaded app?
Have you considered https://github.com/xacrimon/dashmap ?
-
Announcing Leapfrog, a faster concurrent HashMap
Dashmap made some api changes compared to the stdlibs hashmap, which leads to some oddities, as highlighted here: https://github.com/xacrimon/dashmap/issues/175
-
Writing a concurrent LRU cache
Some additional notes are in this slide deck and the implementation javadoc. You'd probably want to use something like DashMap for the hash table.
-
HashMap-based cache for async programs
You can look at existing concurrent maps like Dashmap https://github.com/xacrimon/dashmap or Cashmap https://gitlab.redox-os.org/redox-os/chashmap
-
How does one avoid lock of locks? or use the technique of latch crabbing of databases
Also dashmap
-
Noteworthy concurrent data structures?
The only one I've used is Dashmap, it's a concurrent interior-mutability hashmap. Very convenient crate in the case you need that.
What are some alternatives?
im-rs - Assorted immutable collection datatypes for Rust
hashbrown - Rust port of Google's SwissTable hash map
math_lang - in progress pretty printing calculator language [Moved to: https://github.com/mkhan45/CalcuLaTeX]
moka - A high performance concurrent caching library for Rust
panamax - Mirror rustup and crates.io repositories, for offline Rust and cargo usage. [Moved to: https://github.com/panamax-rs/panamax]
HashMap - An open addressing linear probing hash table, tuned for delete heavy workloads
cacao - Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
crossbeam - Tools for concurrent programming in Rust
magic-wormhole.rs - Rust implementation of Magic Wormhole, with new features and enhancements
leapfrog - Lock-free concurrent and single-threaded hash map implementations using Leapfrog probing. Currently the highest performance concurrent HashMap in Rust for certain use cases.
concurrent - A crate with some concurrent data structures.
megahash - A super-fast C++ hash table with Node.js wrapper, tested up to 1 billion keys.