[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

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

[Full Header] [Plain Text]
From: Bruce <bruce@puremagic.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 07 Aug 2000 13:11:31 -0600
References: [1] [2] <-newest
Organization: Kanga.Nu
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. 
If
    so, move along to phase 2.  If not, immediately rollback everything.
  Phase 2: Commit.  Everything has said in the previous phase that it
was
    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@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev