Optimistic Concurrency Control - Web Usage

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:

    “Being so wrong about her makes me wonder now how often I am utterly wrong about myself. And how wrong she might have been about her mother, how wrong he might have been about his father, how much of family life is a vast web of misunderstandings, a tinted and touched-up family portrait, an accurate representation of fact that leaves out only the essential truth.”
    —Anna Quindlen (b. 1952)

    “I am using it [the word ‘perceive’] here in such a way that to say of an object that it is perceived does not entail saying that it exists in any sense at all. And this is a perfectly correct and familiar usage of the word.”
    —A.J. (Alfred Jules)