_dky
Joined 1 year ago
Joined 1 year ago
RW lock could be implemented using an array of length equal to slots and proper padding to ensure each slot is in its own face line (avoid invalidating CPU cache when different slot is read/written).
For read lock: Each task acquires the lock for their slot.
For write lock: Acquire lock from left most slot to right. Writes can starve readers when they block on in-flight reader at a different slot when moving from left to right.
I do not know how Rust RW locks are implemented.
https://github.com/mechanicker/cramp
Later in ~2011, used BDB for indexing filesystem metadata at a large storage vendor for enhancing data management in a storage cluster.
Clean API with language bindings makes it easy to integrate with different languages.
What other differentiating factors can you implement that can steer the masses from one messaging platform to the other. I cannot think of any.
Guess Java does that, not much experience in Java here.