The Slotted Counter Pattern (2020)

by eatonphilon 2/4/2025, 5:56 PMwith 21 comments

by oftenwrongon 2/4/2025, 7:31 PM

This is similar to how java.util.concurrent.atomic.LongAdder works:

https://github.com/openjdk/jdk/blob/master/src/java.base/sha...

by hassleblad23on 2/4/2025, 7:17 PM

Are there are any other approaches for this problem? Seems like there should be.

by whirlwinon 2/4/2025, 6:39 PM

It's an interesting approach. In similar cases has anyone got experience using a database more optimized on writes, e.g. Cassandra?

by eatenfillon 2/4/2025, 8:08 PM

phillip it's called lock striping