Apparatus, method, and article of manufacture for client-side optimistic locking in a stateless environment
First Claim
1. An apparatus for allowing a user at a remote site to update data stored in a database while maintaining the integrity of the data using a client-side optimistic lock, the apparatus comprising:
- a processor for executing instructions; and
a memory device storing modules executable by the processor, the modules comprising;
a transaction manager module configured to retrieve an original data segment from the database in response to a search request from the user;
a data segment duplicator module configured to generate two copies of the original data segment, a modifiable data segment to be modified at the remote site and a state data segment to be unaltered for transmission to the remote site; and
a comparison module configured to receive an updated modifiable data segment and the state data segment from the remote site and compare the state data segment with a current data segment to determine equivalence thereof and to lock and update the current data segment to reflect the updated modifiable data segment upon a determination of equivalence.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention is an optimistic locking mechanism which allows Internet access to a database while maintaining data integrity in a stateless web environment. One embodiment of the invention incorporates a conventional IMS residing on a host computer and includes a generic transaction module which retrieves original data segments from the an IMS database in response to a search request from a web user. This embodiment of the invention further includes a server-side interface module for duplicating the original data segment into identical lines of data segments. One data segment may be updated by a web user whereas the other data segment remains constant and serves as a reference of the original state of the data segment. Both data segments are transmitted to a web user who may make changes to one data segment but not the other. Both data segments are returned, and the generic transaction module compares the state data segment to a current data segment to determine if the web user updates were based on the current state. If so, the IMS is updated to reflect the web user updates. If the web user updates were not based on the current state, the data segments are updated to reflect the current state and are then retransmitted to the web user. In this manner, a web user is allowed to update only data segments which are current, thereby maintaining integrity of the database.
58 Citations
32 Claims
-
1. An apparatus for allowing a user at a remote site to update data stored in a database while maintaining the integrity of the data using a client-side optimistic lock, the apparatus comprising:
-
a processor for executing instructions; and
a memory device storing modules executable by the processor, the modules comprising;
a transaction manager module configured to retrieve an original data segment from the database in response to a search request from the user;
a data segment duplicator module configured to generate two copies of the original data segment, a modifiable data segment to be modified at the remote site and a state data segment to be unaltered for transmission to the remote site; and
a comparison module configured to receive an updated modifiable data segment and the state data segment from the remote site and compare the state data segment with a current data segment to determine equivalence thereof and to lock and update the current data segment to reflect the updated modifiable data segment upon a determination of equivalence. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for accessing a database across a network and updating data stored on the database while maintaining data integrity via a client-side optimistic lock, the method comprising:
-
retrieving an original data segment in response to a search request received from a remote sire on the Internet;
generating two copies of the original data segment, a modifiable data segment to be modified at the remote site and a state data segment to be unaltered;
transmitting the modifiable data segment and the state data segment to the remote site;
receiving an updated modifiable data segment and the state data segment from the remote site; and
comparing the state data segment with a current data segment in the database. - View Dependent Claims (10, 11, 12, 13, 14, 15)
updating the modifiable and state data segments to reflect the current data segment upon a determination that the state data segment and current data segment are non-equivalent; and
retransmitting the modifiable and state data segments to the remote site.
-
-
12. The method of claim 9, further comprising:
-
updating, at the remote site, the modifiable data segment to reflect user preferences; and
maintaining the state data segment constant.
-
-
13. The method of claim 9, wherein each data segment comprises data attributes and wherein comparing the state data segment with the current data segment further comprises comparing the data attributes of the state data segment and the data attributes of the current data segment.
-
14. The method of claim 9 further comprising locking the current data segment during the step of comparing the state data segment with the current data segment.
-
15. The method of claim 9, wherein transmitting the modifiable data segment and the state data segment to the remote site comprises transmitting the modifiable data segment and the state data segment over the Internet.
-
16. A method for accessing a database across a network and updating data stored on the database while maintaining data integrity comprising:
-
retrieving an original data segment in response to a search request received from a remote site on the Internet;
generating a modifiable data segment and a state data segment based on the original data segment;
transmitting the modifiable data segment and the state data segment to the remote site, wherein transmitting the modifiable data segment and the state data segment to the remote site further comprises formatting the modifiable data segment and the state data segment into HTML;
receiving an updated modifiable data segment and the state data segment from the remote site; and
comparing the state data segment with a current data segment in the database.
-
-
17. A method for accessing a database across a network and updating data stored on the database while maintaining data integrity comprising:
-
retrieving an original data segment in response to a search request received from a remote site on the Internet;
generating a modifiable data segment and a state data segment based on the original data segment;
formatting the state data segment into a non-displayable format;
transmitting the modifiable data segment and the state data segment to the remote site;
receiving an updated modifiable data segment and the state data segment from the remote site; and
comparing the state data segment with a current data segment in the database.
-
-
18. A computer readable medium having stored thereon computer executable instructions for performing a method for accessing a database and updating data on the database in a stateless network environment while maintaining data integrity, the method comprising:
-
retrieving an original data segment in response to a search request using a stateless protocol received from a remote site on the network;
generating two copies of the original data segment, a modifiable data segment to be modified at the remote site and a state data segment to be unaltered;
transmitting the modifiable data segment and the state data segment to the remote site using a stateless protocol;
receiving an updated modifiable data segment and the state data segment from the remote site; and
comparing the state data segment with a current data segment in the database. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26)
updating the modifiable and state data segments to reflect the current data segment upon a determination that the state data segment and current data segment are non-equivalent; and
retransmitting the modifiable and state data segments to the remote site.
-
-
21. The computer readable medium of claim 18 wherein transmitting the modifiable data segment and the state data segment to the remote site further comprises formatting the modifiable data segment and the state data segment into HTML.
-
22. The computer readable medium of claim 18 wherein the method further comprises formatting the state data segment into a non-displayable format.
-
23. The computer readable medium of claim 18 wherein the method further comprises:
-
updating, at the remote site, the modifiable data segment to reflect user preferences; and
maintaining the state data segment constant.
-
-
24. The computer readable medium of claim 18 wherein each data segment comprises data attributes and wherein comparing the state data segment with the current data segment further comprises comparing the data attributes of the state data segment and the data attributes of the current data segment.
-
25. The computer readable medium of claim 18 wherein the method further comprises locking the current data segment during the step of comparing the state data segment with the current data segment.
-
26. The method of claim 18 wherein transmitting the modifiable data segment and the state data segment to the remote site comprises transmitting the modifiable data segment and the state data segment over the Internet.
-
27. A method for database update in a stateless environment that allows updates without locking the database or tracking update requests by the database management system, comprising:
-
sending, to a client-portion of a requestor, two copies of state data, one to be modified and the other left unaltered, over a communications network, the state data reflecting the state of the data in the database when sent;
receiving, from the requester, modified data and the state data, the modified data being modified state data and to be used to update the database; and
if the state data is equivalent to the current data in the database, updating the database to reflect the modified data. - View Dependent Claims (28, 29, 30, 31, 32)
if the state data is not equivalent to the current data, sending, to the requestor, the current data as the new state data.
-
-
32. An article of manufacture comprising a computer program carrier embodying one or more instructions that, when used by a computer, causes the computer to perform the method as recited in claim 27.
Specification