micro-analytics / micro-analytics-cli

Public analytics as a Node.js microservice. No sysadmin experience required! 📈
MIT License
734 stars 39 forks source link

Should the atomicity be part of the adapter? #20

Open mxstbr opened 7 years ago

mxstbr commented 7 years ago

I don't know how many databases support atomic operations, but it might make sense to move the atomicity requirement to the adapters. That way if a database supports atomic operations the core doesn't do any unnecessary work.

This probably depends quite highly on #19, as this is hard to write and prove without a good test suite if the database does not have atomic operations. We could also provide a wrapper to make generic, non-atomic put operations atomic to make that step easier.