In a distributed hierarchical cache, using a dependency to determine if a version of the first member stored in a database matches the version of the first member returned
First Claim
1. A method for editing hierarchical data, the method comprising:
- receiving a command to access a first member of a data hierarchy containing multiple members;
accessing the first member in a local memory, the local memory periodically updated with changes from the database;
caching the first member in a cache the cache assigning a version to each cached object;
determining that the first member has a dependency with one or more other members of the data hierarchy, the first member having a dependency with the one or more other members of the data hierarchy if the first member cannot be modified without modifying or reading the state of the one or more other members of the data hierarchy;
saving the dependency by adding a current version of the first member and a member identification corresponding to the first member to a dependency list, the dependency list indicating the determined dependency, wherein saving the dependency further includes adding an object identification referenced by the command to the dependency list;
returning the first member and verifying a change made to the first member;
receiving a command to commit changes to the first member;
receiving a command to save changes to the first member;
adding information regarding the first member to a save list;
using the dependency to determine if a version of the first member stored in a database matches the version of the first member returned; and
returning an error to a user if the version of the first member stored in the database does not match a version of the hierarchical data returned.
3 Assignments
0 Petitions
Accused Products
Abstract
A solution may be provided in which a cache may assign a version to each object that it caches. The version may be saved in a database along with the object. Each time the business logic accesses the cache for a dependent object, such as a read from the bit mask field of the new parent member, the version of the object checked in the cache and its identification may be saved on a dependency list. Once changes to the object are performed, the business logic may issue a commit command. The cache may then verify that the version of each object on the dependency list matches the version that is in the database. If an object on the dependency list either does not exist in the database, or exists with another version, then the transaction may be canceled.
-
Citations
8 Claims
-
1. A method for editing hierarchical data, the method comprising:
-
receiving a command to access a first member of a data hierarchy containing multiple members; accessing the first member in a local memory, the local memory periodically updated with changes from the database; caching the first member in a cache the cache assigning a version to each cached object; determining that the first member has a dependency with one or more other members of the data hierarchy, the first member having a dependency with the one or more other members of the data hierarchy if the first member cannot be modified without modifying or reading the state of the one or more other members of the data hierarchy; saving the dependency by adding a current version of the first member and a member identification corresponding to the first member to a dependency list, the dependency list indicating the determined dependency, wherein saving the dependency further includes adding an object identification referenced by the command to the dependency list; returning the first member and verifying a change made to the first member; receiving a command to commit changes to the first member; receiving a command to save changes to the first member; adding information regarding the first member to a save list; using the dependency to determine if a version of the first member stored in a database matches the version of the first member returned; and returning an error to a user if the version of the first member stored in the database does not match a version of the hierarchical data returned. - View Dependent Claims (2, 3, 4)
-
-
5. An apparatus for editing hierarchical data, the apparatus rising:
-
a local memory, a program controlling a cache, the program including; means for receiving a command to access a first member of a data hierarchy containing multiple members of the data item having the hierarchical data; means for accessing the first member in a local memory, the local memory periodically undated with changes from the database; means for caching the first member and assigning a version to each cached object; means for determining that the first member has a dependency with one or more other members of the data hierarchy, the first member having a dependency with the one or more other members of the data hierarchy if the first member cannot be modified without modifying or reading the state of the one or more other members of the data hierarchy; means for saving the dependency by adding a current version of the first member and a member identification corresponding to the first member to a dependency list, the dependency list indicating the determined dependency, wherein saving the dependency further includes adding an object identification referenced by the command to the dependency list; means for returning the first member and verifying a change made to the first member; means for receiving a command to commit changes to the first member; means for receiving a command to save chances to the first member; means for adding information regarding the first member to a save list; means for using the dependency to determine if a version of the first member stored in a database matches the version of the first member returned; and means for returning an error to a user if the version of the first member stored in the database does not match a version of the hierarchical data returned. - View Dependent Claims (6, 7, 8)
-
Specification