On Mon, Feb 9, 2009 at 1:13 PM, Paul Carey <[email protected]> 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 easy. Docs as state machines also works well in a multi-master environment, where you want to watch for "events" to be replicated to redundant storage. -- Chris Anderson http://jchris.mfdz.com
