Imperative containers are well-explored by C++'s std, and declarative containers by Okasaki's "Purely Functional Data Structures". But there's very little on transactional containers, and they prove to be a rich and nuanced topic given the goal of minimizing false dependencies.
-
-
So, using C++ std::vector on top of low-level STM would introduce false dependencies, and a Haskell TVar[t] even more so.
-
But that's where you would have a vector of TVars rather tham a TVar of a vector. You need to analyze your use case and optimize your design. I wonder if there's a general pattern here, eg everything is a TVar, similar to how in Haskell normally everything is boxed.
End of conversation
New conversation -
-
-
CRDTs from db land seem applicable here: they aim to provide availability by making operations monotonic, but really it's all about avoiding contention from synchronisation.
-
CRDTs provide a sort auto-merge function ("commutator"?) that can applied to otherwise-conflicting transactions on certain datatypes.
- 2 more replies
New conversation -
-
-
Makes sense. I imagine existing db techniques would apply but would benefit from tweaks to better fit the hardware.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.