Computers and computer software make a very important part of modern life and business. Specifically, for any business organization to stay competitive, it is imperative that it uses various computer based software to manage data, customers, employees, etc. Businesses use a number of different software for virtually every function of their daily operations, including payroll, customer relation management, accounting, inventory management, etc. Each of these various software generally use one or more underlying database to store data and a number of graphical user interface (GUI) based forms to interact with the computer user. Depending on the business model, there may also be one or more intermediate layers operating between such database and the forms presented to the end user. This is especially true in the case of software using the Internet or other similar platform to provide applications.
For example, various accounting systems, customer relation management systems, human resource management systems, etc., operate as multilayer applications that run in network environment, allowing multiple users to access the system from multiple locations. These applications use a storage layer or a data layer to store data that may be accessed by the various locations over the network. For example, a database server or a collection of database servers may be used to store data used by such an application. Each of the various locations use an upper layer, such as a presentation layer or an interaction layer, to present the data from users or other application, to interact with users and other applications to receive, provide and change data, etc.
An example of such an upper layer may be an Internet browser, a spreadsheet application, an active server pages (ASP) application, etc., where such an upper layer may query data for one or more users, receive data from one or more users, and communicate data to the storage layer for storage. Quite often it is possible that one or more of the multiple users may need to transfer data to the storage layer at nearly the same time. In such a situation, it is imperative that the consistency of data passed to the storage layer is guaranteed. For example, for an accounting system using such multiple layer architecture, one user of the upper layer may be posting a transaction involving a bank account, while at the same time, another user may be querying the storage layer to get information related to the same bank account. Such an attempt by multiple users to access the bank account form the storage layer may cause a database deadlock, either denying access to both users, or in a worse case, communicating erroneous information to one or more of such multiple users. Therefore, these is a need to ensure that users interacting with multiple layer applications via an upper layer are able to initiate and commit transactions between such upper layer and the storage layer without causing database deadlock.