Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Clojure STM differ from Haskell STM?

I am trying to find the differences between what Clojure calls an STM and what is implemented in Haskell as STM. Taking the actual language semantic differences aside I am a little confused as Rich Hickey says in his speech that Clojure's implementation of STM is very different from anything else out there, but I don't understand the differences apart from the language choice.

like image 542
yazz.com Avatar asked Dec 30 '10 06:12

yazz.com


1 Answers

Clojure STM has 3 big unique features:

  1. Implements MVCC snapshot avoiding transactions restarts on read invalidation.
  2. Ensures references on read-writes provides a kind of manual control over resource acquisition order.
  3. Has explicit commute which reduces retries on commutative writes.
like image 98
william gouvea Avatar answered Sep 29 '22 17:09

william gouvea