Proxy for One-Phase Commit Resource Managers in Two-Phase Transactions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing transaction systems face challenges in incorporating multiple one-phase commit resource managers into a two-phase commit transaction, as they lack the prepare phase capability, leading to potential non-atomic outcomes and weak consistencies, which can result in runtime errors and application failures.

Innovation Solution

A system and method that create a proxy for one-phase commit resource managers to support prepare, commit, and abort operations, allowing them to participate in a two-phase commit transaction by integrating compensating transactions to maintain ACID properties and ensure atomicity, even with multiple one-phase aware participants.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple one-phase commit resource managers are enlisted in a two-phase commit transaction, then the transaction can include more participants, but the atomicity and consistency cannot be guaranteed

Engineering Contradiction:
Improvenumber of participantsVSAvoidatomicity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces a proxy as an intermediary between the coordinator and one-phase commit resource managers. The proxy implements the two-phase commit protocol on behalf of the one-phase managers, receiving prepare and commit messages from the coordinator and forwarding appropriate commands to the underlying one-phase resource managers. This mediator pattern allows one-phase managers to participate in two-phase transactions without modifying their core logic, thereby maintaining atomicity while increasing participant versatility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the transaction management functionality by separating the two-phase commit protocol implementation (handled by the proxy) from the one-phase resource manager logic. This segmentation allows the system to support both one-phase and two-phase participants within the same transaction, with the proxy handling the protocol complexity and the resource managers focusing on their core operations, thus resolving the contradiction between participant diversity and transaction reliability.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If one-phase commit resource managers are used, then the system is simpler to operate, but the transaction consistency is weakened

Engineering Contradiction:
ImprovesimplicityVSAvoidconsistency
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The proxy acts as an intermediary that shields one-phase resource managers from the complexity of the two-phase commit protocol while maintaining consistency guarantees. The one-phase managers continue to operate with simple commit/abort semantics, while the proxy handles the prepare phase and coordinates the two-phase protocol, thus preserving both simplicity and consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The proxy implements multiple functions: it acts as a two-phase commit participant to the coordinator, a one-phase commit manager to the resource manager, and a protocol translator between the two. This multi-functionality allows the system to maintain the simplicity of one-phase operations while achieving the consistency of two-phase transactions.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Productivity

If a single Last Resource Commit optimization slot is used, then the transaction execution is optimized, but only a single one-phase commit resource manager can be inserted

Engineering Contradiction:
Improvetransaction execution efficiencyVSAvoidnumber of one-phase participants
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the LRCO functionality by creating multiple proxy instances, each capable of acting as an LRCO participant. Instead of having a single LRCO slot, the system can now have multiple proxies representing multiple one-phase resource managers, each participating in the optimized commit sequence. This segmentation allows the system to maintain the performance benefits of LRCO while supporting multiple one-phase participants.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates proxy copies that replicate the LRCO interface and behavior. Each proxy is a copy of the LRCO participant interface, allowing multiple one-phase resource managers to be inserted into the transaction while maintaining the optimized commit execution pattern. The coordinator can send commit messages to multiple proxies in sequence, achieving both scalability and performance.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9501312B2Using compensation transactions for multiple one-phase commit participants
Publication Date: 2016.11.22 RED HAT INC
  • US9501312B2 patent drawing
  • US9501312B2 patent drawing
  • US9501312B2 patent drawing

AI summary

An example system includes a registration engine that receives a request to register with a transaction. The request is from a one-phase commit resource manager. The example system also includes a proxy instantiation engine that determines whether a list of registered participants of the transaction includes at least one one-phase commit resource manager. When the list of registered participants is determined to include at least one one-phase commit resource manager, the proxy instantiation engine: (i) creates a proxy for the one-phase commit resource manager, and (2) adds the proxy to the list of registered participants. The proxy supports a prepare operation, commit operation, and abort operation. The system further includes a first-phase coordinator that sends a commit query to each registered two-phase commit participant included in the list. The commit query requests an indication of whether the respective participant can commit the transaction.