Cache-Based Lock Management for Business Process Execution Engines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In business process execution environments, existing systems face challenges in preventing conflicting access to data objects during the rehydration of Business Process Execution Language (BPEL) process instances, which can lead to inefficiencies and resource wastage, particularly when multiple processes are interested in the same data, and current methods to address this often incur high memory, processing, and latency overhead.
Innovation Solution
A lock management system is implemented within a cache, where lock objects are stored, allowing access without needing the underlying database, ensuring that only one process can modify data objects at a time, thus preventing conflicts and optimizing resource usage by managing locks efficiently within the cache.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If lock status is determined by accessing the underlying database, then data consistency is ensured, but memory overhead, processing overhead, and latency increase
Solution Approach 1:
The system segments lock management into two parts: a cached lock status in memory for fast access, and the underlying database for persistence. The cache stores lock status information separately from the main data, allowing rapid determination of lock state without querying the database, thus reducing latency while maintaining consistency through periodic synchronization.
Solution Approach 2:
An intermediary caching layer is introduced between the application and the database for lock status checking. This cache acts as a mediator that holds lock information in memory, providing fast access while the database serves as the ultimate source of truth. The intermediary reduces direct database access frequency, lowering latency while maintaining data consistency through cache invalidation or update mechanisms.
2Productivity
If multiple process instances access the same data objects simultaneously, then processing throughput increases, but conflicting access and data corruption risks increase
Solution Approach 1:
Each process instance autonomously checks the lock status of data objects it needs to access by querying the cached lock information. The system provides self-service lock management where processes can independently determine whether to proceed or wait, without requiring centralized coordination for every access decision. This enables parallel processing of independent operations while preventing conflicts through cached lock status checks.
3Speed
If lock objects are stored in the cache, then access speed increases and database access is eliminated, but cache memory consumption increases
Solution Approach 1:
The cache stores lock status information with a focused, localized structure optimized for rapid access. Rather than caching entire data objects or complex lock management structures, the system caches only the essential lock status flags and identifiers needed for quick determination. This localized caching approach minimizes memory consumption while maintaining high access speed for lock status checks.
Data Source
AI summary
A system and method for enhancing performance of a business process execution engine, utilizing a database, a cache, and a lock management system operating in cache. The lock management system, upon receiving a request for a stored business process instance, determines by accessing the cache whether stored business process instance is locked and if the lock is expired. The stored business process object is served to the business process execution engine if it is not locked or the lock is expired. The lock functionality is implemented by writing, rewriting, and/or erasing a companion lock object stored in the cache such that no database access is required to determine whether a stored business process instance is locked.


