home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.theory
- Path: sparky!uunet!psinntp!spunky!jfr
- From: jfr@redbrick.com (Jon Rosen)
- Subject: Re: Optimistic Concurrency Control
- Message-ID: <1992Aug12.162027.18142@redbrick.com>
- Organization: Red Brick Systems, Los Gatos, CA
- References: <DAVIDM.92Aug10113706@consilium.com> <1992Aug11.050133.23420@redbrick.com> <Bsu6u4.3vr@wpi.WPI.EDU>
- Date: Wed, 12 Aug 1992 16:20:27 GMT
- Lines: 49
-
- In article <Bsu6u4.3vr@wpi.WPI.EDU> rcarter@wpi.WPI.EDU (Randolph Carter <Joseph H. Allen>) writes:
- >jfr@redbrick.com (Jon Rosen) writes:
- >>In article <DAVIDM.92Aug10113706@consilium.com> davidm@consilium.com (David S. Masterson) writes:
- >>>>>>>> On 9 Aug 92 20:52:20 GMT, davidw@cascade.demon.co.uk (David Wilkinson)
- >>>>>>>> said:
- >>>> Does anyone know of any references about optimistic concurrency control in
- >>>> distributed database systems? I've read lots about the theory, but would
- >>>> like to know how it works out in practice.
- >
- >>>We used optimistic locking in our system in order to prevent locking the
- >>>database while a human-speed transaction was going on.
- >
- >> We are investigating optimistic concurrency as a form of locking for
- >> our relational query database management system
- >
- >Does (can) the application program itself retry when rollback occures? I'm
- >curious about the implication to users in systems where transactions fail
- >and must be retried. I know this is a standard technique in RDMS, but I can
- >think of examples of systems where this is unacceptable. So I'm just
- >wondering if applications which use databases with modern concurrency
- >control techniques are written to attempt retries themselves or if they
- >usually abort all the way back to the user. The textbooks I've read imply
- >that they abort all the way back to the user (that they have to "resubmit"
- >the transaction). Perhaps they abort all they back to the user but remember
- >the data entered in the transacation so that the user only has to hit a
- >retry key?
-
- Of course, that all depends on the application. First of all, any
- reasonable SQL application (I am assuming SQL here but other data
- access languages would be included as well) must be prepared for
- any statement to fail for a number of reasons. In some cases, the
- application may be able to determine that it is possible to retry
- the transaction. In others, it will be necessary to alert the user.
- This depends on what the transaction is doing. For instance, in an
- ATM application, if the transaction aborted because the balance
- record had been updated by another transaction between the first
- transaction's read and its attempted update, this could be a pretty
- serious situation if you don't alert the "user" (i.e., customer -
- maybe s/he doesn't want to withdraw money if s/he found out the
- actual balance was lower than expected). And of course, it could
- depend on what the other transaction was. If it was a deposit,
- there might be no need to alert the customer before permitting the
- transaction to be retried (in which case, it would probably succeed).
-
- I am not suggesting that OCC is a good thing to use in high-volume
- OLTP apps. In fact, my investigation shows the literature uniformly
- stating that OCC is best used in query-intensive low-volume OLTP apps.
-
- Jon Rosen
-