Re: computational model of transactions

From: Marshall <marshall.spight_at_gmail.com>
Date: 4 Aug 2006 08:02:45 -0700
Message-ID: <1154703765.917338.318510_at_m73g2000cwd.googlegroups.com>


Brian Selzer wrote:
> "Erwin" <e.smout_at_myonline.be> wrote in message
> >
> > Since each of them wants to update the very same resource (the same
> > attribute of the same tuple of the same relvar), these transactions
> > should be serialized anyway.
> >
>
> I disagree. It is not always the case that if more than one actor is
> updating the same resource, that those updates must be serialized. To
> illustrate this, ignore the business rules in the above example. The
> semantics of the update involve modification, not replacement, the operation
> involved, addition, is communitive and associative, and all of the updates
> in question have the same semantics; therefore, it is only important that
> the modifications be either disjoint or aggregated, but not necessarily
> serialized: the order in which the modifications occur is not important,
> since the end result is the same. In addition, only the operation on the
> shared resource need be disjoint, other operations involving other resources
> within each transaction can occur simultaneously, so serializing each entire
> transaction would be overkill.

This assumes the existence of an atomic addition operator; no such operator exists as far as I know. It is always read-add-write. Given that read and write occur at separate times, a race condition exists. *Something* has to be done about the race condition, whatever the logical model.

What you say above would make sense in the presence of an atomic "+=" operator a la C's +=. But it has to be atomic.

Marshall Received on Fri Aug 04 2006 - 17:02:45 CEST

Original text of this message