6 ms·
I am always interested in Datomic's approach. How can you build a simple thread-safe counter with it? If you do it in a time-series db fashion, there will soon
by est 13y ago
I am always interested in Datomic's approach. How can you build a simple thread-safe counter with it?
If you do it in a time-series db fashion, there will soon be too many facts to count.
- vmind 13y agoYou can define functions inside the database and then use them inside a transaction [1] so that you can get atomic update, if that's the question. You can also mark attributes as noHistory [2] if you don't care about the past state. [1] http://docs.datomic.com/database-functions.html http://docs.datomic.com/database-functions.html [2] http://docs.datomic.com/schema.html http://docs.datomic.com/schema.html
- sethev 13y agoFrom the FAQ (http://www.datomic.com/faq.html http://www.datomic.com/faq.html): When is Datomic not a good fit? Datomic is not a good fit if you need unlimited write scalability, or have data with a high update churn rate (e.g. counters). And, at present, Datomic does not have support for BLOBs.