Browse Prior Art Database

A Technique to Improve The Performance of Time Based Complex Scheduling in A High Volume Business System Disclosure Number: IPCOM000124122D
Original Publication Date: 2005-Apr-08
Included in the Prior Art Database: 2005-Apr-08
Document File: 4 page(s) / 81K

Publishing Venue



Disclosed is a novel technique employed to improve the performance of time based complex scheduling logic in a high volume business system. It predicts the state of a complex schedule in a given period of time by recursively determining and caching partial results of components of the schedule.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 34% of the total text.

Page 1 of 4

A Technique to Improve The Performance of Time Based Complex Scheduling in A High Volume Business System

     The basic idea is to reduce the number of times the invocation chains are traversed by caching the results at various levels in the invocation chain and assigning a expiration time to the cached result to ensure proper refreshing of cached results.

The following example shows the advantage of this technique: Assume a schedule is made of three sub schedules. And the three sub schedules are:
1. The date has to be between Dec 1st to Dec 31st
2. It has to be a Saturday
3. The time has to be between 8 AM to 10 AM.

     Let's assume we have a promotion whose availability is controlled by the simple sample schedule above. Between the hours of 9AM and 10AM on Dec 15th, which also happens to be a Saturday, 10,000 transactions take place.

     Using the traditional way of evaluating time based schedule, all three sub-schedules would be evaluated 10,000 times in that hour. Now adopt a way of roughly estimating the cost of such operations based on the number of condition checks that are performed. Each time the schedule and its three sub-schedules are performed, 5 checks are performed. 2 checks for sub-schedule 1: date > Dec 1st, and date < Dec 31st; 1 check for sub-schedule 2: week day = Saturday and 2 checks for sub schedule 3: time > 8 AM and time < 10 AM. 10,000 evaluations will translate into 50,000 checks.

     Now, assume the new technique is used, where when a schedule is evaluated, not only is a value returned, an expiration time is also returned. During the first of the 10,000 transactions that happen during the given hour, 5 checks are performed, each of the sub schedules will return a value, in this case true and each of them will also assign an expiration time to the returned value. Sub schedule 1 will return Dec 31st as the expiration time, sub schedule 2 will return 23:59:59 of the same day (Dec 15th) as the expiration time, and sub-schedule 3 will return 10AM of the same day as the expiration time. The schedule then syndicates the results from all three sub-schedules as a traditional schedule would do and return the final result which is a true. At the same time, it would also compute a syndicated expiration time for the syndicated return result, in this case the closest of the three: 10 AM of the same day. Any subsequent calls to the same schedule will be served by checking the current time against the syndicated expiration time, and if the syndicated expiration time is in the future, the syndicated result will be returned directly without making any calls to the three sub-schedules. As a result, only 5+(10,000-1) * 1 checks are performed, a saving of nearly 80%. That's not even counting the overhead of calling each of the three sub-schedules 10,000 times if the traditional way is used. Another benefit of the new approach is that, when the expiration time 10AM does come, based on the cached results and expiration times at the sub-schedule l...