Content deleted Content added
m Reverting possible vandalism by 168.99.142.100 to version by 62.178.23.32. False positive? Report it. Thanks, ClueBot. (570082) (Bot) |
References added & small modifications done. |
||
Line 1:
In [[computer science]], in the field of [[database]]s, '''optimistic concurrency control'''
▲In [[computer science]], in the field of [[database]]s, '''optimistic concurrency control''', (OCC) is a [[concurrency control]] method used in [[relational database]]s without using [[Lock (computer science)|lock]]ing. It is commonly referred to as '''optimistic locking''', a reference to the non-exclusive locks that are created on the database.
Optimistic concurrency control is based on the assumption that most [[database transaction]]s don't conflict with other transactions, allowing OCC to be as permissive as possible in allowing transactions to execute.
Line 9 ⟶ 7:
<ol>
<li>'''Read''': The client reads values from the database, storing them to a private sandbox or cache that the client can then edit.</li>
<li>'''Validate''': When the client has completed editing of the values in its sandbox or cache, it initiates the storage of the changes back to the database.
* already-committed transactions in the case of ''backward [[validation
* currently executing transactions in the case of ''forward validation schemes''.
If a conflict exists, a conflict resolution algorithm must be used to resolve the conflict somehow (ideally by minimizing the number of changes made by the user) or, as a last resort, the entire transaction can be aborted (resulting in the loss of all changes made by the user).
Line 17 ⟶ 15:
</ol>
Optimistic concurrency is generally used in environments with a low contention for data.
==Web usage==
Line 28 ⟶ 26:
* [[MediaWiki]]'s edit pages use OCC. The conflict resolution algorithm is described [[w:Help:Edit conflict|here]].<!-- Use interwiki syntax so that mirrors can at least have a chance to pick it up -->
* [[Bugzilla]] uses OCC; conflicts are called "mid-air collisions".
* The [[Ruby on Rails]] framework has an API for OCC. [http://api.rubyonrails.com/classes/ActiveRecord/Locking.html]
* Most [[revision control]] systems support the "merge" model for concurrency, which is OCC.
==References==
<
*{{cite journal|title=On optimistic methods for concurrency control|journal=ACM Transactions on Database Systems|date=June 1981|first=H. T.|last=Kung|coauthors=John T. Robinson|volume=6|issue=2|pages=213-226|id={{doi|10.1145/319566.319567}}}}▼
==Web links==
▲*{{cite journal|title=On optimistic methods for concurrency control|journal=ACM Transactions on Database Systems|date=June 1981|first=H. T.|last=Kung|coauthors=John T. Robinson|volume=6|issue=2|pages=213-226|id={{doi|10.1145/319566.319567}}}}
* Enterprise JavaBeans, 3.0, By Bill Burke, Richard Monson-Haefel, Chapter 16. Transactions, Section 16.3.5. Optimistic Locking, Publisher: O'Reilly, Pub Date: May 16, 2006,Print ISBN-10: 0-596-00978-X,
==See also==
*[[Opportunistic Locking]]
<!-- Categories -->
[[Category:
[[Category:Software]]
<!-- Interwikis -->
[[fa:کنترل همروندی خوشبینانه]]
[[he:בקרת מקביליות אופטימית]]
|