Fine-grained consistency mechanism for optimistic...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000, C707S793000, C707S793000

Reexamination Certificate

active

06240413

ABSTRACT:

FIELD OF THE INVENTION
The present invention generally relates to data processing systems and, more particularly, to a method and system for using lock groups to implement fine-grained consistency for optimistic concurrency control.
BACKGROUND OF THE INVENTION
Computer systems often use databases to store and manage large amounts of data. These databases usually have multiple clients that use and manipulate this data. Clients typically manipulate data in the form of various “read” and “write” operations that either allow the client to retrieve data from the database or allow the client to modify data in the database. A typical client transaction may have several read and write operations, and in a database, it is common for many transactions to concurrently execute to improve processing efficiency. In such a case, if access to the database by each transaction is allowed freely, the consistency among the data can be jeopardized.
It is common for many database clients, or multiple procedures on a single client machine, to seek concurrent access to a database system in order to read data from the database and write data to the database. However, each client needs to interact with the database free from the interference of others. That is, during the course of a client's transaction to the database—reading and modifying a set of data from the database—that portion of the database must remain unchanged by other clients. To prevent this problem, concurrency control is used by database systems to govern concurrent access to the database system. It ensures the integrity of each transaction in a multi-user environment.
One type of concurrency control is “optimistic concurrency control.” Optimistic concurrency control means that the check point for collisions between transactions is at the end of a transaction. With optimistic concurrency control, it is assumed that a transaction will finish before another transaction attempts to change the same data. The transaction reads the necessary data, internally makes its data updates, and finally determines if any of the data has changed before writing the updates to the database. When the client is ready to actually commit its data modifications to the database, the system checks if that data has been modified by any other transaction since the time the client's transaction first read the data. If there has been no change to the particular data, then the client's transaction can complete. If any data has been changed, then the system rolls back the client's updates and notifies the client so that it can retry its transaction, if desired. A “roll back” refers to the transaction being canceled and all data being restored to its original state before the transaction started. While optimistic concurrency control can provide significant performance improvement by avoiding the delay of initially securing the data, it is also possible that the system must roll back a transaction if another process modifies the same data.
Referring now to object-oriented systems and programming languages, such systems use “classes” containing both data members that store data and function members (or methods) that act upon the data. Classes form templates for the creation of “objects,” representing instances of a class. Classes also define methods, which are procedures that operate on objects of the same class. An exemplary object-oriented programming language is the Java™ programming language described in “The Java Programming Language,” Ken Arnold, James Gosling, Addison-Wesley, 1996, which is incorporated herein by reference. For further description of the Java language, refer to “The Java Language Specification,” James Gosling, Bill Joy, Guy Steele, Addison-Wesley, 1996, which is incorporated herein by reference.
When accessing databases in object-oriented systems, some systems use “lock groups” to implement optimistic concurrency control. With reference to optimistic concurrency control, a lock group, despite its name, does not refer to locking blocks of data. Instead, a lock group provides a collision detection mechanism. In particular, lock groups specify one or more fields to be modified by only one client during a transaction by that client. Lock groups are thus useful for managing data in a database. For example, if a customer object includes fields for a customer name and address, a lock group may specify the name and address fields so that, for example, one client does not change the data in the name field while another client changes data in the corresponding address field. In other words, the data in the name and address fields can only be changed by one client during a transaction to avoid, for example, an incorrect address being entered for a particular name.
Lock groups are used to determine conflicts when a client commits the transaction. When a client performs a transaction modifying data in a particular object and attempts to commit the transaction to save the modifications, the system determines if any lock groups include any of the modified fields, and if so, it further determines if any other application modified any field of those lock groups. The system does not commit the transaction and modify the database if another client made such modifications.
A conventional lock group includes all fields in an object. However, objects may include many fields and a client will often only modify a small set of fields in an object. Many conflicts occur when a lock group contains a large number of fields because only one client may modify data in an entire object during a transaction, which effectively prevents other clients from modifying any data in the object during the transaction.
Conventional object-oriented systems using optimistic concurrency control to access a database do not allow the client to modify some fields of an object without stopping other transactions from simultaneously modifying other fields in the same object. In conventional systems, if one transaction modifies a field of an object, no other transaction may modify another field in the same object. Consequently, conventional systems do not allow a field to simultaneously belong to more than one lock group. Additionally, conventional lock groups do not contain fields of different classes. These limitations slow the system by stopping different applications from simultaneously accessing different fields of the same object. It is therefore desirable to improve such systems.
SUMMARY
Methods and systems consistent with the present invention satisfy this and other desires by providing a method for allowing lock groups to contain fields in different classes and allowing a field to be in more than one lock group.
In accordance with methods consistent with the present invention, a method is provided in a data processing system having lock groups and classes with fields. This method receives an indication of a lock group specifying that the lock group contains a first field from a first class and a second field from a second class and creates the specified lock group. It further receives a request to commit a transaction affecting a value for one of the fields in the lock group, and determines whether to commit the transaction based on whether at least one of the fields in the lock group was modified during the transaction.
Methods and systems consistent with the present invention allow the concurrent access of a single object when the individual fields of the object are accessed by separate clients. This, in turn, reduces the delay of waiting for an object to be free for access and decreases the delay of rolling back transactions that are concurrently accessing an object. The reduction of these delays increases the overall data processing efficiency for the system.


REFERENCES:
patent: 4589092 (1986-05-01), Matick
patent: 5043876 (1991-08-01), Terry
patent: 5261069 (1993-11-01), Wilkinson et al.
patent: 5263155 (1993-11-01), Wang
patent: 5280612 (1994-01-01), Lorie et al.
patent: 5291583 (1994-03-01), Bapat
patent: 5301297 (1994-04-01), Menon et al.
patent: 5499371 (199

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Fine-grained consistency mechanism for optimistic... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Fine-grained consistency mechanism for optimistic..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Fine-grained consistency mechanism for optimistic... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2531052

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.