wvwwvwwv / scalable-concurrent-containers

High performance containers and utilities for concurrent and asynchronous programming
Apache License 2.0
285 stars 14 forks source link

Example question #137

Closed NathanielPrescott closed 3 months ago

NathanielPrescott commented 3 months ago

Hello,

I was just wondering if you knew about any other projects that are utilizing the different containers / utilities you've built here? I was looking for some examples of things like the HashMap, HashIndex, and HashCache in action.

Thanks, Nathan

novacrazy commented 3 months ago

I use scc extensively within the Lantern Chat project. Been following scc for years and it's really quality. The lock-free peek method on HashIndex is especially awesome. Even TreeIndex is used in my code.

Have not used HashCache yet despite actually being the one to request an LRU-like map, so oops. What was implemented ended up not being exactly appropriate for my use cases. However, I'm definitely looking for places where I can use it.

There's nothing else out there like scc and it's pretty much my go-to for concurrent structures. There have been multiple times where I've considered something like sled or rocksdb for in-memory stuff but then realized, "Oh, scc can do that way simpler and probably faster, plus async if needed."

wvwwvwwv commented 3 months ago

@novacrazy unfortunately, implementing a real sampling-based LRU was almost impossible with the existing HashMap data structure - the algorithm will be more suited for open-addressing hash tables, e.g., hop-scotch or robin hood hashing :-( maybe I'll revisit this later!

@NathanielPrescott no, I don't, but just note that it started as a side project at a pretty big tech company, and I presume that they are still using the code.

NathanielPrescott commented 3 months ago

Sounds good, thank you both for responding!