Is there any support for adding transactions to Dgraph?
I see the use cases as:
financial transactions
adding unique indexes (useful for user auth providers)
allocating stock to an order / decrementing stock levels
time scheduling
preventing inconsistent data
You could add this by applying conditions that need to pass before applying a mutation - i.e. only apply a mutation if the following assertions are met.
To do transactions, we’ll have to do distributed transactions, given the fact that Dgraph is a distributed system. And doing distributed txns is a hard problem, that we don’t want to solve at the moment.
For most applications, atomic consistency and durability, that we provide should be sufficient. Dgraph won’t be suited for financial transactions, that’s true.