Process and update CouchDB data in atomic, all-or-nothing transactions