Re: computational model of transactions




"Erwin" <e.smout@xxxxxxxxxxx> wrote in message
news:1154677918.807478.221990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Let's say that you're account starts out with a balance of $550.

At time T1 a transaction is started to post a check for $500.
At time T2 a transaction is started to post a check for $100.
At time T3 a transaction is started to post a check for $75.
At time T4 the $100 transaction completes, recording a balance of $450.
At time T5 the $75 transaction completes, recording a balance of $375.
At time T6 the $500 transaction completes, recording a balance of $-125.

The error is that these transactions are "allowed to run concurrently".

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.

No two things can be in the same place at the same time.




.



Relevant Pages

  • Re: computational model of transactions
    ... updating the same resource, that those updates must be serialized. ... within each transaction can occur simultaneously, so serializing each entire ...
    (comp.databases.theory)
  • Re: Right use for JTA transactions?
    ... Having done an XAResource for a DBMS, I might be able to offer ... The resource does the proper processing when called from the container software. ... The resource initiates its transaction ... For JDBC, it would do executeXXX, etc. on statements using the Connection ...
    (comp.lang.java.programmer)
  • Re: C# transactions v SQL transactions
    ... your transaction, process, assembly, etc, etc boundaries). ... This is a single processor machine, hosting SQL server, COM+ ... > when you take the database-transaction away from the database and you make ... >> you have the resource itself determine its transaction state, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: computational model of transactions
    ... Since each of them wants to update the very same resource (the same ... within each transaction can occur simultaneously, so serializing each entire ... about the race condition, whatever the logical model. ...
    (comp.databases.theory)
  • Re: C# transactions v SQL transactions
    ... have the resource itself determine its transaction state, ... resource into larger-scale transactions. ... never write a stored procedure that has transaction management code in it. ... >> transaction state, you need a way to abort ...
    (microsoft.public.dotnet.languages.csharp)