The idea of โโa "transaction" in transactional software memory is clearly borrowed from databases. The difference is where the transactions are implemented and how they are used.
STM is a concept of the language level: the sequence of operations does not take effect until the transaction is completed. This usually means that the values โโof some global / shared variables only change when a transaction is successful. The property is executed at runtime. There is no inherent concept of durability: the variables involved in a transaction can be purely dynamic (for example, the size of the work queue).
Database operations are a concept of the application level: the sequence of operations with data does not take effect until the transaction. Since this is a database, persistence is fundamental: the meaning of "take effect" inside the database is that the data is stored in some kind of persistent storage.
You can use database and database transactions to implement the STM-style algorithm, but you will lose the ease and convenience (and probably, in most cases, performance) of the implementation at the language level.
Chris conway
source share