couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Multi doc transactions
Date Mon, 09 Feb 2009 21:20:22 GMT
On Mon, Feb 9, 2009 at 1:13 PM, Paul Carey <> wrote:
> An extension to ii) to ensure consistency would be
> 1. save the booking doc with a state property set to "incomplete"
> 2. if the booking doc save succeeds, use the bulk update to save the
> invites, and update the booking doc with state "complete".
> It's not very elegant, but I think it should work. I'd love to hear
> better solutions.

There's a lot of cool things you can do when you treat documents as
state machines. Also, getting a view of "complete" bookings will be

Docs as state machines also works well in a multi-master environment,
where you want to watch for "events" to be replicated to redundant

Chris Anderson

View raw message