Transactions - notihnio/PowerDNS-API GitHub Wiki

Transactions

In the future it might be practical to have the API by default just save changes to a working/staging area and then have a "commit" call to push the data (atomically) to the real database.

The real database is a set of plain MySQL tables. If we were building a concept of transactions on top of this, it'd probably be easiest to store the "pending data" in a simpler data store (just in memory, MongoDB, big JSON object, ...).

GET requests would just have to have the pending data pushed on top of the data fetched from MySQL. POST and PUT would require a (correct) transaction ID and just go to the pending area.

Each domain should probably only be able to have one transaction in flight and a transaction can't span domains.