4 ms·
I'm sorry about the code quality, I never got around to refactoring it, I was just trying to get it to work safely and reliably. Without any money destruction o
by samsquire 4y ago
I'm sorry about the code quality, I never got around to refactoring it, I was just trying to get it to work safely and reliably. Without any money destruction or creation.
Checkout MVCC.java and TransactionC.java for multiversion concurrency control. It's far easier to understand.
It takes less code to implement multiversion concurrency control.
Software transactional memory is great and I like it but it can have scalability problems.
I really enjoyed Joe Duffy's blog series on Midori, the Microsoft .NET software transactional memory implementation.
http://joeduffyblog.com/2015/11/03/blogging-about-midori/ http://joeduffyblog.com/2015/11/03/blogging-about-midori/
STM essentially can get transpiled into a for loop modifying a log area and then a CAS instruction to the actual memory.
STM can be thought of as multiversion concurrency control because the operations occur on a log.
But the problem is that most things are not transactional. How do you reverse an API call?