Clojure-mvcc-demo is a project mainly written in Clojure, it's free.
This is a small demo that shows MVCC/STM in Clojure at work.
Essentiall, a counter is incremented and decremented (or the other way round).
Here is a possible output:
--> increment has been invoked
--> increment reads the current value
--> decrement has been invoked
--> decrement reads the current value
--> decrementing now
--> decrementing done
--> incrementing now
--> increment reads the current value
--> incrementing now
--> incrementing done
final counter: 0
last operation: incremented
Note that
--> increment reads the current value
--> incrementing now
appears twice, this due to the transaction.
Get leiningen and invoke lein uberjar
.
java -jar mvcc-1.0.0-SNAPSHOT-standalone.jar