home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / 6338 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.8 KB  |  77 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!fafnir!rcbc
  3. From: rcbc@fafnir.cs.cornell.edu (Robert Cooper)
  4. Subject: Re: Hot Standby DBMS's
  5. In-Reply-To: dhepner@cup.hp.com's message of Mon, 24 Aug 1992 18:49:29 GMT
  6. Message-ID: <RCBC.92Aug26125402@fafnir.cs.cornell.edu>
  7. Sender: rcbc@cs.cornell.edu (Robert Cooper)
  8. Reply-To: rcbc@cs.cornell.edu
  9. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  10. References: <RCBC.92Aug24122743@fafnir.cs.cornell.edu> <BtI4AH.D81@cup.hp.com>
  11. Date: Wed, 26 Aug 1992 17:54:02 GMT
  12. Lines: 63
  13.  
  14. > >The latter approach has a number of tricky problems that people have
  15. > >pointed out. The main one is ensuring that concurrency control is
  16. > >coordinated between the replicated data managers so that exactly the same
  17. > >order of data updates and accesses occurs on both replicas.
  18. > Fine, but "coordination of concurrency control" is not required to 
  19. > achieve that goal if you use distributed transactions.  "Coordination 
  20. > of the input streams" may however be required to prevent deadlock 
  21. > causing race conditions.
  22.  
  23. Let's say we are updating bank account A at the primary and backup.
  24. I was envisaging something like this:
  25.  
  26.    top-level-trans
  27.       parallel begin
  28.          sub-trans-1
  29.             update A on server 1
  30.          end
  31.          sub-trans-2
  32.             update A on server 2
  33.          end
  34.       end
  35.    end
  36.  
  37. In which case we could not guarantee (without knowledge of the scheduling
  38. and concurrency control internal to server 1 and server 2) whether 
  39. the updates to A would be serialized identically at the two servers, given
  40. that other transactions might be simultaneously updating those account
  41. records, etc. We'd want to ensure that both subtransactions claimed the
  42. same locks in the same order with respect to competing transactions.
  43.  
  44. Instead we could do this:
  45.  
  46.    top-level-trans
  47.       serial-begin
  48.          sub-trans-1
  49.             update A on server 1
  50.          end
  51.    
  52.          sub-trans-2
  53.             apply results from sub-trans-1 to A on server 2
  54.          end
  55.       end
  56.    end
  57.  
  58. In this case we perform the logical operation on A at server 1, record the
  59. modified data items and apply those updates to server 2. Basically what
  60. this code is just a roundabout way of reading the journal from server 1 and
  61. applying the updates it records to server 2. 
  62.  
  63. I presume this is Dan Hepner's point, and he's right. Distributed nested
  64. transaction systems look like they will allow people to program this
  65. solution. My only comment would be that this doesn't look much easier than
  66. the solutions people are coming up with using Isis and non-distributed
  67. transactions. 
  68.  
  69. Has anyone actually implemented a primary-backup database using distributed
  70. transactions in this way? Are nested transactions (or at least some
  71. conditional commit mechanism) part of Tuxedo, Encina, etc?
  72.  
  73.        -- Robert
  74. --
  75. -- 
  76.