[MUD-Dev] On Lockless Threading and X/Open XA

Bruce bruce at puremagic.com
Mon Aug 7 13:11:31 New Zealand Standard Time 2000

Greg Underwood wrote:
> My initial thought would be to have the 2PC be the commit part of the C&C.
> Any reason something that simple wouldn't work?
> It's been a while since I did an in-depth read on either protocol, but I
> don't think 2PC is necessarily anathma to a C&C approach.  IIRC, what it
> buys you is the ability to rollback failed, partial commits.

I was somewhat wrong in my thinking of what phase 1 of two phase commit
was.  It really is:

  Phase 1: Prepare.  Ask everything if it is ready and able to commit. 
    so, move along to phase 2.  If not, immediately rollback everything.
  Phase 2: Commit.  Everything has said in the previous phase that it
    ready and able to commit.  At this point, everything can commit.

This works just fine with both C&C and some of the other schemes for
deadlock-free multithreading, since you can query in phase 1 and at that
point get an answer.  The only problem that might arise then is that the
complete resolution might not be as immediate.  I will remember next
time to not confuse lock acquistion with 2PC. :)

 - Bruce

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list