Fork me on GitHub

@brnbraga95 You make updates using database functions. For example if you had a like counter you would read the current like count, increment its value and then set the new value. During the time that you read the value, 10 other clients may have as well and they all right the outdated value plus 1. That means you’re not guaranteed to get all 10 increments. If you use a database function though, you are asking datomic to stop processing any new transactions for a sec. During this time you read the like count, increment it and transact it. If 10 clients try to do this at the same time the must wait their turn as there is only one write transactor and it will only process one transaction at a time.


correct me if I am wrong but, is not that just a lock?


Take a look at to see what (I believe) Caleb means by > You make updates using database functions


@brnbraga95 no lock is needed. Datomic is a single writer system, so there is nobody else to lock out