{"id":47,"date":"2005-10-17T17:04:24","date_gmt":"2005-10-18T00:04:24","guid":{"rendered":"http:\/\/kennyw.com\/indigo\/47"},"modified":"2005-10-17T17:04:24","modified_gmt":"2005-10-18T00:04:24","slug":"in-proc-transport-thoughts","status":"publish","type":"post","link":"https:\/\/kennyw.com\/?p=47","title":{"rendered":"In-proc transport thoughts"},"content":{"rendered":"<p>Every couple of months someone asks: &#8220;does Indigo have an in-proc transport?&#8221;  Which usually means &#8220;does Indigo have a way of sending messages so that it doesn&#8217;t ever leave the app-domain?&#8221;  When this request is made of the performance team, Al Lee&#8217;s canned response is &#8220;why aren&#8217;t you using named pipes? Is it not fast enough?&#8221;  Turns out that our named pipe transport has (so far) been fast enough for all the scenarios that have come to us.  That is, in all of these cases, the transport is contributing very little to the overall cost.<\/p>\n<p>All that aside, it&#8217;s still an interesting problem (and one I expect we&#8217;ll have to solve in the next version or two in order to expand our scope for &#8220;near&#8221; scenarios).  The key thing to remember when writing any transport, even an in-appdomain one, is that <em>boundaries<\/em> must still be honored.  That is, the Message must go through WriteMessage(XmlWriter) and be reconsituted through ReadMessage(XmlReader).  As Yasser illustrated in his layered &#8220;protocol&#8221; channel, a sanctioned extensibility point is wrapping the Message and then performing your actions at Write or Read time.  Trying to preempt this step has the same pitfalls as performing a shallow copy where you really need a deep copy: it just doesn&#8217;t work!<\/p>\n<p>I do plan on mocking up an in-appdomain transport in the next few weeks.  I will of course share the results here.  For those interested, my plan of attack would be to first write a basic transport using binary for the encoding and a shared queue for &#8220;transport&#8221;.  Future iterations would optimize both the queue and the format (since we don&#8217;t need to serialize strings or other immutable objects for example).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every couple of months someone asks: &#8220;does Indigo have an in-proc transport?&#8221; Which usually means &#8220;does Indigo have a way of sending messages so that it doesn&#8217;t ever leave the app-domain?&#8221; When this request is made of the performance team, Al Lee&#8217;s canned response is &#8220;why aren&#8217;t you using named pipes? Is it not fast [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-indigo"],"_links":{"self":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/47","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=47"}],"version-history":[{"count":0,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}