{"id":448,"date":"2005-04-08T00:21:59","date_gmt":"2005-04-08T07:21:59","guid":{"rendered":"http:\/\/kennyw.com\/indigo\/4"},"modified":"2005-04-08T00:21:59","modified_gmt":"2005-04-08T07:21:59","slug":"bindings-vs-transports-live-on-espn","status":"publish","type":"post","link":"https:\/\/kennyw.com\/?p=448","title":{"rendered":"Bindings vs. Transports, live on ESPN"},"content":{"rendered":"<p>If you&#8217;re not familiar with the &#8220;ABCs of Indigo&#8221; (Address, Binding, and Contract), please click <a href=\"http:\/\/windowssdk.msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/WCF_Con\/html\/503fae4b-014c-44df-a9c7-c76ec4ed4229.asp\">here<\/a> for background on some basic Indigo terminology and concepts.<\/p>\n<p>When users first start playing with Indigo, there are two common approaches to the system: those that want to trace a message exchange from the &#8220;top&#8221; (by <a href=\"http:\/\/windowssdk.msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/WCF_Con\/html\/64423cd3-9570-4a97-b8d0-a1391b367caa.asp\">building a Service<\/a>), and those that want to start at the &#8220;bottom&#8221; (by tracing the Message as it enters the system and makes its way up to the typed ServiceMethod).    Those in the latter camp generally start by hunting for <b>transports<\/b>, which put your messages on the proverbial wire.<\/p>\n<p>A few notes about transports in Indigo:<\/p>\n<ul>\n<li>Transports need to be considered in the greater context of a <a href=\"http:\/\/windowssdk.msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/WCF_Con\/html\/7470cf38-34ae-4bea-b3b0-75e719e64f8c.asp\">binding<\/a>.  A binding is simply an ordered list of <b>binding elements<\/b>.  There are binding elements for reliability, security, transaction flow, and transports.  When I talk about a transport (such as HTTP), you will likely be interfacing with it through its binding element (e.g. HttpTransportBindingElement).<\/li>\n<p><\/p>\n<li>Indigo includes 4 transports in the <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyID=85ab132b-f1aa-4422-b053-272d79863013&#038;DisplayLang=en\">Community Tech Preview<\/a>:\n<ol>\n<li>HTTP (for cross machine interoperable messaging)<\/li>\n<li>TCP (for cross machine Indigo to Indigo messaging)<\/li>\n<li>Named Pipes (for on machine Indigo to Indigo messaging)<\/li>\n<li>MSMQ (for queued messaging)<\/li>\n<\/ol>\n<\/li>\n<p><\/p>\n<li>Transports are responsible for encoding+transmitting messages (on Send\/Request), and receiving+decoding messages (on Receive\/ReceiveReply).  Indigo is architected so that transports can delegate the task of translating between a Message and a byte array to an <b>encoder<\/b>.   <\/li>\n<p><\/p>\n<li>Indigo includes 3 encoders:  Text, Binary, and <a href=\"http:\/\/www.w3.org\/TR\/2005\/REC-soap12-mtom-20050125\/\">MTOM<\/a>.  Each encoder is associated with an implementation of <a href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/cpref\/html\/frlrfsystemxmlxmlreaderclasstopic.asp\">XmlReader<\/a> and <a href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/cpref\/html\/frlrfsystemxmlxmlwriterclasstopic.asp\">XmlWriter<\/a>, as well as a SOAP version.  By default, HTTP uses the text encoder, and TCP\/Named Pipes use the binary encoder.  However, an Indigo transport can be used with any encoder (either built-in or custom).  <\/li>\n<p><\/p>\n<li>The combinatoric possibilities involved in constructing a binding can be staggering, so Indigo includes a small number of <a href=\"http:\/\/windowssdk.msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/WCF_Con\/html\/2c243746-45ce-4588-995e-c17126a579a6.asp\">predefined bindings<\/a> that you can use for most common scenarios.  The documentation gives a good high-level overview of what scenario each binding is intended for and the various tradeoffs inherent in using each one.  Each predefined binding has a transport binding element associated with it, though it may only expose a subset of the properties available directly on the transport binding element itself.\n<\/li>\n<\/ul>\n<p>While Indigo at its core is &#8220;transport agnostic&#8221; there are of course implications to choosing each transport.  Up next, I&#8217;ll discuss what some of these implications are in a home networking scenario.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re not familiar with the &#8220;ABCs of Indigo&#8221; (Address, Binding, and Contract), please click here for background on some basic Indigo terminology and concepts. When users first start playing with Indigo, there are two common approaches to the system: those that want to trace a message exchange from the &#8220;top&#8221; (by building a Service), [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[19,80,85,91],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-indigo","tag-binding","tag-transports","tag-wcf","tag-work"],"_links":{"self":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=448"}],"version-history":[{"count":0,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/448\/revisions"}],"wp:attachment":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}