Systems and methods for dynamic control of cache and pool sizes using a batch scheduler
First Claim
1. A system to support dynamic control of cache, comprising:
- a cache to store in memory one or more objects of each of one or more classes defined by an object-oriented programming language;
one or more properties associated with a class of the one or more classes;
a configuration file to define the one or more properties associated with the class; and
a cache control component configured to perform steps of;
instantiating and/or adding the object into the cache;
removing the object, even if the object is an active object, from the cache when the cache is full and another object is to be inserted, wherein the active object is involved in a transaction and is accessible via the cache during a whole transaction period; and
deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;
executing the batch at a fixed or variable periodicity;
locking the cache when executing the batch;
setting a processing time for the batch;
setting the size of the batch, i.e., the number of instances to be processed by the batch;
calculating the processing time for each instance by the batch; and
adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides users and processes with various features to control the memory usage by a cache and pool dynamically at runtime. The cache and pool can be initialized on demand to remove idle objects of classes from them without the server being restarted. When the cache and pool reach their maximum sizes, idle objects in them may be removed to make room for newly active objects using various strategies in batches, where the schedule (periodicity), size and processing time of each batch can be dynamically adjusted. When a newly created object is being added to a full cache where each object is enrolled in a transaction, one or more active objects may be passivated from the cache based on various criteria to make room for the new instance to be added. Various features of the cache and pool can be defined in a configuration file. This description is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.
36 Citations
39 Claims
-
1. A system to support dynamic control of cache, comprising:
-
a cache to store in memory one or more objects of each of one or more classes defined by an object-oriented programming language; one or more properties associated with a class of the one or more classes; a configuration file to define the one or more properties associated with the class; and a cache control component configured to perform steps of; instantiating and/or adding the object into the cache; removing the object, even if the object is an active object, from the cache when the cache is full and another object is to be inserted, wherein the active object is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system to support dynamic control of cache, comprising:
-
a cache to store in memory one or more instances of each of one or more Enterprise Java®
Bean (EJB) types;one or more properties associated with an EJB type of the one or more EJB types; a deployment descriptor to define the one or more properties associated with the EJB type; and a cache control component configured to perform steps of; instantiating and/or adding the instance into the cache; removing the instance, even if the object is an active instance, from the cache when the cache is full and another instance is to be inserted, wherein the active instance is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A method to support dynamic control of cache, comprising:
-
storing in memory one or more objects of each of one or more classes defined by an object-oriented programming language via a cache; defining one or more properties associated with a class of the one or more classes via a configuration file; and performing on an object in the one or more objects; instantiating and/or adding the object into the cache; removing the object, even if the object is an active object, from the cache when the cache is full and another object is to be inserted, wherein the active object is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (17, 18, 19)
-
-
20. A method to support dynamic control of cache, comprising:
-
storing in memory one or more instances of each of one or more Enterprise Java®
Bean (EJB) types via a cache;defining one or more properties associated with an EJB type of the one or more EJB types via a deployment descriptor; and performing on an instance in the one or more instances; instantiating and/or adding the instance into the cache; removing the instance, even if the object is an active instance, from the cache when the cache is full and another instance is to be inserted, wherein the active instance is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (21, 22, 23, 24)
-
-
25. A machine readable medium having instructions stored thereon that when executed cause a system to:
-
store in memory one or more objects of each of one or more classes defined by an object-oriented programming language via a cache; and perform on an object in the one or more objects; instantiating and/or adding the object into the cache; removing the object, even if the object is an active object, from the cache when the cache is full and another object is to be inserted, wherein the active object is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (26, 27, 28)
-
-
29. A machine readable medium having instructions stored thereon that when executed cause a system to:
-
store in memory one or more instances of each of one or more Enterprise Java®
Bean (EJB) types via a cache;define one or more properties associated with an EJB type of the one or more EJB types via a deployment descriptor; and perform on an instance in the one or more instances; instantiating and/or adding the instance into the cache; removing the instance, even if the object is an active instance, from the cache when the cache is full and another instance is to be inserted, wherein the active instance is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (30, 31, 32, 33)
-
-
34. A system to support dynamic control of cache, comprising:
-
means for storing in memory one or more objects of each of one or more classes defined by an object-oriented programming language via a cache; means for defining one or more properties associated with a class of the one or more classes via a configuration file; and means for performing on an object in the one or more objects; instantiating and/or adding the object into the cache; removing the object, even if the object is an active object, from the cache when the cache is full and another object is to be inserted, wherein the active object is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (35, 36)
-
-
37. A system to support dynamic control of cache, comprising:
-
means for storing in memory one or more instances of each of one or more Enterprise Java®
Bean (EJB) types via a cache;means for defining one or more properties associated with an EJB type of the one or more EJB types via a deployment descriptor; and means for performing on an instance in the one or more instances; instantiating and/or adding the instance into the cache; removing the instance, even if the object is an active instance, from the cache when the cache is full and another instance is to be inserted, wherein the active instance is involved in a transaction and is accessible via the cache during a whole transaction period; and deploying a batch scheduler to perform the removing step via one or more batches;
wherein the batch scheduler is a self-correcting batch scheduler with time-slice feedback mechanism to set a size of a batch of the one or more batches, wherein the batch scheduler is configured to perform at least one of;executing the batch at a fixed or variable periodicity; locking the cache when executing the batch; setting a processing time for the batch; setting the size of the batch, i.e., the number of instances to be processed by the batch; calculating the processing time for each instance by the batch; and adjusting the processing time for the batch and/or the size of the batch based on the processing time for each instance. - View Dependent Claims (38, 39)
-
Specification