I’m evaluating Datomic Cloud as an alternative to a relational database we’re
using in one of our applications. The current approach is presenting us with
challenges that I think Datomic will solve quite neatly.
At the heart of the application is a dynamic queue: query the database for a
set of items and assign those items to a user. It’s important to prevent
items from being assigned more than once.
Our current approach runs both a query and insert in a DB transaction. This
is easy enough to do in the application code, but to do the same in Datomic
Cloud it looks like I’d have to deploy the code and run the query in a
transaction function. I’m a little nervous about this because the query is
potentially quite complex, and will eventually rely on inputs to control its
Are transaction functions the right tool to use here, or is
there another way? If they are, is there a way to easily test complex transaction
functions without having to deploy on each change?