ࡱ> Root Entry!'!!!!!! Fs@ 7Ϻ!WordDocument!!!!!!!!!!!!!0CompObj!!!!!!!!!!!j!SummaryInformation!!!!(!!!`#! 2*&'(A+,-.1:3456789D;<=>?NBCLEFGHIJKV@OPQRSTU^WXYZ[\]%_`abcdefghiuRoot Entry!'!!!!!! FsAϺ!WordDocument!!!!!!!!!!!!!CompObj!!!!!!!!!!!j!SummaryInformation!!!!(!!!`# 2 "$)&'(A3456789DBCLEFGHIJKVMjWXYZ[\]%klmnopqrstvwxyz{|}~>A A A>@ AA] @ )AAA?+A -A -@ /A@ 1A( 1A)?@U 1@ÁAW AāA~ AiIA AˁA A.A AoIAzIAIAIAIAIAIA AN@AENAAaNAAeNA AHAfNAOAԁAwAgNAAAAAA@AkNA^AlNAbAmNAsNANANANANANANANAN@A3A3A3A)A3A+A 3ANANANANANANA\3ANA3A.3A6A/3AN/3AO/3AP/3@5ANA7@9AA&ANANANAOAeAA\/AASA]/A^/A_/Ad/AOA/AA/A/AA8A&O@@8A8A8A8;A8AC FMicrosoft Word Document MSWordDocWord.Document.69qࡱOh+'0   H T ` lx Jim Gray Jim Grayp Normal.dot Jim Gray12Microsoft Word for Windows 95@@k}Ϻ@)鷺@DϺ Tz/՜.+,0HPdlt |  Microsoft6e  Jim Grayࡱ> ࡱ> f the regular product -- each with slightly different performance-functionality tradeoffs. We are not arguing that queued processing is bad -- quite the contrary. Queued processing has been a common transaction processing style and will continue to be very important in the future. Queued processing is increasingly important for workflow, disconnected operation, and replication applications. It has always been the mainstay of batch and spool operations. The controversial opinion here is that I believe queues are best built as a naive resource manager atop an object-relational database system. That system must have good concurrency control, recovery, triggers, and utilities -- indeed it must be a good TP-lite system. 2. Queues Are Interesting Databases Storing queues in a conventional database has considerable appeal. The idea is that queues are encapsulated as a database class with create(), enqueue(), dequeue(), poll(), and destroy() methods. By using the database, the queue manager becomes a naive resource manger with no special code for startup, shutdown, checkpoint, or even commit. Rather it is just a simple application. In addition, it benefits from all the database utilities to query, backup, restore, reorganize, and replicate the data. Queues pose difficult problems when implemented atop a database. An enqueue request transaction is an insert followed by a commit. This places extreme performance demands on the concurrency control and recovery components of a database -- it exposes hotspots and high-overhead code. The dequeue transaction typically involves deleting a record from the queue, processing the request, enqueuing results in other queues, and then committing. Serializable isolation requires that there can be at most one dequeue executing at a time. This suggests that queues need lower, indeed specialized, isolation levels. In Gray and Reuter [ibid. pp. 402] we outlined the concurrency control mechanisms needed to implement queues within a database: 1. READ-PAST locks allow a program to skip over dirty (uncommitted records) to find the first committed record. This is what a dequeue operation wants. 2. READ-THROUGH locks allow a program to examine records that have not yet been committed. This is useful in polling the status of a queued request that is currently being processed. 3. NOTIFY LOCKS (events) allow a program to wait for a state change in a lock. This allows a dequeue operation to wait for the queue to become non-empty. Non-transactional queues are sometimes needed for performance reasons. The same reasons encourage us to support non-transactional tables in an SQL database. These tables and queues are not durable (do not survive system restart or media failure), but have low overhead. The paradox is that queues are just an application data structure. Their concurrency control and recovery needs appear in many other contexts. An auction application looking for a set of sellers to match a buyer needs exactly these lock modes. One sees similar needs when looking workflow, CASE, and parallel programming models like Linda where an application wants any free tuple (read past locks and notify locks help here). There is a pattern here. Each new requirement for a queuing system seems to reflect a corresponding requirement for user-application data. This recurs when one considers query interfaces to queues, queue performance monitoring, queue backup/restore/recovery utilities, queue security, and so on. Indeed, Richard Carr reports that when a queueing mechanisms was added to Tandems database servers, several applications became simpler and faster. 3. Queue Managers Are Simple TP-Monitors So far, the discussion has ignored the question of server pool management. Some queues have a server pool attached to them. TP-monitors configure, manage, and load-balance these pools. Typically the pool is allocated with a minimum and maximum number of servers. At startup, the pool is configured at its minimum size. As traffic on the queue grows, the pool grows. As traf AM<AA^<AAl<A<AA<@<ARA<A<A<A<AӀA<@]AgIA+@[AlAAAAAAAAA@OAX=AY=AZ=A[=A\=AQ@]=AZ!Af#A^=@=@=@=A=A=A=A=@=A!A#A#@=A=A=@=@=A=A@=A!A#A#A=A#A=A=A=A=A=A=Aހ@=@=@=@ A=A>Aj>Am>A|>A>A>A߀A>A>A>A>A>A>A>@>@>A %AA %A %A>%Aa %AAhArAwAA@ '@ A A>A>A A A>A A A>@ AA] @ )AAA?+A -A -@ /A@ 1A( 1A)?@U 1@ÁAW AāA~ AiIA AˁA A.A AoIAzIAIAIAIAIAIA AN@AENAAaNAAeNA AHAfNAOAԁAwAgNAAAAAA@AkNA^AlNAbAmNAsNANANANANANANANAN@A3A3A3A)A3A+A 3ANANANANANANA\3ANA3A.3A6A/3AN/3AO/3AP/3@5ANA7@9AA&ANANANAOAeAA\/AATAӍAZA]/A^/A_/Ad/AOA/AA/A/AAA8A&O@@8A8A8A8;A8AC=AW=@ ?A8?A9?A"?AMO@?@hA`OAAO@AOAAO@qAO@AOAMAOAAAA@AAAAAAOAOAOAPAAAPAPAAA&PAA@C@EAFPGAEEAHPGAEAJPGAEA @E@YAZI@K@ALPAAlPAAPAPA QAQAA4Q@AANAASAAVAA`A@QAAFQAAA$A)!A&A.!ALQA(ARQA_QA,AQ@?!Ai!MAr!AQ@!A!A!M@!A!A!M@!A3"ACAF"Ah"Al"A"AL@"A"OAQA%#OASAt@5#O@9#AQA@#AuAT#AQAY#A#AAAAAŽA͎A֎A#AQA#A׎A AQA $AQAl$AQAQ@$AA$AAA$AA$AQA%AQARA-RA+%A/RAFRA"AH%A,A-A%ARR@&A&ARA'A='@S'A.A/@ )A7A`)A)A*AFAcAfAg@*A/+I@:+K@;+A|At+AA+AA+AA+@,A4,QA@i,S@m,SA,SA@,SA,SARU@,SA,@]A]A]@XeABsAFsAeAsAeAsAsAsAeAsAeAeAeAeAsA%fANfAPfAAAfAfAAfAfAsAfAfAf@fA*gAA2gADgAYgAяAsAsAvAҏAvA"vA&vA'vA(vA+vA2vA4vA:vA AUvA~gAmvAvvAAvAgAAgAAAgAgAgAgAgAhA hAhA0hA1hA2hAjhA @h@hAhA@hAhAhAhAhAhAhAhAhAiAiAiAiA2iA9iADiAEiAYiAti@uiAviAyiAziAAiAiAiAiAi@o-WAiAiAr-I@~-K@-ARARARARAp.ASA.@S@-A]A<.A>.A]AM.@SA&SA'SA8SA:SA;SA=SA>SAp.AZSA.@[SA\S@A^SAA`SAAiSAArSAsSAA<AA{SA|SAAASASAJ=ASA)=ASAS@SASAU9AW9ASASA9AS@S@SA.@.@.@.A+?@1?@2?A3?@9?@:?A;?@B?@C?AD?@J?@K?AL?@S?@T?AU?@[?@\?ASAS@S@S@c?@d?A]?@^?@_?A`?@a?@b?Ae?@f?@g?@h?@.{Times New Roman Symbol &Arial"Helvetica New YorkTimes New Roman Times Tms Rmn"&ԫ Tz/ e Y+,Jim GrayJim GrayJim Grayࡱ> /ܥhW e.952p8XXhBBB(<((( 4.b"({ߦߦߦ-. : F'X,dH(BߦDߦߦߦd''''ߦH4B5@ϺV8^x8^ߦ''Jim Gray Microsoft, 301 Howard St., S.F., CA. ????????? Gray@Microsoft.com THESIS: Queues are Databases revised October 25, 1995 Abstract: Message-Oriented-Middleware has become a popular buzzword. It describes the industry that offers queued transaction processing as an advance over pure client-server transaction processing. This brief note makes three points: 1. Queued transaction processing is less general than direct transaction processing. One can build a queued system on top of a direct system. One cannot build a direct system atop a queued system. Conversational and distributed transactions are very difficult in a queued system. 2. Queues are interesting databases with interesting concurrency control. It is best to put these mechanisms into a standard database so other applications can use these interesting features. 3. Queue managers are simple TP-monitors managing server pools driven by queues. Acknowledgments: These ideas derive from discussions with Andrea Borr, Richard Carr, Dieter Gawlick, Franco Putzolu, and Andreas Reuter. 1. Queues Are Best Built Atop Direct TP Systems. Traditionally TP systems offer both queued and direct transaction processing. They offer both client-server and peer-to peer direct processing. Gray & Reuter [pp. 246] offer the following common taxonomy of process-to-process communication: Direct Peer-To-Peer: either process can initiate requests or responses. Client-Server: client sends requests to server, server responds. Queued Placing request in queue is one ACID transaction. Processing the request is a second ACID transaction. Consuming queued response is a third ACID transaction. In queued processing, requester processes place request messages in a queue. A pool of server processes, managed by=AW=@ ?A8?A9?A"?AMO@?@hA`OAAO@AOAAO@qAO@AOAMAO@AAAOAOAOAPAAAPAPAAA&PAA@C@EAFPAEEAHPAEAJP@E@YAZG@I@ALPAAlPAAPAPA QAQAA4Q@A@QAAFQAAALQA_QAj a TP-monitor, service these request queues, perhaps placing results in other queues. Requesters can poll these output queues to see the status or outcome of their transaction requests. Queued processing is the basic mechanism of IMS, so we have 30 years experience with its pros and cons. Advocates of queued processing point out that, at saturation, a direct system is really a queued system: servers are dispatched via a queuing mechanism. When clients saturate a server pool, the queues become visible. DocumentSummaryInformation8 Indeed, it is optimal to schedule new requests to a server pool via a single global queue. The difficulty is that queued transaction processing of a request-response is three ACID units: 1. Requester places request in queue. 2. Server dequeues request, performs task, enqueues response. 3. Requester dequeues response from output queue. This tri-ACID unit model has the virtue of decoupling the requester from the server, but has the flaw that it makes multi-request transactions impossible. Implementing viced. Similar requirements appear in el programming models like Linda, , , ion has ignored the question of (threads or processes) The servers in this pool are dedicated to servicing entries in the queue. You see this in batch job schedulers, print spoolers, and in many transaction processing systems. (aka: ORBs) . Thestarts (this is what the gray boxes are doing in Figure 1)..your,All mread, The triggers. They may, or they may begin a new top-level asynchronous transaction FORTRAN,, or the DBMS procedural language (Transact SQL or PL/SQL or )User-written procedures are usually Rdb uses a separate process per user to manage good management and dispatching[Chamberlin] D. Chamberlin, Using DB2 Common Server, IBMs New Object Relational Database System. 6 [Stonebraker] M. Stonebraker, Object Relational, The Next Great Wave in Databases6  (Oracle) (Tandem) (Oracle) (Oracle) (U. Stuttgart) and ().  : , MOM: message oriented middleware. The three parts of a tri-ACID queued transaction /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&Adistributed transactions, conversational transactions, or multi-step transactions on top of a queued system requires building a lot of application-level machinery. By contrast, direct transaction processing systems can easily add a queuing mechanism by implementing a direct transaction that places requests in queues, and by having pools of servers that poll these queues. Indeed, this is the course that CICS, ACMS, and Encina have taken. At last count, CICS had over six distinct queue managers as part oQ@?!Ai!KAr!AQ@!A!A!K@!A!A!K@!A3"@"A"MAQ@%#M@9#AQA@#AQAY#AQA#AQA $AQAl$AQAQ@$AQA%AQARA-RA+%A/RAFRAH%ARR@&ARA'A='@S'A/+G@:+I@;+@3,O@l,O@,OA,OA,OAR@,OA,@]A]A]@XeABsAFsAeAsAeAsAsAsAeAsAeAeAeAeAsA%fANfAPfAfAfAfAsAfAfAf@fA*gADgAsAvAvA"vA&vA'vA(vA+vA2vA4vA:vA AUvA~gAmvAvvAvAgAAgAvAAgAgAgAgAgAhA hAhA0hA1hA2hAjhA @h@hAhAh@hAhAhAhAhAhAhAhAhAiAiAiAiA2iA9iADiAEiAYiAti@uiAviAyiAziAiAiAiAi@o-QAiAiAr-G@~-I@-ARARARARAp.ASA.@S@-A]A<.A>.A]AM.@SA&SA'SA8SA:SA;SA=SA>SAp.AZSA.@[SA\S@;A^SAA`SAAiSAArSAsSAA<AA{SA|SAAASASAJ=ASA)=ASAS@SASAU9AW9ASASA9AS@S@SA.@.@.@.A+?@1?@2?A3?@9?@:?A;?@B?@C?AD?@J?@K?AL?@S?@T?AU?@[?@\?ASAS@S@S@c?@d?A]?@^?@_?A`?@a?@b?Ae?@f?@g?@h?@.{Times New Roman Symbol &Arial"Helvetica New YorkTimes New Roman Times Tms Rmn"& <. d Y+,Jim GrayJim GrayJim Grayࡱ> /ܥhW e.852p8{XӍg< (ד"{TTT- Ǚ ӚX,,#TDTTTT`4Ϻю8 ^8+^TJim Gray Microsoft, 301 Howard St., S.F., CA. ????????? Gray@Microsoft.com THESIS: Queues are Databases revised October 25, 1995 Abstract: Message-Oriented-Middleware has become a popular buzzword. It describes the industry that offers queued transactific shrinks, the pool shrinks. If a server fails, a new server is allocated. If too many servers fail in a time window, the TP-monitor declares the queue broken and human intervention is required. Operator and programmatic interfaces are defined to create, configure, query, and control (start/stop/redefine) queues. Queued processing has many variants: Periodic: Servers are created at certain times, Event: Servers are created on demand when a request first arrives in a queue. Batch: Servers are created when the queued grows to a certain size. Queues have a FIFO scheduling policy by default, but it is often desirable to have a priority scheme whereby some queue elements are processed before others if the pool is saturated. Gee! This sounds like a lot of stuff you do not find in a database system. But... what about triggers? Modern database systems allow users to associate procedures with data records. These trigger procedures fire when records are inserted, deleted, or updated. Currently, the triggers fire at the time of the operation (immediate), or at the time of commit (deferred) -- and they execute within the ACID transaction of the operation that fired the trigger. Trigger procedures are out-calls from the DBMS. Typically they are written in C, COBOL, FORTRAN or Visual Basic. In general they have to be executed in a protection domain separate from the requester and separate from the DBMS. Consequently, they are typically executed in a separate process (address space). Sybases OpenServer design is typical of this idea -- although it uses a single multi-threaded process rather than having a separate protection domain per trigger. Oracles Rdb uses a separate process to process outcalls. Managing the trigger processes is a chore. For performance, they must be pre-allocated. There must be a load-control facility to prevent saturation. The pools must grow and shrink with demand. Gradually, the trigger-execution mechanism of the DBMS merges with the DBMSs TP-lite front-end dispatcher to make a fairly general TP-lite monitor. Indeed, the Sybase OpenServer started as a front-end, then became a side-end (trigger) and back-end (gateway) mechanism. So DBMS systems are growing a server pool management system. This is part of the evolution of TP-lite to TP-heavy. Not much is needed to add queued processing to a TP-lite DBMS. First one must implement the queues as an encapsulated type atop the Object-Relational system. Then one must recognize that triggers may be fired as part of a transaction, or fired asynchronously as a new ACID unit (either immediately, or if and when the transaction commits). This small conceptual leap and a simple matter of programming gives a simple queued transaction processing system. It should be as scaleable and robust as the underlying DBMS. 4. Summary Many people are building queue managers from bare metal as a transactional resource manager and a TP-lite monitor. An alternative approach is to evolve Object-Relational systems to support the basic mechanisms needed to build a queuing system: reduced isolation levels and fine granularity locking efficient support for simple transactions. asynchronous trigger invocation executed by server pools management of server pools. These basic facilities enable the implementation of queue managers but also make the DBMS more useful to other applications. 5. References [Bernstein, Hsu, & Mann] P.A. Bernstein, M. Hsu and B. Mann. Implementing Recoverable Requests Using Queues. Proc.. ACM SIGMOD. Atlantic City, NJ. 1990 [Gray & Reuter] J. Gray and A. Retuer.Tranasaction Processing Concepts and Techniques, Morgan Kaufmann, San Francisco, 1993. HPTS 95 Position Paper: Queues are Databases /= (conversational) But, given such a base, a queue manager would be one of the first class libraries I would write.a the database system does all the hard stuff like locking, logging, access paths, recovery, utilities, and so onThe queue manageron processing as an advance over pure client-server transaction processing. This brief note makes three points: 1. Queued transaction processing is less general than direct transaction processing. One can build a queued system on top of a direct system. One cannot build a direct system atop a queued system. Conversational and distributed transactions are very difficult in a queued system. 2. Queues are interesting databases with interesting concurrency control. It is best to put these mechanisms into a standard database so other applications can use these interesting features. 3. Queue managers are simple TP-monitors managing server pools driven by queues. Acknowledgments: These ideas derive from discussions with Andrea Borr, Richard Carr, Dieter Gawlick, Franco Putzolu, and Andreas Reuter. 1. Queues Are Best Built Atop Direct TP Systems. Traditionally TP systems offer both queued and direct transaction processing. They offer both client-server and peer-to peer direct processing. Gray & Reuter [pp. 246] offer the following common taxonomy of process-to-process communication: Direct Peer-To-Peer: either process can initiate requests or responses. Client-Server: client sends requests to server, server responds. Queued Placing request in queue is one ACID transaction. Processing the request is a second ACID transaction. Consuming queued response is a third ACID transaction. In queued processing, requester processes place request messages in a queue. A pool of server processes, managed by a TP-monitor, service these request queues, perhaps placing results in other queues. Requesters can poll these output queues to see the status or outcome of their transaction requests. Queued processing is the basic mechanism of IMS, so we have 30 years experience with its pros and cons. Advocates of queued processing point out that, at saturation, a direct system is really a queued system: servers are dispatched via a queuing mechanism. When clients saturate a server pool, the queues become visible. Indeed, it is optimal to schedule new requests to a server pool via a single global queue. The difficulty is that queued transaction processing of a request-response is three ACID units: 1. Requester places request in queue. 2. Server dequeues request, performs task, enqueues response. 3. Requester dequeues response from output queue. This tri-ACID unit model has the virtue of decoupling the requester from the server, but has the flaw that it makes multi-request transactions impossible. Implementing distributed transactions, conversational transactions, or multi-step transactions on top of a queued system requires building a lot of application-level machinery. By contrast, direct transaction processing systems can easily add a queuing mechanism by implementing a direct transaction that places requests in queues, and by having pools of servers that poll these queues. Indeed, this is the course that CICS, ACMS, and Encina have taken. At last count, CICS had over six distinct queue managers as part o>SZS[S\S]S^S_S`SiSrSsS{S|SSSSSSSSSSSSSSSSSSS]]]]]]]]]]]]XeeeeeeeeffffNfPfffffff*ggggggh hh0h1h2hjhhhhhhhhhhhhhhiUVI Uc$IuuDPIcIIVIY(&(>hxx ww&I (& (& (>ax wwh&(&(& o($ 0 (  !Q !Q& !Q !Q$<xI$_x$4x$;x(_)Z^&+(&(>/b    &(&(&T(>*   &(&U(&)Y($l9i !Q !Q$ 5 !Q !Q$9i !Q !Q(i  !Q !Q( i  !Q !Q(i  !Q !Q@ n small industry HETEROu Transaction 5. Reconsideration 48<I !.7=FLhisR+\*OPQf W a Z[/+0+;+q-~-------A.p.........N/O/P/\/]/^/_/d////uuD]c]cVc UcIUcU UcIUccIcT 8KLiqO*+\]PX R \ ] $ W [\!!!!!W!!!!!!!!!!'!!!!!!!!!!!!!!!!!!!!!!!!!!!h+!"hi<YZ@A@!A!g!!!3"""9#:#$$&&((")#).+/+;+<+1,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!h,1,j,,,,p-q---......899<^=========!!!!!!!!!!!!,!,rhOO,O,O,O,rhOO, l ,"xx h 48h. h 48h. 0K @ Normal ]a c"A@"Default Paragraph Font @ Footer !queues. In addition it piggybacks on the TP-lite and trigger mechanisms of the database system Performance: Concurrency control: /= Research94105Decemberom (MOM) MOM (DAD and RPC remote procedure call (RPC) and direct access to data (DAD)) Qsare built sYou Queue systems need DBMS functionality. Queues need security, configur\Queue_is/888888899939<9A9I9J9K9Q9U9W9c9z9}9~999999999999999999<(<+<,<;<D<<<<<<<"=1=2=X=Y=Z=[=\=]=^=======================uDUacIuDaIuDUaII UcIcIuTation, performance monitoring, recovery and reorganization utilities. DBMSs already have the functionality. A full-function MOM system duplicates the operations and utility functions of a DBMS. Database systems are encompassing many of these features as they evolve to TP-lite systems. and a NetWeave white paper written by Bill Highliman. Responses are not necessarily paired to requests.   queuereads queue and places response in output queue, client reads output queue. The shaded boxes in the figure represent a dispatcher that binds client requests to servers. The dispatcher was traditionally called a TPmonitor; today such dispatchers are called Object-Request Brokers (ORBs). ClientsIBMs the TPmonitor dispatches to do load controlClient  server client servers client servers client 2 1 3 /=00&;gf(./$x2/({ ZaNeNfNgNkNlNmNsNNNNNNNNNNNNNNNNNNNNOO&OMO`OOOOOOOOOOOOOPPP&PFPHPJPLPlPPP QQ4Q@QFQLQ_QjQQQQQQQQQQQQR-R/RFRRRRRRRRRSSS&S'S8S:S;S=S>SVIUIuDPII^>SZS[S\S]S^S_S`SiSrSsS{S|SSSSSSSSSSSSSSSSSSS]]]]]]]]]]]]XeeeeeeeeffffNfPfffffff*ggggggh hh0h1h2hjhhhhhhhhhhhhhhiUVI Uc$IuuDPIcIIVIYSSSSS]]]]]]Yefhhhviivjā<!h!h!h!h!!h!h!h!h!h!h h 4h.hK&`&Normalh ]a c.@. Heading 1 < U]ck*@* Heading 2 <UV]"A@"Default Paragraph Font @ Footer !"@" Footnote Textc &@ Footnote Referenceh @" Header ! This position paper was intended to generate controversy. Amazingly, everyone agreed! I was astonished. This seemed like a repeat of the TP-heavy TP-lite debate which I never intended to win. So, in defense of MOM, one must point out that my discussion assumes a homogeneous environment: one compatible database and transport uber alles. In essence it says: if you got DAD you can build MOM. The flaw in this argument seems to be that DAD presumes that the DBMS has direct access from everywhere and to everywhere. It has gateways into Tandem, Prime, Apollo, NCR, Singer, Harris, . The queues need to be stored on both client and server so the DBMS must exist on all these exotic platforms (no offense intended). Many of the MOM companies make their living by porting a minimalist database (a queue system) to these exotic platforms for a fee. My conclusion from this are DADs (OR-DBMSs) will evolve to provide queues. Portable systems like Oracle, Sybase, Informix, DB2/CS will offer heterogeneous queuing among commodity platforms. MOMs will thrive on connecting exotic heterogeneous systems together. 6 /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($ 0 (  !Q !Q& !Q !Q$<xI$_x$4x$;x(_)Z^&+(&(>/b    &(&(&T(>*   &(2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($2 0(h,i  !Q !Q2 0(<i  !Q !Q.0$ 5 !Q !Q.0$T(9i !Q !Q0/&  !Q !Q./$$x/v>I$_x$4x$;x(_)Z^0/&K(0/&(H/>    00&(00&(00&<(H0>   00&|(00&=(00&y(2 0(di  !Q !Q. 0$P9i !Q !Q1 . four clientSince each message exchange is three ACID units, one cannot wrap a multi-step dialog in a single ACID transaction unit. =====>j>m>|>>>>>>>>>>>>>>>>???????%?&?'?(?)?*?+?1?2?3?9?:?;?B?C?D?J?K?L?S?T?U?[?\?]?^?_?`?a?b?c?d?e?f?g?h?i?]I^I_I`IcIgIhIiIoIzIIIIIIINENaNcIuDPUcIu UbcIuDaIcIIV===========>>+?2?3?:?;?C?D?K?L?T?U?\?]?_?`?b?c?d?e?g?h?i?`ISS\S^SSO,O,O,O,rhOO,O,O,O,!h!h!!h!h!h0xx l ,"(Many IMS customers have invested millions of dollars in such efforts. as a new transaction type. They eThisImUsing Bill Highlimans acronyms, the world needs both MOM and DAD. [Chamberlin], [Stonebraker]security, operations interfaces, are a database class security, performance monitoring, for process and server pool management against each queueGray and Reuter [ibid. pp. 402] Read_Past ()Read_Through Notify ()An emergency dispatch application needs to find the highest-priority request not yet being ser&U(&)Y($l9i !Q !Q$ 5 !Q !Q$9i !Q !Q(i  !Q !Q( i  !Q !Q(i  !Q !Q@ at the High Performance Transaction Processing Workshop (HPTS)either or was so disgusted that they left the room. In the end, there was no heated discussion. In universal, and that it hiiii2i9iDiEiYitiuiviyiziiiiiiiiiBsFssssssssssvv"v&v'v(v+v2v4v:vmvvvvvvvv  ijӀހ߀hrwÁāˁԁ)+6;<U{cIuDaIuI[as storage everywhere. It has to have a presence on Prime, Apollo, Unisys, Burroughs, NCR, Singer, Harris, Sequent, Next, NetWare,Q, /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($ 0 (  !Q !Q& !Q !Q$<xI$_x$4x$;x(_)Z^&+(&(>/b    &(&(&T(>*   &(&U(&)Y($l9i !Q !Q$ 5 !Q !Q$9i !Q !Q(i  !Q !Q( i  !Q !Q(i  !Q !Q@BoroughsQueues Thus, The cost of porting a full-blown DBMS to such systems is prohibitive. It is difficult to build direct, c, or atopbuildsystem ,Database systemssefeaturesthese database featuresserver pool . Todayclients If the client and server on different computers, the queue may be replicated at both the client and server node so that either end can generate and process messages even if when disconnected. benefitliability, and have a third transaction that queries the output queuesapproachTuxedo, Topend, a manager isGiven Pat Helland (Microsoft), /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($2/(  !Q !Q0/& !Q !Q./$$x/v6I$_x$4x$;x(_)Z^0/&C(0/&(H/>z    0/&SSSSS]]]]]]Yefhhhviivjā<!h!h!h!h!!h!h!h!h!h!h h 4h.hK&`&Normalh ]a c.@. Heading 1 < U]ck*@* Heading 2 <UV]"A@"Default Paragraph Font @ Footer !"@" Footnote Textc &@ Footnote Referenceh @" Header ! This position paper was intended to generate controversy. Amazingly, everyone agreed! I was astonished. This seemed like a repeat of the TP-heavy TP-lite debate which I never intended to win. So, in defense of MOM, one must point out that my discussion assumes a homogeneous environment: one compatible database and transport uber alles. In essence it says: if you got DAD you can build MOM. The flaw in this argument seems to be that DAD presumes that the DBMS has direct access from everywhere and to everywhere. It has gateways into Tandem, Prime, Apollo, NCR, Singer, Harris, . The queues need to be stored on both client and server so the DBMS must exist on all these exotic platforms (no offense intended). Many of the MOM companies make their living by porting a minimalist database (a queue system) to these exotic platforms for a fee. My conclusion from this are DADs (OR-DBMSs) will evolve to provide queues. Portable systems like Oracle, Sybase, Informix, DB2/CS will offer heterogeneous queuing among commodity platforms. MOMs will thrive on connecting exotic heterogeneous systems together. 6 /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($ 0 (  !Q !Q& !Q !Q$<xI$_x$4x$;x(_)Z^&+(&(>/b    &(&(&T(>*   &(&U(&)Y($l9i !Q !Q$ 5 !Q !Q$9i !Q !Q(i  !Q !Q( i  !Q !Q(i  !Q !Q@ at the High Performance Transaction Processing Workshop (HPTS)either or was so disgusted that they left the room. In the end, there was no heated discussion. In universal, and that it hiiii2i9iDiEiYitiuiviyiziiiiiiiiiBsFssssssssssvv"v&v'v(v+v2v4v:vmvvvvvvvv  ijӀހ߀hrwÁāˁԁ)+6;<U{cIuDaIuI^as storage everywhere. It has to have a presence on Prime, Apollo, Unisys, Burroughs, NCR, Singer, Harris, Sequent, Next, NetWare,Q, /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$(0/&(0/&<(H0>   00&|(00&=(00&q(.0$T 9i !Q !Q.0$  5 !Q !Q.0$9i !Q !Q20(,i x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($ 0 (  !Q !Q& !Q !Q$<xI$_x$4x$;x(_)Z^&+(&(>/b    &(&(&T(>*   &(&U(&)Y($l9i !Q !Q$ 5 !Q !Q$9i !Q !Q(i  !Q !Q( i  !Q !Q(i  !Q !Q@BoroughsQueues Thus, The cost of porting a full-blown DBMS to such systems is prohibitive. It is difficult to build direct, c, or atopbuildsystem ,Database systemssefeaturesthese database featuresserver pool . Todayclients If the client and server on different computers, the queue may be replicated at both the client and server node so that either end can generate and process messages even if when disconnected. benefitliability, and have a third transaction that queries the output queuesapproachTuxedo, Topend, a manager isGiven Pat Helland (Microsoft), /=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($2/(  !Q !Q0/& !Q !Q./$$x/v6I$_x$4x$;x(_)Z^0/&C(0/&(H/>z    0/&(0/&(0/&<(H0>   00&|(00&=(00&q(.0$T 9i !Q !Q.0$  5 !Q !Q.0$9i !Q !Q20(,i  !Q !Q20((i  !Q !Q2 0(i  !Q !QK&`&Normalh ]a c.@. Heading 1 < U]ck*@* Heading 2 <UV]"A@"Default Paragraph Font @ Footer !"@" Footnote Textc &@ Footnote Referenceh @" Header !, query, security, or utilitesdataone or more !Q !Q20((i  !Q !Q2 0(i  !Q !QK&`&Normalh ]a c.@. Heading 1 < U]ck*@* Heading 2 <UV]"A@"Default Paragraph Font @ Footer !"@" Footnote Textc &@ Footnote Referenceh @" Header !:47  4444447!*2dfilor:U   No @) /6:1&)s '[n[|C@ vwxzPQRTW+,  D f top}^_op'( !!""$$$%d%%A&B&&&K(L(**,,,,/// 0A0m000N1a1B3555x666Y77q88:!!h!h!h!,!,!!h!h!h!h!h!hrhOO,O,O,rhOO,O,O,O,rhOO,O,O,!,!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h !h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!!h !h!h!h!h!h!,!h!h!h!h14/=aN>Si{%/0:1,=S<&1UnknownJim Grayz{|} D E f :sт5cM}ۄ 3cK{#Sˊ+[IKO!% ?Er}}!f j  %"-"j"m"o"s")),&,22225555x6|6e7h77780949G9K99999":T::::Jim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.doc@\\GRAYSF\localNe01:winspool\\GRAYSF\local\\GRAYSF\localpKLetterystem32;C:\WIem;C:\WINNT35;D: "''''\\GRAYSF\localpKLetterystem32;C:\WIem;C:\WINNT35;D: "''''xc]cc]c hcC 4 cC 4 hcE 4 hVc0g ]a c0g ]a cSg ]acSg ]acVSg ]ac7Uc <TJ':xUc <TJ'8xc <TJ' SgacSgaccE 4h. 8cE 4h. hcC 4h. hcMc +/c!cg V]a cg U]a c$cg V]a cg U]a cUc ch hcVc +/Vc +/ccg ]a ccg ]a cE 4 UcUcC 4h 8cD 4h. hS(sfeaturesqueuingServersareconfigured, , This are doing in Figure 1The queue others: server pools, timers, priority, and stored proceduresthe client explicitly invokes the procedure. Triggers implicitly fire when Stored procedures may be synchronous or asynchronous. TStored and t areTheyoptionally T DBMS to database systemIf it solves the concurrency and performance problems,re building queue managers on file systems andatabase ..ubiquitous .database system The database system DOS,. :by D f/=00&;gf(./$x2/({ Z2/(YZ./$)x/0+$x$wx$x(y Z^0&38 !Q !Q00&4gf(00&Cgf(./$)x2/(YZ 0G& !Q !Q$xW 4HI$x$Kx$;x( Z^(YZ&A(&(>hxx ww&I (& (& (>ax wwh&(&(& o($2/(  !Q !Q0/& !Q !Q./$$x/v6I$_x$4x$;x(_)Z^0/&C(0/&(H/>z    0/&(0/&(0/&<(H0>   00&|(00&=(00&q(.0$T 9i !Q !Q.0$  5 !Q !Q.0$9i !Q !Q20(,i  !Q !Q20((i  !Q !Q2 009UZnv~$;>CNRZ[;HLej{| BCIPh'>?@ 6<AGk} Auvxz{|}~&-NOPRTWa$%*+,BIJK  : = @ C   2 C D E F L d e f g   2 ; W h D`aeop%7GRVgm{|}234>BMN>?@LMNst34DfoswFm#+,}"&(pf%&'  $ & !!*!J!`!w!!!5":"\"i"u""""#&#$$$$$$%%%%%d%e%j%%?&B&z&~&&&&&&1'7'W'c''' (*(I(((((((())y****+,+/// 0A0m000000M1N1Q1`11111111)2*2+2Z2[2\2]2o2q2222223&3=3>3@333333333333344474N4W4e4f4g4m44444444444444#5m55555555555555666646;6F6G6[6v6w6x6{6|66666666666666717V7W7X7Y78888&8p888888888888888849=9K9T9d9e9m9o999999999999999999999 :!:":Q:R:S:T:Z:[:\:b:c:d:k:l:m:s:t:u:|:}:~:::::::::::::::::::::ALA]I@h@A39AA<9@7AiAA9AxA^I@{AA @_IAAI9AAJ9AAK9AA]AAQ9AR9 A A3A`IAMAXAcIAh@p AtA9AA9AA9AA9AAA9AA9AAjA:AAKAAz@AAAAAAAAA@9A9A9A9A9A<AA'<A(<A+<A,<A;<AD<AAM<AA^<AAl<A<AA<@<ARA<A<A<A<AӀA<@]AgIA+@[AlAAAAAAAAA@OAX=AY=AZ=A[=A\=AQ@]=AZ!Af#A^=@=@=@=A=A=A=A=@=A!A#A#@=A=A=@=@=A=A@=A!A#A#A=A#A=A=A=A=A=A=Aހ@=@=@=@ A=A>Aj>Am>A|>A>A>A߀A>A>A>A>A>A>A>@>@>A %AA %A %A>%Aa %AAhArAwAA@ '@ A A>A>A A A(i  !Q !Q:\WIem;C:\WINNT35;D: "''''xc]cc]c hcC 4 cC 4 hcE 4 hV $&(,CLStuŽ͎֎׎ ",-./7Fcfg|яҏ&uI9K&`&Normalh ]a c.@. Heading 1 < U]ck*@* Heading 2 <UV]"A@"Default Paragraph Font @ Footer !"@" Footnote Textc &@ Footnote Referenceh @" Header !l;47  4444447!*2dfilorl;   N!(/f7l;1&)] '[n[|C@ vwxzPQRTW+,  D f t*|}CD!1!2!""$$$,%{%%1&2&&&((G+H+----///00 1E1n1113^6_6|67t7u78899l;!!h!h!h!,!,!!h!h!h!h!h!hrhOO,O,O,rhOO,O,O,O,rhOO,O,O,!,!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h !h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!h!j!j!j!j!h!!h !h!h!h!h!,!h!h!h!h14/=aN>Si&%/0:N1,=S&1UnknownJim Grayz{|} D E f l;N|ȑ(Xޕ<&VΗ.v֘4b™KO!% ?Er}*6 @"H"""""i*s*,,|66667#70727 88,8/899999p:y:{::::B;E;m;Jim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.docJim Gray%D:\jim\PAPERS\TRS\Queue_is_DB_new.doc@\\GRAYSF\localNe01:winspool\\GRAYSF\local\\GRAYSF\localpKLetterystem32;C:\WIem;C:\WINNT35;D: "''''\\GRAYSF\localpKLetterystem32;C:\WIem;C:\WINNT35;D: "''''27272707xc]cc]c hcC 4 cC 4 hcE 4 hVc0g ]a c0g ]a cSg ]acSg ]acVSg ]ac7Uc <TJ':xUc <TJ'8xc <TJ' SgacSgaccE 4h. 8cE 4h. hcC 4h. hcMc +/c!cg V]a cg U]a c$cg V]a cg U]a cUc ch hcVc +/Vc +/c+/cg ]a ccg ]a cE 4 UcUcC 4h cC 4h 8c> 4h 8D 4h. hS"09UZnv~$;>CNRZ[;HLej{| BCIPh'>?@ 6<AGk} Auvxz{|}~&-NOPRTWa$%*+,BIJK  : = @ C   2 C D E F L d e f g   2 ; W h D`aeop%7GRVgm{|}234>BMN>?@LMNst34_[8@A*7;=T_efx!ABC7 9 @ B !!0!1!E!e!{!!!!P"U"w""""""""""" ####=#$$$$$$$$$$$$%*%+%,%-%2%{%|%%%%%%%%(&/&2&j&n&~&&&&&&&&&&0'E'I'Z'p'|'''''''''(T(_(((((()) )&)*)C)L)Y))))))))*** +=+P+t+y+++r-s-{----.0/M/P/Q/f//////G0J0]0f0l0m0|00000 1C1D1E1Q1l1n1111162:2u222222222222 337393l3v3w333333333344%474H4U4V4Z4[4s4444444444444445 5 5 55?5A5G5H5K5L5_5b5i5o555556]6^6w6z6{6|66666666666666667777"7#7072737>7E7R7d7e7f7g7s7t7u7777777788888896979H9J9K9M9N9j999999999999 : :::/:=:>:F:H:W:f:k:y:{::::::::::::::::::;;; ; ; ;;;;;;;#;$;%;+;,;-;>;];^;_;`;a;b;c;d;e;f;g;h;i;j;k;l;ALA]I@h@A39AA<9@7AiAA9AxA^I@{AA @_IAAI9AAJ9AAK9AA]AAQ9AR9 A A3A`IAMAXAcIAh@p AtA9AA9AA9AA9AAA9AA9AAjA:AAKAAz@AAAAAAAAA@9A9A9A9A9A<AA'<A(<A+<A,<A;<AD<A