• Keine Ergebnisse gefunden

A primary goal in providing transaction processing prim i t ives within the VMS kernel was to supply many disparate applications with a stra ightforward interface to distributed transaction ma nagement.

This contrasts with most commercially ava ilable systems, where d istribu ted t ransaction manage­

ment functional ity is ava i lable only from a trans­

action processing moni tor. This latter form restricts the functional ity to appl icat ions written to exe­

cute under t he control of the transaction process­

ing monitor, and i t effect ively precludes other applicat ions from making use of the technology.

from the short t ime it took to make the required changes. Based on this experience, we expect t hird­

party software vendors to rapid ly take advantage of the DECdtm services as they become available as part of the standard VMS operating system.

From the ou tset of development, we endeavored to provide an interface that was suitable fo r as many applications as possible. We made early ver­

sions of the DECdtm services ava ilable within D igi tal to decrease the " time to market" for soft­

ware products that wished to exploi t d istribu ted t ransact ion process i ng technology. As of]u ly 1990, at least seven D igital software products have been mod ified to use the DECdtm services. These products are VAX Rdb/VMS, VAX DBMS, VAX RMS )ournali ng , VAX ACMS, DECin tact, VAX RALLY,

and VAX SQL.

To i ncorporate the D ECdt m services into a recoverable resource manager, t he ex isti ng inter­

nal transaction management mod u le with calls to the DECdt m serv ices must be rep laced. The resource m anager must also be modified to cor­

rect ly respond to the prepare and commit cal lbacks by the DECdtm services. Furt her, t h e recovery logic of the resource manager must be mod ified to obt a i n from t he DECdtm services the state of " i n transaction spans two nodes, NOD E_A and NODE_B, in a VMS network. During the course of the t rans­

action, recoverable resources managed by resource manage rs, RM_A and RM_B, are mod ified. Two

"appl ication" programs, APPL_A and APPL_B, that run on NODE_A and NODE_B, respect ively, make normal procedural cal ls to RM_A and RM_B. APPL_A In general, the modifications to these products

have been relatively minor, as might be i nferred

Figure 4a Model Illustrating the Use of DECdtm Services

Digital Technical journal Vtll. 3 No. I Winter 1991 4 1

Transaction Processing, Databases, and Fault-tolerant Systems

P R O G R A M A P P L A

E s t a b l i s h c o m m u n i c a t i o n s w i t h r e m o t e a p p l i c a t i o n

I P C _ L I N K ( n o d e = " N O D E_B " , a p p l i c a t i o n = " A P P L_ B " , l i n k = l i n k _ i d ) ; E x c h a n g e t r a n s a c t i o n m a n a g e r n a m e s

L I B $ G E T J P I ( J P I $_ C O M M I T_ D O M A I N , , , m y_ c d ) ;

I P C T R A N S C E I V E ( l i n k = L i n k_ i d , s e n d_ d a t a = m y_ c d , r e c e i v e_ d a t a = y o u r _ c d ) ;

S t a r t a t r a n s a c t i o n

$ S T A R T_ T R A N S W ( i o s b = s t a t u s , t i d = t i d ) ;

M a k e a p r o c e d u r a l c a l l t o R M A t o p e r f o r m a n o p e r a t i o n R M_ A ( t i d , r e q u e s t e d_ o p e r a t i o n ) ;

! N o w c r e a t e a t r a n s a c t i o n b r a n c h f o r t h e r e m o t e a p p l i c a t i o n

$ A D D B R A N C H W ( i o s b = s t a t u s , t i d = t i d , b r a n c h = b i d , c d_ n a m e = y o u r _ c d ) ;

A s k A P P L 8 t o d o s o m e t h i n g a s p a r t o f t h i s t r a n s a c t i o n

! P C T R A N S C E I V E ( l i n k = l i n k_ i d , s e n d_ d a t a = ( t i d , b i d , d a t a ) , r e c e i v e_d a t a = s t a t u s ) ;

A n d e n d t h e t r a n s a c t i o n

$ E N D T R A N S W ( i o s b = s t a t u s , t i d = t i d ) ;

P R O G R A M A P P L B ( l i n k i d )

4 2

E x c h a n g e t r a n s a c t i o n m a n a g e r n a m e s

I P C _R E C E I V E ( l i n k = L i n k_ i d , d a t a = s u p_ c d ) ; L I B $ G E T J P I ( J P I $_ C O M M I T_ D O M A I N , , , m y_ c d ) ; I P C _ R E P L Y ( L i n k = l i n k_ i d , d a t a = m y_ c d ) ;

N o w w e e x e c u t e t r a n s a c t i o n r e q u e s t s

l o o p ;

! P C R E C E I V E ( l i n k = l i n k _ i d , d a t a = ( t i d , b i d , d a t a ) ) ; S t a r t t h e t r a n s a c t i o n b r a n c h c r e a t e d b y A P P L_A .

$ S T A R T B R A N C H W ( i o s b = s t a t u s , t i d = t i d , b r a n c h = b i d , c d_ n a m e = s u p_ c d ) ;

! M a k e a p r o c e d u r a l c a l l t o R M_ B t o p e r f o r m a n o p e r a t i o n R M_B ( t i d , r e q u e s t e d_ o p e r a t i o n ) ;

T e l l A P P L A w e a r e d o n e

I P C R E P L Y ( l i n k = l i n k_ i d , d a t a = S S $_ N O R M A L ) ;

D e c l a r e t h a t w e a r e f i n i s h e d f o r t h i s t r a n s a c t i o n a n d w a i t f o r i t t o c o m p l e t e

$ R E A D Y T O C O M M I T W ( i o s b = s t a t u s , t i d = t i d ) ; e n d _ l o o p ;

Vol .. 3 No. I Winter 1991 Digital Technical jourrw/

R O U T I N E R M_A ( t i d , r e q u e s t e d_o p e r a t i o n )

I f t h i s i s t h e f i r s t o p e r a t i o n , r e g i s t e r w i t h D E C d t m s e r v i c e s a s a r e s o u r c e m a n a g e r . A s p a r t o f t h e r e g i s t r a t i o n w e d e c l a r e a n e v e n t r o u t i n e t h a t w i l l b e c a l l e d d u r i n g t h e v o t i n g p r o c e s s .

i f f i r s t t i m e w e ' v e b e e n c a l l e d t h e n

$ D E C L A R E R M W ( i o s b = s t a t u s , n a m e = " R M_A " , e v t r t n = R M_ A _ E V E N T , r m_ i d = r m_ h a n d l e ) ;

I n f o r m D E C d t m s e r v i c e s o f o u r i n t e r e s t i n t h i s t r a n s a c t i o n

i f t i d h a s n o t p r e v i o u s l y b e e n s e e n t h e n

$ J O I N R M W ( i o s b = s t a t u s , r m_ i d = r m_h a n d l e , t i d = t i d , p a r t _ i d = p a r t i c i p a n t ) ;

1 P e r f o r m t h e r e q u e s t e d o p e r a t i o n

D O_O P E R A T I O N ( r e q u e s t e d_o p e r a t i o n ) ; R E T U R N

R O U T I N E R M A E V E N T ( e v e n t b l o c k )

! S e l e c t a c t i o n f r o m t h e D E C d t m s e r v i c e s e v e n t t y p e C A S E e v e n t b l o c k . D D T M $ L O P T Y P E F R O M . . . T O . . .

D o " r e q u e s t t o p r e p a r e " p r o c e s s i n g

[ D D T M $ K_ P R E P A R E J :

D O P R E P A R E A C T I V I T Y ( r e s u l t = s t a t u s , t i d = e v e n t _ t y p e . D D T M $ A_T I D ) ; D o " o r d e r t o c o mm i t " p r o c e s s i n g

[ D D T M $ K_ C O M M I T J :

D O C O M M I T A C T I V I T Y ( r e s u l t = s t a t u s , t i d = e v e n t _t y p e . D D T M $ A_T I D ) ; D o " o r d e r t o a b o r t " p r o c e s s i n g

[ D D T M $ K_A B O R T J :

D O A B O R T A C T I V I T Y ( r e s u l t = s t a t u s , t i d = e v e n t _t y p e . D D T M $ A_T I D ) ;

E S A C ;

I n f o r m t h e D E C d t m s e r v i c e s o f t h e f i n a l s t a t u s o f o u r e v e n t p r o c e s s i n g .

$ F I N I S H R M O P W ( i o s b = i o s b , p a r t _ i d = e v e n t _t y p e . D D T M $ L_P A R T_ I D , r e t s t s = s t a t u s ) ;

R E T U R N

Figure 4b Pseudocode Illustrating the Use of DECdtm Services

and APPL_B use an interprocess com munication mechanism to communicate i nformation across the network. The DECdtm se rvice cal ls are pre­

fi.."Xed with a dollar sign ($).

ROUTINE RM_A_EVENT, is i nvoked by the DECdtm services during transaction state trans it ions.

The code for the resource managers, RM_A and RM_B, is identical with respect t o calls for the DECd t m services. The resource manager rou t i ne ,

Digital Technical journal Vol. 3 No. I Winter 1991

Conclusions

The addi t ion of a d istributed transaction manager to the kernel of the general-purpose VMS operating system makes d istribu ted transactions ava ilable

43

Transaction Processing, Databases, and Fault-tolerant Systems

to a wide spectrum of appl ications. This des ign and implementation was accompl ished with com­

parat ive ease and with qual i t y performance. In add i t ion to uti l izing the most commonly described opt i mizations of the two-phase com m i t protoco l, we have used optim izations that explo i t some of the u n ique benefits of the VAXcl uster system.

Acknowledgments

We wish to gratefu l l y acknowledge the contrib­

ut ions of all the transaction processi ng architects involved, and in particu lar Vijay Trehan, for del iver­

ing to us an u nderstandable and implement­

able archi tecture. We also extend our thanks to Phi l Bernste i n for his encouragement and advice, and to our i n i t ial users, Bill Wright, Peter Spiro, and Lenny Szubowicz, for the ir pers istence and good nature.

Finally, and most i mportan t l y, we would l ike to t hank all the DECd t m development engineers and the others who helped s h i p the p roduct:

Stuart Bay ley, Cathy Foley, Mike Grossmith, Tom Hard i ng, Tony Hasler, Mark Howe l l , Dave Marsh, Jul ian Pa lmer, Kevin Playford , and Chris Whitaker.

References

I . R . Haskin, Y. Malachi , W Sawdon, and G. Chan,

" Recovery Management i n Qu icksi lver,'' ACLl-'1 Transactions on Computer Systems, vol. 6, no. 1 (February 1988).

2. A. Spector et al. , Camelot: A Distributed Trans­

action Facility for Mach and the Internet - An Interim Report (Pi t ts burgh: Carnegie M e l lon Un iversi ty, Department of Computer Science, June 1987).

). W Bruckert, C. Alonso, and J. Melvin, "Verifi­

cation of the First Fau lt-to lerant VA..'{ System,"

Digital Technical journal, vol. 3, no. 1 (Wi nter 1991 , this issue): 79 -85.

4.

J.

Gray, "A Census of Tandem System Ava i la­

bi l i ty between 1985 and 1990," Tandem Techni­

cal Report 90.1 , part no. 33579 (January 1990).

5. P Bernstei n , V Hadzilacos, a n d N . Goodman, Concurrency Control and Recovery in Data­

base Systems (Read i ng, MA: Add ison-Wesley, 1987).

6.

J.

Gray, " Notes on Database Operating Systems,"

In Operating Systems: An A dvanced Course (Berlin: Spri nger-Verlag, 1978).

44

7. B . Lampson , "Atomic Transact ions," In Dis­

trib uted Systems-Architecture and Imple­

mentation: A n A duanced Course, ed i ted by G. Goos and J. Hartmanis (Be r l i n : Spri nge r­

Ve rl ag, 1981).

8. C. M ohan, B. Lindsay, and R . Obermarck,

"Transact ion Management i n the R* Distributed Database Management System ," ACM Tra ns­

actions on Computer Systems, vol . 11, no. 4 (December 1986).

9. C. Mohan and B. Lindsay, "Efficient Com m i t Protocol for the Tree o f Processes Model of Distributed Transact ions," Proceedings of the 2nd ACM SIGACT/SIGOPS Symposium on Prin­

ciples of Distributed Computing (Montreal, August 1983).

10. D. Duchamp, "Analysis of Transaction Manage­

ment Performance," Proceedings of the Twelfth ACM Symposium on Operating Systems Prin­

ciples (Special issue), vol. 23, no. 5 (December 1989): 177- 190.

1 1 . N. Kronenberg, H . Levy, and W Strecker,

"VAXclusters: A Closely-Coupled Distribu ted System," AOH Transactions on Computer Systems, vol. 4, no. 2 (May 1986).

Vol. 3 No. 1 Winter 1991 Digital Technical journal

Thomas K. Rogers Wael H. Bahaa-El-Din

Performance Evaluation