Introduction to SOAP-RP and DIME Henrik Frystyk Nielsen Architect
32 Slides209.50 KB
Introduction to SOAP-RP and DIME Henrik Frystyk Nielsen Architect Microsoft Corporation Jul 17 2001 1
Agenda Introduction to SOAP-RP Adds routing functionality to SOAP Introduction to DIME Deals with non-XML data Helps avoiding parsing overhead Jul 17 2001 2
Web Services Communications Model Decentralized No central naming or protocol authority Semi-structured messages Parties might have only partial understanding of messages Heterogeneous Open-ended set of platforms and network environments Support for Evolution Jul 17 2001 3
SOAP goals Based on semi-structured data Support orthogonal extensions Composability through extensibility model Dynamic composition of data Dynamic composition of processes Simplicity and extensibility at the core Features of richer protocols introduced using the SOAP extensibility mechanisms Jul 17 2001 4
Dynamic Composition of Data The SOAP:mustUnderstand attribute Mark which parts of the message the receiver must understand in order to process the message correctly. Body parts are by definition mandatory Header parts are by default optional Jul 17 2001 5
Soap:mustUnderstand S:Envelope xmlns:env "http://www.w3.org/2001/06/soap-envelope" S:Header m:alertcontrol xmlns:c "http://example.org/alertctrl" S:mustUnderstand "1" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 6
Dynamic Composition of Processes The SOAP:actor attribute A message may have several parts, each appropriate for a different party along its route. Start Jul 17 2001 web://bar web://toto web://foo 7
SOAP:actor S:Envelope xmlns:env "http://www.w3.org/2001/06/soap-envelope" S:Header m:alertcontrol xmlns:c "http://example.org/alertctrl" S:actor "http://www.w3.org/2001/06/soap-envelope/actor/next" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 8
DIME Web Services Roadmap Reliability Caching Routing Attachments SOAP-RP Future In Proc Existing Process Orchestration Service Description (WSDL) Directory (UDDI) Syntax (XML) Structure (XML Schemas) Inspection Data Exchange Description Discovery Envelope & Extensibility (SOAP) Jul 17 2001 9
SOAP Routing Protocol Represents our view on how one can do routing in SOAP Publicly available on gotdotnet Go to http://www.gotdotnet.com Requirements described in paper for W3C Web Services Workshop Jul 17 2001 10
SOAP-RP – Functional Routing SOAP does not describe a message path SOAP describes composition of processes Not how to send a message from A to C via B SOAP-RP adds a SOAP message path How to send a message from A to C via B Defined as a SOAP header entry Entirely encapsulated within SOAP message Decouples routing from underlying protocol Supports TCP, UDP, HTTP, SMTP, etc. Jul 17 2001 11
SOAP-RP Services Forward path Reverse Path Message path from C via B to A Dynamically generated Message Correlation Message path from A via B to C Dynamic or statically generated Indicates how messages are related Routing Fault Defines what happens if endpoints not found Jul 17 2001 12
SOAP-RP is a SOAP bubble Deliberately does not provide Guaranteed Messaging, Caching, Pub/Sub, Notification, Privacy, Signing, Encryption, etc. Intent is that SOAP-RP Composes with other SOAP bubbles that provides such functionality Jul 17 2001 13
SOAP-RP Elements to is the destination of the message from is like "from" in emails fwd specifies the forward path rev specifies the reverse path action indicates intent of the message id is a message ID relatesTo links to message IDs Jul 17 2001 14
SOAP-RP Forwarding mailto:[email protected] Pick up Mary at School at 2pm soap://sink.foo.com mailto:[email protected] Jul 17 2001 15
Step 1: From Mom to Sink S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd p:via soap://sink.foo.com /p:via /p:fwd p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 16
Step 2: From Sink to Dad S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd /p:fwd p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 17
SOAP-RP Resolution mailto:[email protected] Pick up Mary at School at 2pm soap://sink.foo.com soap://ipaq.foo.com/dad Jul 17 2001 mailto:[email protected] 18
Step 1: From Mom to Sink S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd p:via soap://sink.foo.com /p:via /p:fwd p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 19
Step 2: From Sink to IPaq S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd p:via soap://ipaq.foo.com/dad /p:via /p:fwd p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 20
Step 3: From IPaq to Dad S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd /p:fwd p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" c:priority 1 /c:priority c:expires 2001-06-22T14:00:00-05:00 /c:expires /c:alertcontrol /S:Header S:Body m:alert xmlns:m "http://example.org/alert" m:msg Pick up Mary at school at 2pm /m:msg /m:alert /S:Body /S:Envelope Jul 17 2001 21
SOAP-RP Reverse Path mailto:[email protected] Pick up Mary at School at 2pm soap://sink.foo.com Ok, will do mailto:[email protected] Jul 17 2001 22
Step 1: From Mom to Sink S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd p:via soap://sink.foo.com /p:via /p:fwd rev p:via soap:internal.bar.com/mom /p:from /rev p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" /S:Header S:Body /S:Body /S:Envelope Jul 17 2001 23
Step 2: From Sink to Dad S:Envelope xmlns:S "http://schemas.xmlsoap.org/soap/envelope/" S:Header p:path xmlns:p "http://schemas.xmlsoap.org/SOAP-RP/" p:action http://example.org/alert /p:action p:to mailto:[email protected] /p:to p:fwd /p:fwd rev p:via soap://sink.foo.com /p:via p:via soap:internal.bar.com/mom /p:from /rev p:from mailto:[email protected] /p:from p:id mid:[email protected] /p:id /p:path c:alertcontrol xmlns:c "http://example.org/alertctrl" /S:Header S:Body /S:Body /S:Envelope Jul 17 2001 24
What about Binary data? Not everything is XML Image data, voice data etc Even XML is not always XML Encryption, compression, fragments Don't always want to embed XML into the SOAP message for robustness reasons MIME multipart has performance problems Buffering and parsing overhead Jul 17 2001 25
DIME – Direct Internet Message Encapsulation DIME is a lightweight encapsulation format Publicly available on gotdotnet Native support for "multipart" A DIME message is a collection of records Support for chunking of records Records can be chunked for streamed data Efficient parsing Size, type, and message id available up front Jul 17 2001 26
DIME Message DIME Message is one or more records One DIME message Record Record Record Record 1 2 3 n Content-type: application/dime Can be carried in MIME and vice verse Is fully nestable Jul 17 2001 27
SOAP-RP and DIME SOAP-RP uses DIME for TCP and UDP bindings DIME addresses two problems in XML Supports passing arbitrary data Allows efficient parsing Jul 17 2001 28
SOAP-RP Over DIME Examples Without Attachments DIME message 1 DIME SOAP-RP DIME message 2 DIME SOAP-RP With Attachments One DIME message SOAP- DIME DIME GIF DIME RP Jul 17 2001 PNG 29
DIME Bit Fields MB is the Message Begin flag ME is the Message End flag CF indicates a chunked record TYPE of payload is a URI or content type TNF indicates the type of the type ID is a URI identifying the payload DATA is the record payload Jul 17 2001 30
DIME Record 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- MB ME CF TNF ID LENGTH -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- TYPE LENGTH -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- DATA LENGTH -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- TYPE PADDING / / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ID PADDING / / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- / / DATA PADDING / / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Jul 17 2001 31
Questions? Jul 17 2001 32