Carl-Christian Kanne, January 8, 2007 Demaq - p. 1/20
Demaq: A Foundation for Declarative XML Message Processing
Alexander Böhm Carl-Christian Kanne Guido Moerkotte
University of Mannheim
Demaq: A Foundation for Declarative XML Message Processing - - PowerPoint PPT Presentation
Demaq: A Foundation for Declarative XML Message Processing Alexander Bhm Carl-Christian Kanne Guido Moerkotte University of Mannheim Carl-Christian Kanne, January 8, 2007 Demaq - p. 1/20 XML Messaging XML Introduction XML Messaging
Carl-Christian Kanne, January 8, 2007 Demaq - p. 1/20
University of Mannheim
Introduction
Demaq Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 2/20
XML XML XML XML XML XML XML XML XML XML XML
Manufacturer Supplier C Supplier B Supplier A Customer Customer
Introduction
Demaq Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 3/20
XML XML XML XML XML XML XML XML XML XML XML
Introduction
Demaq Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 4/20
■ "If a request for an offer comes in, forward it to the
■ "If the delivery of all items has been confirmed,
Introduction
Demaq Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 5/20
XML
Java Java C# Java C# Network
Messaging System DBMS App Code App Server TP Monitor
Introduction
Demaq Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 6/20
t o p ic = ( ( QIjmsSession ) t_sess ) . getTopic ( " strmadmin " , " oe_queue " ) ; t_pub = t_sess . createPublisher ( t o p ic ) ; db_conn = ( ( QIjmsSession ) t_sess ) . getDBConnection ( ) ; agent = new QIjmsAgent ( " e x p lic it _ e n q " , n u l l ) ; adt_msg = ( ( QIjmsSession ) t_sess ) . createAdtMessage ( ) ; lcr_data = new St r in g Bu f f e r ( ) ; lcr_data . append (" <ROW_LCR " ) ; lcr_data . append ( " xmlns= ’ h t t p : / / xmlns . tentacle .com/ streams / schemas / lc r ’ " ) ; lcr_data . append ( " xmlns : xsi = ’ h t t p : / / www.w3. org /2001/XMLSchema−instance ’ " ) ; lcr_data . append ( " xsi : schemaLocation = ’ h t t p : / / xmlns . tentacle .com/ streams / schemas / l c r " ) ; lcr_data . append ( " h t t p : / / xmlns . tentacle .com/ streams / schemas / l c r / streamslcr . xsd ’ > " ) ; lcr_data . append (" < source_database_name>source_dbname</ source_database_name > " ) ; . . . MORE DOCUMENT CONSTRUCTION HERE . . . xml_lcr = tentacle . xdb .XMLType . createXML ( db_conn , lcr_data . t o St r in g ( ) ) ; adt_msg . setAdtPayload ( xml_lcr ) ; ( ( QIjmsMessage) adt_msg ) . setSenderID ( agent ) ; System . out . p r i n t l n ( " Publish message 3 − XMLType containing LCR R O W" ) ; r e c i p L i s t = new QIjmsAgent [ 1 ] ; r e c i p L i s t [ 0 ] = new QIjmsAgent ( " e x p lic it _ d q " , n u l l ) ; ( ( QIjmsTopicPublisher ) t_pub ) . publish ( topic , adt_msg , r e c i p L i s t ) ; t_sess . commit ( ) ;
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 7/20
Queue Queue Queue Queue Queue Gateway Gateway
Demaq Application
■ Complete ■ Declarative ■ Executable
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 8/20
Gateway Gateway Queue Queue Queue Queue Queue Queue Queue Queue Queue Queue Gateway Gateway
Demaq Application Application Rules (QML) Message Queues (QDL)
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 9/20
■ "If the delivery of all items has been confirmed,
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 9/20
■ "If the delivery of all items has been confirmed,
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 9/20
■ "If the delivery of all items has been confirmed,
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 10/20
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 11/20
Gateway Gateway Queue Queue Queue Queue Queue Queue Queue Queue Queue Queue Gateway Gateway
Demaq Application Application Rules (QML) Message Queues (QDL)
Transport Engine
Rule
Transactional Store
XML
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 12/20
■ Everything is an XML message ◆ Rule Input ◆ Rule Output ◆ Errors ◆ Timeouts ■ Messages are processed once, but kept "forever" ■ Message History ◆ captures process state ◆ organized into slices (virtual queues) ◆ declarative expiration
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 13/20
Gateway Gateway Queue Queue Queue Queue Queue Queue Queue Queue Queue Queue Gateway Gateway
Demaq Application Application Rules (QML) Message Queues (QDL) QEP QEP QEP
Transport Engine
Rule
Transactional Store
XML
Introduction Demaq
Appendix Carl-Christian Kanne, January 8, 2007 Demaq - p. 14/20
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 15/20
Orders Queue
Slice for customer 23
Slice for customer 42
Delivery Notifications Queue Requests Queue 23 47 7 42 9 42 23 23 42 42 23 23 23 23 23 47 15
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 16/20
■ Merge parallel control flow
Rating Check Setup Costs Check Plant Capacity Check Export Restrictions Check Credit Send/Refuse Offer
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 17/20
■ Plenty of error sources in distributed applications ◆ Application-related (dynamic errors) ◆ Message-related (invalid XML, wrong schema) ◆ Network-related (disconnects, routing, . . . ) ◆ . . . ■ Message-based error handling ■ Error queues, e.g. for rules
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 18/20
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 19/20
■ Optimization across rules ■ Optimization/verification across sites ■ Template Folding [XIMEP06] ■ Rules driven by XML Schema validation
Introduction Demaq Appendix
Carl-Christian Kanne, January 8, 2007 Demaq - p. 20/20
■ Declarative XML message processing language ◆ Move work from programmer to system ◆ Data independence ◆ Optimizable ■ Execution Engine ◆ Reliability ◆ Scalability ◆ Reuse DB system knowledge