Re: computational model of transactions




"Erwin" <e.smout@xxxxxxxxxxx> wrote in message
news:1154689817.830401.130180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
It is not always the case that if more than one actor is
updating the same resource, that those updates must be serialized.

I leave that one on your account.

To illustrate this, ignore the business rules in the above example.

Ignoring business rules is not my idea of a good example. And
especially not this kind of example, since I've been a bank programmer
for 15 years. I can assure you no one in the bank business would
accept the kind of risky manipulations with account balances that you
propose.

The semantics of the update involve modification, not replacement

You obviously see a difference between modification and replacement. I
don't. So please explain.


If Rummy says that he's going to increase the troop levels in Baghdad, that
doesn't mean that he's going to replace all of the troops there, just that
additional troops will be sent.

It all comes down to whether the result of the operation depends on the
current value and whether the operation is atomic.

X += 5 is different from X = 10 even if X == 5.

X += 5 translates to something like:
ADD [EBP + 24], 5
which modifies the memory location in place in a single instruction;
whereas X = 10 translates to:
MOV [EBP + 24], 10
which just replaces the value at that memory location.

the operation
involved, addition, is communitive and associative.

You mean "commuTAtive", of course, and furthermore that's completely
irrelevant. As for associativity : it is important to observe that
each transaction in this example does exactly one addition with exactly
two arguments. So unless you can think of a way for the system to
detect that multiple independent transactions are doing such a thing
(performing an associative operation), and then replace those multiple
independent operations with one single, transaction-surpassing,
operation that has the same result, associativity is also irrelevant.
If you cannot think of such a way for the system to detect this (I'm in
that case), you're stuck with doing multiple additions one-at-a-time,
and you're stuck with the fact that for the additions that are executed
second and third, one of those arguments should be the result of the
former. Therefore it is necessary that the transactions be serialized.
Otherwise it would mean a transaction is allowed to see uncommitted
results from another one.


I really want to address this, but I'm going to be late for work, so I'll
have to address it in a later post.


.



Relevant Pages

  • Re: computational model of transactions
    ... I leave that one on your account. ... Ignoring business rules is not my idea of a good example. ... operation that has the same result, associativity is also irrelevant. ... Otherwise it would mean a transaction is allowed to see uncommitted ...
    (comp.databases.theory)
  • Re: computational model of transactions
    ... I leave that one on your account. ... Ignoring business rules is not my idea of a good example. ... operation that has the same result, associativity is also irrelevant. ... Otherwise it would mean a transaction is allowed to see uncommitted ...
    (comp.databases.theory)
  • Re: computational model of transactions
    ... Ignoring business rules is not my idea of a good example. ... operation that has the same result, associativity is also irrelevant. ... Otherwise it would mean a transaction is allowed to see uncommitted ... it necessary to serialize, since the update modifies the value that is ...
    (comp.databases.theory)
  • Re: New Method for Authenticated Public Key Exchange without Digital Certificates
    ... have the account disabled. ... then the next time you do a financial transaction ... ... eventually arrives at your financial institution ... ... in order to do credit card transactions, the merchant has to ...
    (sci.crypt)
  • Re: ComboBox Problem... Please, help me out!
    ... and tblTransDtl (transaction detail). ... You also have tables for SheetRegister and Account. ... Every sheet belongs to an only single ...
    (microsoft.public.access.formscoding)