Methods for updating reference count and shared objects in a concurrent system
First Claim
1. A method for managing access to a shared resource stored in a repository managed by a content server, comprising:
- maintaining a global cache and a plurality of session caches, the global cache storing one or more object types retrieved from a database for use by the plurality of sessions, each session cache being associated with a corresponding session of a plurality of sessions and storing;
i) object types retrieved from the global cache in response to a client read request, and ii) one or more object subtypes cloned from a corresponding object type stored in the global cache to the session cache in response to a client write request to modify the corresponding object type, the one or more object subtypes replacing the corresponding object type after the write request is performed;
establishing one or more sessions between one or more clients and the content server;
maintaining a session counter by the content server, the session counter tracking a number of references, stored in the plurality of session caches, to object types stored in the global cache, the maintaining comprising;
incrementing a session counter based on i) detecting an absence of a requested object type in the session cache and ii) creating a pointer to the requested object type stored in the global cache, the pointer being stored in the session cache;
decrementing the session counter based on i) detecting an invalid object type in the session cache and ii) removing the invalid object type from the session cache;
maintaining an intra-session reference counter, the intra-session reference counter tracking a number of subtypes of the object types stored in the global cache used in the sessions, maintaining the intra-session reference counter comprising;
incrementing only an intra-session reference counter based on every instance of using a subtype of the object type in a session;
decrementing only the intra-session reference counter based on every instance of releasing the subtype from the session; and
removing the object type from the global cache when the session counter and the intra-session reference counter are both zero.
4 Assignments
0 Petitions
Accused Products
Abstract
A method for referencing and updating objects in a shared resource environment. A reference counter counts is incremented for every use of an object subtype in a session and decremented for every release of an object subtype in a session. A session counter is incremented upon the first instance of fetching an object type into a session cache and decremented upon having no instances of the object type in use in the session. When both the reference counter and the session counter are zero, the object type may be removed from the cache. When the object type needs to be updated, it is cloned into a local cache, and changes are made on the local copy. The global cache is then locked to all other users, the original object type is detached, and the cloned object type is swapped into the global cache, after which the global cache in unlocked.
-
Citations
16 Claims
-
1. A method for managing access to a shared resource stored in a repository managed by a content server, comprising:
-
maintaining a global cache and a plurality of session caches, the global cache storing one or more object types retrieved from a database for use by the plurality of sessions, each session cache being associated with a corresponding session of a plurality of sessions and storing;
i) object types retrieved from the global cache in response to a client read request, and ii) one or more object subtypes cloned from a corresponding object type stored in the global cache to the session cache in response to a client write request to modify the corresponding object type, the one or more object subtypes replacing the corresponding object type after the write request is performed;establishing one or more sessions between one or more clients and the content server; maintaining a session counter by the content server, the session counter tracking a number of references, stored in the plurality of session caches, to object types stored in the global cache, the maintaining comprising; incrementing a session counter based on i) detecting an absence of a requested object type in the session cache and ii) creating a pointer to the requested object type stored in the global cache, the pointer being stored in the session cache; decrementing the session counter based on i) detecting an invalid object type in the session cache and ii) removing the invalid object type from the session cache; maintaining an intra-session reference counter, the intra-session reference counter tracking a number of subtypes of the object types stored in the global cache used in the sessions, maintaining the intra-session reference counter comprising; incrementing only an intra-session reference counter based on every instance of using a subtype of the object type in a session; decrementing only the intra-session reference counter based on every instance of releasing the subtype from the session; and removing the object type from the global cache when the session counter and the intra-session reference counter are both zero.
-
-
2. A method for managing access to a shared resource stored in a repository managed by a content server, comprising:
-
maintaining a global cache and a plurality of session caches, the global cache storing one or more object types retrieved from a database for use by the plurality of sessions, each session cache being associated with a corresponding session of a plurality of sessions, and storing;
i) object types retrieved from the global cache in response to a client read request, and ii) one or more object subtypes cloned from a corresponding object type stored in the global cache to the session cache in response to a client write request to modify the corresponding object type, the one or more object subtypes replacing the corresponding object type after the write request is performed;establishing a session between a first client and the content server; receiving a request from the first client for an object type; maintaining a session counter by the content server, the session counter tracking a number of references stored in the plurality of session caches, to object types stored in the global cache, the maintaining comprising; retrieving the object type from the session cache when it is determined that a valid version of the requested object type is stored in a corresponding session cache, removing the version of the requested object type from the session cache and decrementing the session counter when it is determined that the version of the requested object type is invalid, creating a pointer to the requested object type in the global cache and incrementing the session counter, when the requested object type is not stored in the corresponding session cache, and maintaining an intra-session reference counter the intra-session reference counter tracking a number of subtypes of the object types stored in the global cache used in the sessions, maintaining the intra-session reference counter comprising; incrementing only the intra-session reference counter based on using a subtype of the requested object type stored in the corresponding session cache, and decrementing only the intra-session reference counter when the subtype is released from the session, and removing the object type from the global cache when the session counter and the intra-session reference counter are both zero. - View Dependent Claims (3, 4, 5, 6)
-
-
7. A computer program product comprising a non-transitory computer-readable medium having computer-readable program code embodied therein to be executed by one or more processors, the program code including instructions to:
-
maintain a global cache and a plurality of session caches, the global cache storing one or more object types retrieved from a database for use by the plurality of sessions, each session cache being associated with a corresponding session of a plurality of sessions and storing;
i) object types retrieved from the global cache in response to a client read request, and ii) one or more object subtypes cloned from a corresponding object type stored in the global cache to the session cache in response to a client write request to modify the corresponding object type, the one or more object subtypes replacing the corresponding object type after the write request is performed;establish a session between a first client and the content server; receive a request from the first client for an object type; maintaining a session counter by the content server, the session counter tracking a number of references stored in the plurality of session caches, to object types stored in the global cache, the maintaining comprising; retrieve the object type from the session cache when it is determined that a valid version of the requested object type is stored in a corresponding session cache, remove the version of the requested object type from the session cache and decrement the session counter when it is determined that the version of the requested object type is invalid, create a pointer to the requested object type in the global cache and increment the session counter, when the requested object type is not stored in the corresponding session cache, and maintaining an intra-session reference counter the intra-session reference counter tracking a number of subtypes of the object types stored in the global cache used in the sessions, maintaining the intra-session reference counter comprising; increment only the intra-session reference counter based on using a subtype of the requested object type stored in the corresponding session cache, and decrement only the intra-session reference counter when the subtype is released from the session, and remove the object type from the global cache when the session counter and the intra-session reference counter are both zero. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A content management system for providing controlled access to a shared resource in a distributed computing environment, comprising:
-
A repository having access and storage operations controlled by at least one content server; and the content server comprising a processor and memory, the memory including instructions to cause the processor to provide a content management framework for integrated operation with the repository, and configured to; maintain a global cache and a plurality of session caches, the global cache storing one or more object types retrieved from a database for use by the plurality of sessions, each session cache being associated with a corresponding session of a plurality of sessions and storing;
i) object types retrieved from the global cache in response to a client read request, and ii) one or more object subtypes cloned from a corresponding object type stored in the global cache to the session cache in response to a client write request to modify the corresponding object type, the one or more object subtypes replacing the corresponding object type after the write request is performed;establish a session between a first client and the content server; receive a request from the first client for an object type; maintaining a session counter by the content server, the session counter tracking a number of references stored in the plurality of session caches, to object types stored in the global cache, the maintaining comprising; retrieve the object type from the session cache when it is determined that a valid version of the requested object type is stored in a corresponding session cache, remove the version of the requested object type from the session cache and decrement the session counter when it is determined that the version of the requested object type is invalid, create a pointer to the requested object type in the global cache and increment the session counter, when the requested object type is not stored in the corresponding session cache, and maintaining an intra-session reference counter the intra-session reference counter tracking a number of subtypes of the object types stored in the global cache used in the sessions, maintaining the intra-session reference counter comprising; increment only the intra-session reference counter based on using a subtype of the requested object type stored in the corresponding session cache, and decrement only the intra-session reference counter when the subtype is released from the session, and remove the object type from the global cache when the session counter and the intra-session reference counter are both zero. - View Dependent Claims (13, 14, 15, 16)
-
Specification