NOTE

2.7 Two-Stage Transaction Patterns

A conceptual comparison between resource-level two-phase commit and application-level TCC, both of which separate preparation from the final decision.

Distributed SystemsUpdated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. What Does “Two Stage” Mean?

Several distributed-transaction designs separate the workflow into:

  1. a prepare/reserve stage; and
  2. a finalize stage that commits/confirms or rolls back/cancels.

The similarity is structural, but the semantics can be very different.

2. Resource-Level: 2PC

Two-Phase Commit asks transactional resource managers to prepare and later commit/rollback one global atomic-commit decision.

3. Application-Level: TCC

TCC asks business services to implement Try/Confirm/Cancel semantics explicitly.

4. Key Distinction

Do not choose based only on the fact that both have two stages. Choose based on what can be reserved, what can be rolled back or compensated, which resources support transactional prepare, and how failures are recovered.

Loading helpful count