Web Usage
The stateless nature of HTTP makes locking infeasible for web user interfaces. It's common for a user to start editing a record, then leave without following a "cancel" or "logout" link. If locking is used, other users who attempt to edit the same record must wait until the first user's lock times out.
HTTP does provide a form of in-built OCC, using the ETag and If-Match headers.
Some database management systems offer OCC natively - without requiring special application code. For others, the application can implement an OCC layer outside of the database, and avoid waiting or silently overwriting records. In such cases, the form includes a hidden field with the record's original content, a timestamp, a sequence number, or an opaque token. On submit, this is compared against the database. If it differs, the conflict resolution algorithm is invoked.
Read more about this topic: Optimistic Concurrency Control
Famous quotes containing the words web and/or usage:
“However, our fates at least are social. Our courses do not diverge; but as the web of destiny is woven it is fulled, and we are cast more and more into the centre. Men naturally, though feebly, seek this alliance, and their actions faintly foretell it.”
—Henry David Thoreau (18171862)
“Girls who put out are tramps. Girls who dont are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesnt put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.”
—Fran Lebowitz (b. 1951)