I'd be very careful with id-based idempotency. Lot's of Sue's out
there (ask Johnny Cash). Both natural and technical idempotency have
their place. Choose wisely, or pick both.
On 25 jul, 20:29, Bryan Hunter <
bryan.hun...@fireflylogic.com> wrote:
> Yep, and client generation can also help with idempotence. If the command
> CreateCustomer{Id={guidhere},Name="Sue"} is sent (or delivered) multiple
> times, it is pretty simple and safe to interpret the intent as "*Not sure if
> I told you already, but please create a single customer named Sue*". Without
> a client-generated id, the intent would be ambiguous.
>
> -Bryan
>
> On Sat, Jul 23, 2011 at 4:58 AM, Udi Dahan <
thesoftwaresimpl...@gmail.com>wrote:
>
>
>
>
>
> > There is a big benefit in client-generated IDs in that it allows
> > clients to send follow-on commands without waiting for a response from
> > the server:
>
> > CreateParent { ParentID = parentGuid, /* other info */ }
> > CreateChild { ChildID = childGuid, ParentID = parentGuid, /* other
> > info */ }
>
> > Cheers,
>
> > Udi
>
> > On Jul 22, 7:37 pm, Rod Johnson <
rod.john...@wcpro.com> wrote:
> > > Is it a best practice to let the Domain object determine it's
> > > aggregate ID in the constructor or to let the client pass in a new
> > > guid? One of the benefits I see to letting the client do it, is that
> > > it knows exactly what object "Should" be in the database after the
> > > command has been sent. Thoughts?
>
> --
>
> <
http://www.fireflylogic.com>Firefly Logic, Inc. // Partner & Senior
> @bryan_hunter<
http://twitter.com/#!/bryan_hunter>