Unit-of-Order Routing via Fixed-Size Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing messaging systems in JMS clusters face issues with resource utilization, scalability, and performance due to the need for maintaining in-memory maps for unit-of-order (UOO) routing, which leads to poor resource allocation and high overhead costs.
Innovation Solution
A system and method that utilize a singleton path service to create routing tables with fixed sizes, applying a modulo operation on UOO hashes to distribute messages evenly across cluster members, ensuring ordered processing during cluster rebalancing and reducing memory usage by persisting fewer routes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If an in-memory map with routing entries for each UOO is maintained to ensure ordered message processing in a JMS cluster, then unit-of-order guarantee is achieved, but memory consumption increases significantly when there is a large number of UOOs
Solution Approach 1:
The patent segments the routing information by organizing it into routing tables with fixed sizes, where each table handles a specific range of UOO hash values. This segmentation allows the system to maintain routing information for multiple UOOs without loading all entries into memory simultaneously, thus reducing overall memory consumption while preserving the unit-of-order guarantee through proper routing table selection and usage.
Solution Approach 2:
The patent changes the parameter of routing information storage from dynamic (in-memory maps that grow with each UOO) to fixed (routing tables with predetermined sizes). By using fixed-size routing tables and implementing a mechanism to select and switch between tables based on UOO hash ranges, the system controls memory consumption while maintaining reliability for ordered message processing.
2Reliability
If routing entries are persisted to a persistence store for each new UOO to maintain routing information across cluster changes, then routing reliability is improved, but performance overhead increases due to frequent persistence operations
Solution Approach 1:
The patent applies partial persistence by only persisting routing information for the currently active routing table rather than persisting every routing entry whenever a new UOO is encountered. This selective persistence approach maintains routing reliability across cluster changes while significantly reducing the frequency of persistence operations, thereby improving messaging performance and reducing overhead.
Solution Approach 2:
The patent extracts the persistence operation from the message routing path by implementing a buffer cache that holds routing information in memory. The persistence operation is performed separately and asynchronously when the routing table needs to be updated, rather than being coupled with each message routing decision. This separation eliminates the performance overhead of frequent persistence operations while maintaining routing reliability.
3Measurement precision
If an in-memory map tracks each UOO individually to ensure proper routing, then routing accuracy is maintained, but scalability deteriorates in dynamic clusters where members are added or removed
Solution Approach 1:
The patent implements a dynamic routing table selection mechanism that adapts to cluster changes. When the cluster size changes, the system dynamically selects which routing table to use based on the current cluster configuration and UOO hash ranges. This dynamic adaptation allows the system to maintain routing accuracy in dynamic clusters without requiring complete re-persistence of routing information, thereby improving scalability while preserving routing precision.
Solution Approach 2:
The patent performs preliminary organization of routing information into fixed-size tables with predetermined ranges before runtime. This preliminary structuring allows the system to quickly determine which routing table to use based on simple hash range comparisons, maintaining routing accuracy without requiring complex lookups or reorganization when cluster members are added or removed. The preliminary organization enables scalable operation in dynamic clusters.
4Reliability
If routing information is stored in a distributed cache across cluster members, then routing availability is improved, but memory consumption increases across the entire cluster
Solution Approach 1:
The patent merges the routing information storage function into a centralized path service rather than distributing routing tables across all cluster members. The path service maintains the routing tables in memory and provides routing decisions to cluster members as needed. This consolidation improves routing availability through a single source of truth while significantly reducing total memory consumption, as only one instance of the routing tables needs to be maintained in memory rather than replicating them across all cluster nodes.
Data Source
AI summary
In accordance with an embodiment, a system and method provides a messaging service implementing a unit-of-order guarantee in a multitenant application server environment. The system and method of implementing unit-of-order utilizes an improved path service for routing all messages having a particular unit-of-order to the same member of the cluster. The improved path service allows for scalability of the cluster and reduced resource utilization, thereby improving the performance of a clustered computing system providing the messaging service.


