Distributed EJB Timer Job Assignment via Central Database
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing EJB timer systems in clusters do not efficiently distribute timer jobs among new application server instances and face slow recovery of timer jobs in case of instance failure, leading to suboptimal execution and prolonged downtime.
Innovation Solution
A distributed EJB timer system where timer information is stored in a central high-availability database, allowing the timer master to distribute and reassign jobs across application server instances, ensuring timely execution and quick recovery upon instance failure.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If timer jobs are stored locally on each application server instance, then each instance can execute timers independently, but new instances do not receive timer jobs until they receive EJB timer API requests and the system fails to achieve good distribution and fast failure recovery
Solution Approach 1:
The patent introduces a central database as an intermediary to store timer information, allowing application server instances to retrieve and execute timer jobs from this shared storage. This mediator enables fast failure recovery because when an instance fails, another instance can immediately pick up its timer jobs from the database without waiting for the failed instance to recover or for complex failure detection protocols.
Solution Approach 2:
The patent transitions from a distributed local storage model to a centralized storage model, changing the dimension of timer job management from instance-local to cluster-wide. This dimensional change allows any instance in the cluster to access and execute any timer job, enabling rapid failover and improving both reliability and recovery speed.
2Adaptability or versatility
If timer information is stored in a central database, then timer jobs can be distributed to any instance in the cluster, but this requires additional database access and coordination overhead
Solution Approach 1:
The patent makes the timer database universal by allowing any application server instance to read and execute any timer job from the central database. This universal access model provides great flexibility in timer job distribution and enables any instance to take over any timer, achieving high adaptability while the database handles the coordination complexity centrally.
3Stability of the object's composition
If the system waits for entire application server instance recovery before recovering timer jobs, then data consistency is maintained, but recovery time is prolonged
Solution Approach 1:
The patent implements preliminary action by having timer information pre-stored in the central database before any failure occurs. When a failure happens, the system can immediately retrieve and execute timer jobs from the database without waiting for the original instance to recover, thus maintaining data consistency through centralized storage while achieving fast recovery through pre-positioned timer data.
Data Source
AI summary
Multiple application server instances can be arranged in a cluster that implements a distributed EJB timer system. A high availability database can store EJB timer info. The EJB timer jobs can be distributed among the application server instances of the cluster that implement the distributed EJB timer system. In case of a failure of an application server instance, the EJB timer info can be used to reassign the EJB timer jobs associated with the failed application server instance.


