STM in Clojure

 Transactional memory in Clojure is implemented using Multiversion Concurrency Control protocol

http://en.wikipedia.org/wiki/Transactional_memory

http://en.wikipedia.org/wiki/Multiversion_concurrency_control

MVCC is the concurrency protocol used in many mainstream database systems including Oracle, Sybase, PostgreSQL, IBM DB2, Microsoft SQL Server, and MySQL/InnoDB.


"write skew anomaly" can happen in case of MVCC because MVCC makes a copy of the isolated transaction status, see http://en.wikipedia.org/wiki/Snapshot_isolation for a good example, and also http://www.blogjava.net/killme2008/archive/2010/08/archive/2010/07/archive/2010/07/archive/2010/07/17/326362.html

good articles on Agent implementation in Clojure:

http://www.blogjava.net/killme2008/archive/2010/07/archive/2010/07/19/326540.html

http://www.blogjava.net/killme2008/archive/2010/07/30/327606.html

原文地址:https://www.cnblogs.com/qsort/p/3776555.html