<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Udi Dahan - The Software Simplist &#187; ESB</title>
	<atom:link href="http://www.udidahan.com/category/esb/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Sun, 08 Jan 2012 12:45:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NServiceBus and RavenDB &#8211; better together!</title>
		<link>http://www.udidahan.com/2011/07/22/nservicebus-and-ravendb-better-together/</link>
		<comments>http://www.udidahan.com/2011/07/22/nservicebus-and-ravendb-better-together/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 18:10:57 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1505</guid>
		<description><![CDATA[For those of you who haven&#8217;t heard yet, the next version of NServiceBus will be making use of RavenDB as its default storage engine. 
What&#8217;s RavenDB?
For those of you who haven&#8217;t heard about RavenDB yet &#8211; it&#8217;s a transactional document database for .NET, and it&#8217;s been/being developed by my good friend and partner in crime [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/starsky1.jpg" alt="Better together" title="Better together" width="231" height="250" style="float:right; margin-left:10px; margin-bottom:10px;" />For those of you who haven&#8217;t heard yet, the next version of <a href="http://www.nservicebus.com">NServiceBus</a> will be making use of <a href="http://ravendb.net/">RavenDB</a> as its default storage engine. </p>
<h3>What&#8217;s RavenDB?</h3>
<p>For those of you who haven&#8217;t heard about RavenDB yet &#8211; it&#8217;s a transactional document database for .NET, and it&#8217;s been/being developed by my good friend and partner in crime <a href="http://ayende.com/blog">Ayende Rahien</a> (a.k.a Oren Eini). Although Ayende is known for his &#8220;not invented here&#8221; tendencies, when it comes to transactional document databases, well, you&#8217;d have been hard pressed to find one &#8211; especially with a decent .NET API.</p>
<h3>NServiceBus Storage</h3>
<p>In NServiceBus we have a variety of storage needs &#8211; from things like durable subscriptions so that you get fault-tolerant pub/sub, through persistence of long-running workflow (a.k.a saga) state, and durable timeouts so that your time-bound long-running processes never get stuck. None of these actually require relations &#8211; we were just using relational databases for storage because it was the easy answer everyone was going with.</p>
<h3>Relational vs. Document</h3>
<p>And these relational databases came with some downsides &#8211; developers had to &#8220;beg&#8221; their DBA to create the needed tables in the production databases, when that central database was down it prevented otherwise autonomous publishers and subscribers from going about their business, and it was very difficult to version the long-running workflows especially when newer versions required different state.</p>
<p>By moving to an embedded and transactional document DB, no longer do you need to bargain with the DBA, by keeping the storage together with the processing nodes you are back in parallel processing bliss, and the schema-less nature of the storage makes versioning those long-running workflows much easier.</p>
<h3>Licensing</h3>
<p>And I&#8217;m also happy to announce that an agreement has been reached with Hibernating Rhinos (Ayende&#8217;s company) so you won&#8217;t need to license RavenDB separately to get all of these benefits. RavenDB will be bundled with NServiceBus so licensing NServiceBus covers them both (for the storage needs mentioned above).</p>
<p>If you&#8217;re also thinking about using RavenDB as the storage for the rest of your system, you&#8217;ll be able to get a nice discount on the license when purchasing it together with NServiceBus. This will be going into effect with the release of NServiceBus 3.0 this October.</p>
<h3>Companies Using NServiceBus</h3>
<p>Interestingly enough, there&#8217;s been a big uptick in companies using NServiceBus with the introduction of licensing. Most of these companies are not the kind of big, stand-up-and-take-notice names that everybody likes to have on their roster.</p>
<p>What makes NServiceBus particularly attractive is that you can get a lot done without requiring some kind of dedicated BizTalk/WebSphere/Tibco expert. This has brought down the barrier for thousands of developers who just want to get on with the business of getting their app to market.</p>
<p>And when it comes to the big names, well, once they see how much faster they can get stuff done with NServiceBus as well as how robust and scalable it is in production, they don&#8217;t want any of their competitors to know about it!</p>
<p>Anyway, I&#8217;m glad to say that two companies have stepped forwards: Rackspace and Reuters. Hopefully we&#8217;ll get confirmation from one of the big banks soon that we can go public with them too.</p>
<p>Exciting times ahead.</p>
<p><center><a href="http://www.nservicebus.com"><img src="http://images.nservicebus.com/nServiceBus_Logo.png" title="learn more" alt="learn more" /></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/07/22/nservicebus-and-ravendb-better-together/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Service Boundaries Aren&#8217;t Process Boundaries</title>
		<link>http://www.udidahan.com/2011/07/03/service-boundaries-arent-process-boundaries/</link>
		<comments>http://www.udidahan.com/2011/07/03/service-boundaries-arent-process-boundaries/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 12:23:37 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1482</guid>
		<description><![CDATA[Richard Veryard blogged about the topic of service boundaries in SOA, specifically asking why aren&#8217;t more people talking about service boundaries &#8211; especially if they&#8217;re such a core principle in SOA.
I can only speak for myself on this one, but I guess it&#8217;s that there&#8217;s just so many times you can repeat yourself.
So, why this [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/fence1_14.jpg" alt="boundaries" title="boundaries" width="286" height="217" style="float:right; margin-left:10px; margin-bottom:10px;" />Richard Veryard <a href="http://rvsoapbox.blogspot.com/2011/07/service-boundaries-in-soa.html">blogged</a> about the topic of service boundaries in SOA, specifically asking why aren&#8217;t more people talking about service boundaries &#8211; especially if they&#8217;re such a core principle in SOA.</p>
<p>I can only speak for myself on this one, but I guess it&#8217;s that there&#8217;s just so many times you can repeat yourself.</p>
<p>So, why this post?</p>
<p>Well, Richard was able to dig up an old (2004) presentation I gave about SOA in which I said:</p>
<blockquote><p>&#8220;Services run in a separate process from their clients<br />
A boundary must be crossed to get from the client to the service – network, security, …&#8221;</p></blockquote>
<p>And 7 years later I can say, hand on heart, <b>I was wrong</b>.</p>
<p>Luckily, I&#8217;ve spent much of those past 7 years trying to correct that recommendation. One blog post in which I tried to do that (in mid-2007) was <a href="http://www.udidahan.com/2007/05/19/on-intermediation-and-soa/">On Intermediation and SOA</a> in which I described the relationship between systems (i.e process boundaries) and services:</p>
<blockquote><p>&#8220;all of these “systems” might just end up within the same service, or having parts of them being used by multiple services</p></blockquote>
<p>There can also be multiple services (or, more accurately, parts of multiple services) deployed together in the same system/process. </p>
<p>And this is nothing new &#8211; in the <a href="http://en.wikipedia.org/wiki/4%2B1_Architectural_View_Model">4+1 Architectural View Model</a> by Philippe Kruchten (1995) we can see very clearly the differentiation between the Logical View (our services) and the Physical View (a.k.a the Deployment View). </p>
<p>These views are orthogonal to each other &#8211; multiple elements from one view can map to a single element in another view (and vice versa).</p>
<p>This, if anything, makes it that much harder to identify service boundaries &#8211; if they have nothing to do with the existing applications and systems, then what are they? In my blog post on <a href="http://www.udidahan.com/2010/11/15/the-known-unknowns-of-soa/">The Known Unknowns of SOA</a> I point to the fact that <b>Business Capabilities</b> are much more appropriate constructs than, say, web services which (as it says in the referenced post) &#8220;[are] merely a standardized approach to accessing functionality on remote systems&#8221;.</p>
<p>As I bring this post to a close, I&#8217;m feeling more comfortable rehashing material I&#8217;ve published before:</p>
<p><a href="http://www.udidahan.com/2010/11/08/logical-and-physical-architecture/">Logical and Physical Architecture</a></p>
<p>and the rest of the SOA category on my blog <a href="http://www.udidahan.com/category/soa/">here</a>.</p>
<p>Happy boundary hunting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/07/03/service-boundaries-arent-process-boundaries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NServiceBus Videos Online</title>
		<link>http://www.udidahan.com/2011/06/26/nservicebus-videos-online/</link>
		<comments>http://www.udidahan.com/2011/06/26/nservicebus-videos-online/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 08:13:36 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1480</guid>
		<description><![CDATA[When I was at NDC a couple of weeks ago, I got together with Carl Franklin and we recorded a DNR-TV episode on NServiceBus. If you&#8217;re looking for a zero-to-sixty, code-centric explanation of NServiceBus &#8211; this is it.
NServiceBus on DNR-TV
For some more advanced stuff, I suggest looking at the Hidden NServiceBus Gems talk that I [...]]]></description>
			<content:encoded><![CDATA[<p>When I was at NDC a couple of weeks ago, I got together with Carl Franklin and we recorded a DNR-TV episode on NServiceBus. If you&#8217;re looking for a zero-to-sixty, code-centric explanation of NServiceBus &#8211; this is it.</p>
<p><a href="http://dnrtv.com/default.aspx?ShowID=202">NServiceBus on DNR-TV</a></p>
<p>For some more advanced stuff, I suggest looking at the Hidden NServiceBus Gems talk that I gave at Skills Matter the week after. Here we get into all sorts of things that you won&#8217;t tend to find by yourself through regular usage of NServiceBus.</p>
<p><a href="http://skillsmatter.com/podcast/home/hidden-nservicebus-gems/js-1884">Hidden NServiceBus Gems</a></p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/06/26/nservicebus-videos-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integration: How and Where</title>
		<link>http://www.udidahan.com/2011/04/08/integration-how-and-where/</link>
		<comments>http://www.udidahan.com/2011/04/08/integration-how-and-where/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 09:18:41 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1428</guid>
		<description><![CDATA[One of the topics that comes up a lot in the context of an Enterprise Service Bus (ESB) is that of integration. Unfortunately, many people take their ideas of reuse and design their integration as being done from a single place &#8211; both logical and physical. That unfortunately creates a bottleneck for all integration activities, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/integration.jpg" alt="integration" title="integration" width="200" height="150" style="float:right; margin-left:10px; margin-bottom:10px;" />One of the topics that comes up a lot in the context of an Enterprise Service Bus (ESB) is that of integration. Unfortunately, many people take their ideas of reuse and design their integration as being done from a single place &#8211; both logical and physical. That unfortunately creates a bottleneck for all integration activities, where some are likely to be higher priority than others.</p>
<h3>The ugly truth</h3>
<p>You don&#8217;t need an ESB for integration.</p>
<p>There. I&#8217;ve said it. </p>
<p>Most of the ESB products on the market, in focusing on integration, are addressing the wrong problem.</p>
<h3>What integration is about</h3>
<p>There are three primary components to integration &#8211; data format translation, protocol bridging, and logic. Let&#8217;s take the Agile &#8220;simplest solution that could possibly work&#8221; motto and apply it to these elements:</p>
<ol>
<li>Data format translation<br/>
<ul>
<li>Use something like <a href="http://www.altova.com/mapforce.html">MapForce</a> (from Altova, the guys behind XMLSpy).</li>
<li>At under $1200 for a dev license and handling mapping to/from XML, EDI, flat files, and relational databases, you can host the resulting mapping in any endpoint, as XSLT or even Java/C# &#8211; no need to have &#8220;the bus&#8221; do this for you.</li>
</ul>
</li>
<li>Protocol bridging<br/>
<ul>
<li>Use something like <a href="http://www.nsoftware.com/subscriptions/">/n software</a></li>
<li>At about $1500 for a dev license, you get solutions for FTP, HTTP, SMTP, POP, IMAP, LDAP, DNS, RSS, SMS, Jabber, SOAP, WebDav, etc and, again &#8211; you can host the DLLs in any endpoint you want. Don&#8217;t need expensive buses for this</li>
</ul>
</li>
<li>Logic<br/><br />
This is all you &#8211; no technology can do this for you. If anything, the most important thing is to get all the ugly mapping and protocol bridging stuff out of the way and let you focus on your logic. This is Single Responsibility Principle (un)common sense.
</li>
</ol>
<h3>Digging deeper into the logic</h3>
<p>The interesting thing about most of the protocol stuff mentioned above is that they&#8217;re inherently <b>unreliable</b> and also their performance at runtime is unknowable due to the total load on the target server.</p>
<p>We wouldn&#8217;t want any of the above situations to cause our integration to &#8220;get stuck&#8221;. As such, it is best we think of our integration logic as a long-running process that manages other endpoints which do the actual protocol bridging and data transformations.</p>
<p>This is one of the areas where NServiceBus, with its <a href="http://www.nservicebus.com/Sagas.aspx">sagas</a> can actually help a lot. Just like the other pieces of integration mentioned above, these sagas can run on any endpoint.</p>
<p>You could alternatively look at other technologies like BizTalk and Business Process Execution Language (BPEL) engines, though many of those are designed to be physically centralized (just like many of the ESBs out there).</p>
<p>By the way, if you do want to use NServiceBus together with BizTalk, Michael Stephenson has published some great white papers on getting the two to work together. His latest is about integrating NServiceBus into BizTalk&#8217;s RFID processes &#8211; <a href="http://social.technet.microsoft.com/wiki/contents/articles/biztalk-rfid-amp-nservicebus.aspx">check it out</a>.</p>
<h3>Putting it all together</h3>
<p>When we take all of these pieces and look at them in a cohesive architecture, here&#8217;s what it can look like:</p>
<p><img src="http://www.udidahan.com/wp-content/uploads/DistributedIntegration.jpg" alt="Distributed Integration" title="Distributed Integration" width="600" height="385" class="alignnone size-full wp-image-1432" /></p>
<p>As you can see, integration is physically distributed across multiple endpoints.</p>
<p>Not only that, but the integration logic is kept separate from the protocol bridging and data transformation, enabling independent versioning of each. Just as important, it makes it <b>much</b> easier to unit test that the integration logic is correct as we don&#8217;t have to simulate the target technologies.</p>
<h3>Costs</h3>
<p>As you can see, you can get integration capabilities just as powerful as if you went with something like BizTalk, but without creating a single point of failure in your architecture. In terms of costs, it&#8217;s also quite a bit cheaper.</p>
<p>For a high availability BizTalk deployment, you&#8217;ll be paying <a href="http://www.microsoft.com/biztalk/en/us/pricing-licensing.aspx">over $40,000 per CPU</a> for the Enterprise Edition, not including the extra $7000 per CPU for SQL Server Standard Edition (clustered). For a clustered 4-CPU mid-size deployment, you&#8217;d be in the area of $200,000.</p>
<p>For the distributed integration solution above, you&#8217;d be paying around $2700 in dev licenses (for /n software and Altova MapForce), and $500 per core for NServiceBus Standard Edition. The reason there&#8217;s per-core licensing for NServiceBus is that in a virtualized environment, you&#8217;ll be provisioning virtual cores to your virtual machines. No reason to pay for a quad-core CPU when all you&#8217;re using is a single core. You can also use any number of cores running NServiceBus Express Edition at no cost, so a mid-size deployment with say 8 cores running Standard Edition, and another 24 cores running Express Edition would cost (with the volume discount) an additional $3800 &#8211; a total cost of $6,500.</p>
<p>BizTalk: $200,000 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NServiceBus: $6,500</p>
<p>&#8216;Nuff said.</p>
<h3>In closing</h3>
<p>We&#8217;ve been bitten by centralized architectures before.</p>
<p>By having our integration distributed, we can version, upgrade, and scale each piece independently.</p>
<p>You&#8217;ve seen how we can use simple, lightweight, and inexpensive technologies to create distributed integration solutions just as powerful and robust as the centralized ESB vendor-offerings out there, but at a tiny fraction of the cost.</p>
<p>Next time the topic of integration is brought up, you&#8217;ll know not to be suckered in by re-branded EAI brokers.</p>
<p><a href="http://www.nservicebus.com/">Learn more about NServiceBus</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/04/08/integration-how-and-where/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bus and Broker Pub/Sub Differences</title>
		<link>http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/</link>
		<comments>http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 21:22:13 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1421</guid>
		<description><![CDATA[One of the things which often confuses people using NServiceBus for the first time is that it only allows an endpoint to subscribe to a given event from a single other publishing endpoint. The rule that there can only be a single publisher for a given event type is one of the things that differentiates [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/difference_of_opinion.jpg" alt="differences" title="differences" width="250" height="150" style="float:right; margin-left:10px; margin-bottom:10px;" />One of the things which often confuses people using NServiceBus for the first time is that it only allows an endpoint to subscribe to a given event from a single other publishing endpoint. The rule that there can only be a single publisher for a given event type is one of the things that differentiates buses from brokers, though both obviously allow you to have multiple subscribers.</p>
<h3>Brokers</h3>
<p>Message brokers, more broadly known and used on the Java platform, don&#8217;t come with this constraint. For example, when using ActiveMQ, you can have any number of endpoints come to the broker and publish a message under a given topic. </p>
<p>So where&#8217;s the problem?</p>
<p>It&#8217;s all about accountability.</p>
<p>Let&#8217;s say you&#8217;ve subscribed to a given topic, and have received two events &#8211; one telling you that the price of bananas next week will be $1/kg and another telling you that it&#8217;ll be $2/kg. </p>
<p>Which one is right?</p>
<p>Especially given that those events may have been published by any other endpoint via the broker.</p>
<p>Is it first one wins? Last one wins? How about first one sent vs. first one received? Ditto for last. As a subscriber, can you really be held accountable for having the logic to choose the right one? Shouldn&#8217;t this responsibility have fallen to the publishing side?</p>
<p>This is one of the big drawbacks of the broker, hub and spoke architecture. No responsibility. No single source of truth &#8211; unless everybody&#8217;s going to some central database, in which case &#8211; what&#8217;s the point of all this messaging anyway?</p>
<h3>Buses</h3>
<p>The Bus Architectural Style is all about accountability. If you are going to publish an event, you are accountable for the correctness of the data in that event &#8211; there is no central database that a subscriber can go to &#8220;just in case&#8221;. And the only way that you can be held accountable, is if you have full responsibility &#8211; ergo, you&#8217;re the only one who can publish that type of event.</p>
<p>If you say bananas are going to cost $1/kg next week, that&#8217;s that. Subscribers will not hear from anybody else on that topic.</p>
<p>Now, this is not to say that you can&#8217;t have more than one <b>physical</b> publishing endpoint.</p>
<p>You see, buses differentiate between the logical and the physical. Brokers tend to assume that the physical hub-and-spoke topology is also the logical.</p>
<p>In a bus, while there can only be one <b>logical</b> endpoint publishing a given type of event, that endpoint can be physically scaled out across multiple machines. It is the responsibility of the bus to provide infrastructure facilities to allow for that to happen in such a way that to subscribers, it still appears as if there is really only one publishing endpoint.</p>
<p>The same is true about the subscriber &#8211; one logical subscribing endpoint may be scaled out across multiple machines.</p>
<h3>Product Mix-ups</h3>
<p>Unfortunately, there are many broker-style technologies out there that are being marketed under the banner of the Enterprise Service Bus. While some products have the ability to be deployed in both a centralized and distributed fashion (sometimes called &#8220;federated&#8221; or &#8220;embedded&#8221; mode), many do not enforce the &#8220;single publishing endpoint per event-type&#8221; rule.</p>
<p>Without this constraint, it is just too easy to make mistakes.</p>
<h3>NServiceBus</h3>
<p>By enforcing this constraint, we see the same kind of question appear on the discussion group time and time again:</p>
<p>&#8220;I have an Audit event that I&#8217;d like all of my machines to publish, and have one machine subscribe to them all, but NServiceBus won&#8217;t let me. How do I make NServiceBus support this scenario?&#8221;</p>
<p>And the answer is the same every time:</p>
<p>&#8220;You should have all the machines <b>Send</b> the Audit message (configured to go to the single machine handling that message), and not Publish. It is not an event until its been handled by the endpoint responsible for it.&#8221;</p>
<p>The semantics of the message matter a lot.</p>
<p>When looking at Service-Oriented Architecture, these messages are the contract and, as any lawyer will tell you, contracts need to be explicit and the intentions really need to be spelled out &#8211; otherwise the contract is practically worthless.</p>
<h3>In closing</h3>
<p>Friction is sometimes a good thing &#8211; it prevents us from making mistakes. It keeps cars on the road. And because that&#8217;s not enough friction, we introduce curbs as well.</p>
<p>If you&#8217;re looking for a service bus technology for your next project, check that it&#8217;ll give you the friction that you need to keep everybody safe. Really check what it is that the vendors are offering you &#8211; more often than not, it&#8217;s some ESB lipstick on a broker pig.</p>
<p>To learn more about how NServiceBus supports this kind of publish/subscribe, <a href="http://www.nservicebus.com/PubSub.aspx">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Careful with Content-Based Routing</title>
		<link>http://www.udidahan.com/2011/03/20/careful-with-content-based-routing/</link>
		<comments>http://www.udidahan.com/2011/03/20/careful-with-content-based-routing/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 15:32:00 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1416</guid>
		<description><![CDATA[Every once in a while I get clients who ask me why NServiceBus doesn&#8217;t support content-based routing. My answer sometimes surprises them, &#8220;because it is a dangerous pattern that should usually be avoided&#8221;.
Content-Based Routing and ESBs
Since content-based routing often appears on feature lists for various ESBs, many people consider them to be a necessary part [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while I get clients who ask me why NServiceBus doesn&#8217;t support content-based routing. My answer sometimes surprises them, &#8220;because it is a dangerous pattern that should usually be avoided&#8221;.</p>
<h2>Content-Based Routing and ESBs</h2>
<p>Since content-based routing often appears on feature lists for various ESBs, many people consider them to be a necessary part of systems built on SOA principles. The pattern also appears in the book Enterprise Integration Patterns, which apparently is also a convincing reason to use it, even though the book <a href="http://www.eaipatterns.com/ContentBasedRouter.html">specifically states</a>:</p>
<blockquote><p>
&#8220;When implementing a Content-Based Router, special caution should be taken to make the routing function easy to maintain as the router can become a point of frequent maintenance.&#8221;
</p></blockquote>
<p>That&#8217;s right &#8211; maintenance nightmare.</p>
<h2>For Example</h2>
<p>Let&#8217;s take a real-world example &#8211; a trading system where users can put orders for stock and for forex (money from other countries). </p>
<p>We&#8217;d start by creating a message that can be sent by a client:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> PlaceOrder : IMessage
{
    <span class="kwrd">public</span> OrderTypeEnum OrderType { get; set; }
    <span class="kwrd">public</span> <span class="kwrd">string</span> Code { get; set; }
    <span class="kwrd">public</span> <span class="kwrd">double</span> Amount { get; set; }
}

<span class="kwrd">public</span> <span class="kwrd">enum</span> OrderTypeEnum
{
    Stock,
    Forex
}</pre>
<p>Clients would send messages by using code like the following:</p>
<pre class="csharpcode">
Bus.Send&lt;PlaceOrder&gt;(m =&gt; {
    m.OrderType = OrderTypeEnum.Stock;
    m.Code = <span class="str">"MSFT"</span>;
    m.Amount = 300;
    m.SetHeader("AccountId", myAccountId);
});</pre>
<p>The header is the way that clients identify themselves in the system.</p>
<p>Let&#8217;s say that the logic for handling the different types of orders is different, but also that we&#8217;d like the logic to be deployed to different endpoints. One reason we might want to do this is so that we can independently scale each of these endpoints. This is where it would appear we&#8217;d need some content-based routing &#8211; having some code that looks at the OrderType property and decides where to route based on its value.</p>
<p>Before we get into solutions, let&#8217;s make this more involved.</p>
<p>Not only do we want to route based on OrderType, but we want to use the account ID in the header to check in our database (or via a web service) if the account belongs to one of our VIP customers, and if so, it should be given higher priority. </p>
<h2>Content-Based Routing and Brokers</h2>
<p>We can see that if we were to go with a content-based routing solution, this would drive our architecture to a hub-and-spoke model where the hub becomes quite large and complex, as well as likely becoming a bottleneck in terms of performance.</p>
<p>This logically centralized place through which all communication flows defines the Broker architectural style &#8211; not that of a Bus. In the Bus architectural style, there is no logical (or physical) hub. You can think of it as a kind of peer-to-peer setup. Just like you wouldn&#8217;t want ethernet getting involved in applicative routing decisions, neither should your bus get involved.</p>
<h2>Business-Topology Mapping Solutions</h2>
<p>Instead, when following the Bus architectural style &#8211; we look at mapping stable business characteristics to bus-level topology. At one level, that would mean defining two different message types for our different types of trades:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">abstract</span> <span class="kwrd">class</span> PlaceOrder
{
    <span class="kwrd">public</span> <span class="kwrd">string</span> Code { get; set; }
    <span class="kwrd">public</span> <span class="kwrd">double</span> Amount { get; set; }
}

<span class="kwrd">public</span> <span class="kwrd">class</span> PlaceStockOrder : PlaceOrder { }

<span class="kwrd">public</span> <span class="kwrd">class</span> PlaceForexOrder : PlaceOrder { }</pre>
<p>Once we have two different message types, then we can configure the client to have those statically sent to different endpoints like this:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">&lt;</span><span class="html">UnicastBusConfig</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">MessageEndpointMappings</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">Messages</span><span class="kwrd">="Messages.PlaceStockOrder, Messages"</span> <span class="attr">Endpoint</span><span class="kwrd">="Stock"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">Messages</span><span class="kwrd">="Messages.PlaceForexOrder, Messages"</span> <span class="attr">Endpoint</span><span class="kwrd">="Forex"</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">MessageEndpointMappings</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">UnicastBusConfig</span><span class="kwrd">&gt;</span></pre>
<p>And when it comes to handling our VIP customers, the recommendation would be to have those customers be served by a different set of web servers &#8211; we wouldn&#8217;t want a sudden flux in regular customers stealing all the HTTP connections from our VIP customers. Then we&#8217;d statically configure our VIP front-end to talk to our VIP back-end like this:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">&lt;</span><span class="html">UnicastBusConfig</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">MessageEndpointMappings</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">Messages</span><span class="kwrd">="Messages.PlaceStockOrder, Messages"</span> <span class="attr">Endpoint</span><span class="kwrd">="VIP_Stock"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">Messages</span><span class="kwrd">="Messages.PlaceForexOrder, Messages"</span> <span class="attr">Endpoint</span><span class="kwrd">="VIP_Forex"</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">MessageEndpointMappings</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">UnicastBusConfig</span><span class="kwrd">&gt;</span></pre>
<p>And the logic to identify VIP customers would be done in the login screen which, from there, would direct the user to the appropriate web server farm.</p>
<h2>Static vs. Dynamic</h2>
<p>It may appear that the above statically configured solution is less flexible then the afore-mentioned hub-and-spoke content-based routing solution. And that&#8217;s probably correct. But the question is, are the business requirements (better called &#8220;objectives&#8221; in this case) likely to change? If we make the technological solution 10x more flexible than the business needs, but at the cost of maintainability (read time to market), we probably haven&#8217;t used the right tool for the job.</p>
<p>Many times we can find stable business objectives and align the topology of our solution with them. Not all that is dynamic and flexible is necessarily better than that which is static.</p>
<p>I&#8217;d go so far to say that if a solution makes heavy use of content-based routing, it is likely a more fragile solution as implementations of stable business objectives and volatile requirements are mixed up together. </p>
<h2>In Closing</h2>
<p>NServiceBus intentionally does not support content-based routing so as not to make it easy for developers to make architectural blunders that could require full-system rewrites a couple of years down the road.</p>
<p>If you want to learn more about these kinds of architectural principles, I suggest coming to my <a href="http://www.udidahan.com/training/">course</a>. I&#8217;m afraid that New York City is already sold out, but I&#8217;ll be coming back to the US again around October. Stockholm, London, Sydney, and Oslo are now all open for registration.</p>
<p>Hope to see you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/03/20/careful-with-content-based-routing/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Polymorphism and Messaging</title>
		<link>http://www.udidahan.com/2011/01/13/polymorphism-and-messaging/</link>
		<comments>http://www.udidahan.com/2011/01/13/polymorphism-and-messaging/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 08:52:48 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1389</guid>
		<description><![CDATA[One of the questions that came up from my NServiceBus &#8211; .NET Service Bus Smackdown post was about the Polymorphic Message Dispatch and Polymorphic Message Routing features. People wanted to know what those are, why they&#8217;re important, and if other technologies (specifically WCF and BizTalk) support them.
Messaging Basics
First of all, when building a system using [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/polymorphism.jpg" alt="polymorphism" title="polymorphism" width="213" height="131" style="float:right; margin-left:10px; margin-bottom:10px;" />One of the questions that came up from my <a href="http://www.udidahan.com/2010/08/04/nservicebus-net-service-bus-smackdown/">NServiceBus &#8211; .NET Service Bus Smackdown post</a> was about the Polymorphic Message Dispatch and Polymorphic Message Routing features. People wanted to know what those are, why they&#8217;re important, and if other technologies (specifically WCF and BizTalk) support them.</p>
<h2>Messaging Basics</h2>
<p>First of all, when building a system using messaging, you don&#8217;t have methods that are invoked on some remote object (a.k.a &#8220;service&#8221;) to which you pass parameters. Instead, you use some generic piece of infrastructure (in the world of Java, this is most commonly a Message Broker) to send a message where a message can be thought of as a serializable class. Here&#8217;s an example of a message:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> UserCreated : IMessage
{
    <span class="kwrd">public</span> Guid UserId { get; set; }
    <span class="kwrd">public</span> <span class="kwrd">string</span> Name { get; set; }
}</pre>
<p>This message would be published using NServiceBus like this:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
bus.Publish&lt;UserCreated&gt;( m =&gt;
{
    m.UserId = Guid.NewGuid();
    m.Name = <span class="str">"John Smith"</span>;
});
</pre>
<p>This can be contrasted with RPC models like WCF where you need to define a &#8220;service&#8221; that has methods on it, where those methods accepts parameters. Sometimes developers try to make this more generic by having a single &#8220;service&#8221; with one method on it named something like &#8220;Process&#8221; where the parameter it accepts is of the type &#8220;object&#8221;, or they introduce generics like this: Process&lt;T&gt;(T message);</p>
<p>This is where Polymorphic Message Dispatch comes in:</p>
<h2>Polymorphic Message Dispatch</h2>
<p>While you can pull of the WCF generics thing, one thing that is more difficult (without writing your own dispatch model) is to have a pipeline of classes which can be invoked based on their relationship to the type passed in. Using NServiceBus, both of the following message handlers will be invoked when UserCreated arrives:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> Persistence : IHandleMessages&lt;UserCreated&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(UserCreated message) { }
}

<span class="kwrd">public</span> <span class="kwrd">class</span> Audit : IHandleMessages&lt;IMessage&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(IMessage message) { }
}</pre>
<p>Now some might say that WCF, BizTalk, and the .NET Service Bus allow you to do auditing in their own internal pipeline, and that&#8217;s true. The place where this becomes more powerful is when you need to build V2 of your system, and the publisher now publishes a slightly different event &#8211; that a user was created as a part of a campaign, requiring the subscriber to register statistics about the campaign. Of course, this event also means that a user was created. Here&#8217;s how you&#8217;d do that with NServiceBus:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> UserCreatedFromCampaign : UserCreated
{
    <span class="kwrd">public</span> Guid CampaignId { get; set; }
}

<span class="rem">//publisher code</span>
bus.Publish&lt;UserCreatedFromCampaign&gt;( m =&gt;
{
    m.UserId = Guid.NewGuid();
    m.Name = <span class="str">"John Smith"</span>;
    m.CampaignId = theCampaignId;
}

<span class="rem">//subscriber code</span>
<span class="kwrd">public</span> <span class="kwrd">class</span> Statistics : IHandleMessages&lt;UserCreatedFromCampaign&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(UserCreatedFromCampaign message) { }
}</pre>
<p>The important part is what you don&#8217;t see &#8211; since UserCreatedFromCampaign inherits from UserCrated, the Persistence handler we had from V1 will also be invoked, and so will the Audit handler of course. You don&#8217;t have to make your new code call the old code like you would in a method based dispatch model. This makes sure that the coupling in your service layer code remains constant over time as you grow the functionality of your system.</p>
<p>This was one of the main benefits mentioned by Rackspace in their use of NServiceBus (<a href="http://www.nservicebus.com/Customers.aspx">here</a>):</p>
<blockquote><p>&#8220;The main benefit NServiceBus has brought us so far is developer scalability due to lower coupling and higher consistency in our code.&#8221;</p></blockquote>
<p>But, when looking at the above scenario, we can obviously expect that all sorts of things can happen in relation to campaigns &#8211; it is a separate concern, and thus should be handled by a separate subscriber. And this bring us to&#8230;</p>
<h2>Polymorphic Message Routing</h2>
<p>The challenge that we have here is that we no longer have a hierarchy where something clearly belongs on top of something else. We have users created and activities happening related to campaigns &#8211; that may happen in any combination. By having separate subscribers, we could then introduce new handlers/subscribers to our environment without touching or taking down any of the other subscribers. Here&#8217;s what the subscribers would look like:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> Persistence : IHandleMessages&lt;UserCreated&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(UserCreated message) { }
}

<span class="kwrd">public</span> <span class="kwrd">class</span> Statistics : IHandleMessages&lt;CampaignActivityOccurred&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(CampaignActivityOccurred message) { }
}</pre>
<p>But if each of the above messages were a class, how could we define a message which inherited from both?</p>
<p>Before answering that, we need to understand why the publisher wouldn&#8217;t just publish both of the above messages. You see, the publisher can&#8217;t make any assumptions about its subscribers &#8211; it could be that one of them has logic that correlates across both of these messages that could end up counting the occurrence as happening twice rather than once, possibly charging the account associated with the campaign twice. Publishing two messages results in two transactions when there really should have been one.</p>
<p>So, here&#8217;s how to define messages so that we can have multiple inheritance:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">interface</span> UserCreated : IMessage
{
    Guid UserId { get; set; }
    <span class="kwrd">string</span> Name { get; set; }
}

<span class="kwrd">public</span> <span class="kwrd">interface</span> CampaignActivityOccurred : IMessage
{
    Guid CampaignId { get; set; }
    Guid ActivityId { get; set; }
}

<span class="kwrd">public</span> <span class="kwrd">interface</span> UserCreatedFromCampaign
                 : UserCreated,
                   CampaignActivityOccurred
{
}</pre>
<p>And when the publisher publishes UserCreatedFromCampaign, the event would be routed to both the UserCreated subscriber and the CampaignActivityOccurred subscriber. The power of this approach is felt as we handle new requirements around purchases made related to a campaign. Now we can have another event which inherits from CampaignActivityOccurred and not have to worry since the existing subscriber will be routed those messages automatically.</p>
<p>Since WCF doesn&#8217;t have publish/subscribe capabilities, we might as well move along.</p>
<p>Not to throw a burning match on an ocean of oil, but REST doesn&#8217;t really support this either.</p>
<h2>Not Content-Based Routing</h2>
<p>This may sound like the <a href="http://www.eaipatterns.com/ContentBasedRouter.html">content-based router pattern from EIP</a> (CBR), but it&#8217;s not. The important difference is that there isn&#8217;t some part of the routing that depends on the structure of the messages. The major drawback of CBR is that it creates a central place in your system that needs to be changed any time *syntactic* changes happen to message structure *in addition to* to changes in the subscribers.</p>
<p>Now, this is where the BizTalk guys would say that &#8220;that&#8217;s why we can do message transformations&#8221;, and then the subscribers wouldn&#8217;t need to be changed. However, can we really know when getting a requirement that the change is syntactic and not semantic? I mean, it&#8217;s quite common that changes to message structures happen together with changes to processing logic. </p>
<p>You may be beginning to get the feeling that more and more logic is being sucked out of the subscribers into some monolithic black hole that is likely going to be unmaintainable and quite slow. </p>
<p>This is one of the main differences between using a bus and a broker &#8211; a bus supports the correct distribution of logic keeping the system loosely coupled; brokers are useful integration engines when you absolutely can&#8217;t change the applications being integrated. Enterprise Application Integration (EAI) brokers don&#8217;t usually make good Enterprise Service Bus (ESB) technology.</p>
<h2>In Closing</h2>
<p>NServiceBus has all sorts of features you didn&#8217;t know you needed until you saw what life could be like when you had them. Most of these features don&#8217;t have snazzy drag-and-drop demos that make people ooh-and-aah and TechEds and PDCs, but they&#8217;re really necessary to avoid finding yourself in yet another big-ball-of-mud code base telling your manager/customer (again) that it would be faster to rebuild the system from scratch than to implement that new requirement in the old one.</p>
<p>Take NServiceBus for a spin and <a href="http://www.nservicebus.com/">see for yourself</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2011/01/13/polymorphism-and-messaging/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>NServiceBus 2.5 Released</title>
		<link>http://www.udidahan.com/2010/12/31/nservicebus-2-5-released/</link>
		<comments>http://www.udidahan.com/2010/12/31/nservicebus-2-5-released/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 16:12:44 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[Reliability]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1376</guid>
		<description><![CDATA[Just before we usher in the new year, I&#8217;m happy to announce the release of NServiceBus version 2.5.

Yes, there&#8217;s a new logo, and the website&#8217;s been redesigned.
It&#8217;s been a long time coming &#8211; the previous version (2.0) was released in March.
I&#8217;m really quite excited about this version as it rolls up all the bug fixes [...]]]></description>
			<content:encoded><![CDATA[<p>Just before we usher in the new year, I&#8217;m happy to announce the release of NServiceBus version 2.5.</p>
<p><a href="http://www.NServiceBus.com"><img src="http://www.nservicebus.com/img/nServiceBus_Logo.png" width="330" height="77" style="border:none;" alt="Go to the NServiceBus website" title="Go to the NServiceBus website" /></a></p>
<p>Yes, there&#8217;s a new logo, and the website&#8217;s been redesigned.<br />
It&#8217;s been a long time coming &#8211; the previous version (2.0) was released in March.</p>
<p>I&#8217;m really quite excited about this version as it rolls up all the bug fixes and enhancements that customers have asked for as they ran version 2.0 under the most severe types of production environments. The next thing that is a big deal that many have been asking for is a <strong>licensed</strong> version of NServiceBus &#8211; that is, the ability to purchase a commercial license and receive support.</p>
<p>We all know how managers like having a throat to choke.</p>
<p>And now they&#8217;ll have one &#8211; NServiceBus Ltd is the company that will be providing licensing, services, and support for all customers&#8217; NServiceBus needs. After more than 33,000 downloads and over 1000 developers in the community, the demand has really grown. Who would&#8217;ve thought all this would happen when I started NServiceBus 4 years ago (before it even had a name).</p>
<h3>Why NServiceBus is better than WCF for your distributed systems</h3>
<p>This question comes up repeatedly for people hearing about NServiceBus for the first time.</p>
<p>The answer is simple &#8211; reliability.</p>
<p>A system built with NServiceBus is so much more reliable to all kinds of production conditions than WCF that it&#8217;s hardly a fair comparison at all. While WCF can be configured to provide something kind of close to the same level of reliability, you need to do a fair amount of spelunking through the various options of netMsmqBinding to get it right. </p>
<p>The second reason to use NServiceBus instead of WCF is publish/subscribe.</p>
<p>The ability to make use of events and the observer pattern not just to achieve loose coupling within a single process, but across many processes, machines, and sites. Can you imagine going back to programming without events? Shudder. But that&#8217;s exactly what it&#8217;s like to use WCF in your distributed system. NServiceBus brings you the best of object-oriented programming but in a distributed and reliable infrastructure.</p>
<h3>Don&#8217;t wait any longer</h3>
<p>Take NServiceBus for a spin.</p>
<p>But things may look a bit different after you do&#8230;</p>
<p><img src="http://www.udidahan.com/wp-content/uploads/RedPillBluePill.jpg" alt="RedPillBluePill" title="RedPillBluePill" width="595" height="239" class="alignnone size-full wp-image-1384" /></p>
<p><a href="http://www.NServiceBus.com">http://www.NServiceBus.com</a></p>
<p>And have a happy New Year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/12/31/nservicebus-2-5-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Known Unknowns of SOA</title>
		<link>http://www.udidahan.com/2010/11/15/the-known-unknowns-of-soa/</link>
		<comments>http://www.udidahan.com/2010/11/15/the-known-unknowns-of-soa/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 13:44:40 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1364</guid>
		<description><![CDATA[One of the better known analysts in the enterprise software area, JP Morgenthal, wrote this post about the relationship between SOA, BPM, and EA. In it he defines SOA as follows:
&#8220;SOA is a practice that focuses on modeling the entities, and relationships between entities, that comprise the business as a set of services. This can [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/rumsfeld120804.jpg" alt="rumsfeld" title="rumsfeld" width="162" height="225" style="float:right; margin-left:10px; margin-bottom:10px;" />One of the better known analysts in the enterprise software area, JP Morgenthal, wrote this post about <a href="http://soa.dzone.com/news/relationship-between-soa-bpm">the relationship between SOA, BPM, and EA</a>. In it he defines SOA as follows:</p>
<blockquote><p>&#8220;SOA is a practice that focuses on modeling the entities, and relationships between entities, that comprise the business as a set of services. This can be done on a small or large scale. Typically, the relationships in this model represent consumer/provider relationships.&#8221;</p></blockquote>
<p>I have some serious concerns about the ramifications of this definition/description.</p>
<p>First of all, when reading &#8220;entities&#8221;, many people will interpret that to mean the entities found in Entity Relationship Diagrams [<a href="http://en.wikipedia.org/wiki/Entity-relationship_model">ERD</a>] or in Object Oriented Analysis &#038; Design [<a href="http://en.wikipedia.org/wiki/Object-oriented_analysis_and_design">OOAD</a>]. In both, these entities are identified as the &#8220;nouns&#8221; of the domain. Examples of these ERD/OOAD-type entities include things like Customer, Order, and Product.</p>
<p>These are almost always the wrong place to start for identifying services in SOA.</p>
<p>Second, on the consumer/provider relationship: on the one had, this fits very well with how web services can consume (or call) other web services. However, the downsides of using web services as services in SOA is becoming well enough known that even in the same post we see this warning:</p>
<blockquote><p>&#8220;Web Services is not SOA, it is merely a standardized approach to accessing functionality on remote systems.&#8221;</p></blockquote>
<p>But the question remains, if a producer/consumer relationship is OK for SOA-type services, why doesn&#8217;t that hold for web services? And the answer is&#8230; it depends on the type of producer/consumer relationship. The typical relationship is one of synchronous calls from consumer to producer, this is not OK for SOA-type services either. </p>
<p>You see, this synchronous producer/consumer implies a model where services are not able to fulfill their objectives without calling other services. In order for us to achieve the IT/Business alignment promised by SOA, we need services which are autonomous, ie. able to fulfill their objectives without that kind of external help.</p>
<p>Instead, we need to look for a more loosely coupled producer/consumer relationship &#8211; like publish/subscribe, where the producer emits events, and the consumer subscribes and handles those events. The reason that this kind of relationship doesn&#8217;t hurt autonomy is that it disconnects services on the dimension of time. In order for a service to be able to make a decision autonomously without synchronously calling any other service, using only information provided by events it received in the past, it must be strongly aligned with the business.</p>
<p>Most projects which bandy about the SOA acronym aren&#8217;t actually made up of services &#8211; they&#8217;re made up of XML over HTTP functions calling other XML over HTTP functions, eventually calling XML over HTTP databases. You can layer as much XML and HTTP as you want on top of it, but at the end of the day, most projects are just functions calling functions calling databases &#8211; in other words, procedural programming in the large, and no amount of SOAP will wash away the stink.</p>
<p>Here&#8217;s a different definition of services for SOA that may communicate a bit better what it&#8217;s all about:</p>
<blockquote><p>A service is the technical authority for a specific business capability.<br />
Any piece of data or rule must be owned by only one service.</p></blockquote>
<p>What this means is that even when services are publishing and subscribing to each other&#8217;s events, we always know what the authoritative source of truth is for every piece of data and rule. </p>
<p>Also, when looking at services from the lense of business capabilities, what we see is that many user interfaces present information belonging to different capabilities &#8211; a product&#8217;s price alongside whether or not it&#8217;s in stock. In order for us to comply with the above definition of services, this leads us to an understanding that such user interfaces are actually a mashup &#8211; with each service having the fragment of the UI dealing with its particular data.</p>
<p>Ultimately, process boundaries like web apps, back-end, batch-processing are very poor indicators of service boundaries. We&#8217;d expect to see multiple business capabilities manifested in each of those processes.</p>
<p>I know that this may be more confusing than the traditional web services approach but, to paraphrase Donald Rumsfeld, it is better to know that you don&#8217;t know, than to not know that you don&#8217;t know <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/11/15/the-known-unknowns-of-soa/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Logical and Physical Architecture</title>
		<link>http://www.udidahan.com/2010/11/08/logical-and-physical-architecture/</link>
		<comments>http://www.udidahan.com/2010/11/08/logical-and-physical-architecture/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 19:14:04 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1355</guid>
		<description><![CDATA[One architectural misunderstanding I see repeatedly in my work with clients is in the relationship between logical and physical architecture. The most common building-block of these misunderstandings is the web service (or it&#8217;s &#8220;upgraded&#8221; .net counterpart &#8211; the WCF service).
Don&#8217;t get me wrong, sometimes there is a place for a web service, just not everywhere.
So, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/orthogonal1.jpg" alt="orthogonal" title="orthogonal" width="300" height="237" style="float:right; margin-left:10px; margin-bottom:10px;" />One architectural misunderstanding I see repeatedly in my work with clients is in the relationship between logical and physical architecture. The most common building-block of these misunderstandings is the web service (or it&#8217;s &#8220;upgraded&#8221; .net counterpart &#8211; the WCF service).</p>
<p>Don&#8217;t get me wrong, sometimes there is a place for a web service, just not everywhere.</p>
<p>So, what&#8217;s the problem?</p>
<p>Well, when developers and architects use web services as the building blocks of their designs, they are creating the same architecture for both the logical and physical elements of their system. Back in 1995, Philippe Kruchten documented his <a href="http://en.wikipedia.org/wiki/4%2B1_Architectural_View_Model">4 + 1 Architectural View Model</a> in which he outlined 4 + 1 different views that should be used to describe an architecture.</p>
<p>Even though since 1995 the number and types of recommended views of software architecture has evolved (with things like the <a href="http://en.wikipedia.org/wiki/Zachman_Framework">Zachman Framework</a> for enterprise architecture numbering some 30 views), there is broad agreement that (at the very least) the logical and physical artifacts should likely be designed differently.</p>
<p>Just because two distinct logical components have been identified in the architecture, that doesn&#8217;t necessarily mean they should be hosted separately (for example by making each one a web/wcf service). In fact, there are significant <b>disadvantages</b> to doing so (as described in the <a href="http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing">Fallacies of Distributed Computing</a>).</p>
<p>In some cases, this mistake is exacerbated by a mistaking these components with SOA-type services, resulting in an attempt by developers to have each component have its own contract, which can then be independently versioned. This often results in the need for transformation between the structure of these so-called contracts, but not within the components themselves (oh-no, they&#8217;re &#8220;autonomous&#8221;), but rather in between them using some kind of &#8220;ESB&#8221; technology.</p>
<p>This architectural style is known as the Broker, Hub and Spoke, Mediator, and most importantly &#8211; not SOA. If you find a technology that fits this style perfectly (like BizTalk), that technology is not a Bus, not a Service Bus, and definitely not an Enterprise Service Bus.</p>
<p>One of the problems of this approach is that when any &#8220;service&#8221; contract changes, you have to change all the transformations in your broker that involve it. Unfortunately, most brokers have no unit-testing facility so it&#8217;s very much trial and error, and error, and error. The matter is even more serious since most brokers don&#8217;t enable you to have your transformations or orchestrations in source control, so you can&#8217;t diff to see what changed from the previous version.</p>
<p>It&#8217;s really amazing how much pain can be traced back to that one original misunderstanding. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/11/08/logical-and-physical-architecture/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>NServiceBus Presentation Now Online</title>
		<link>http://www.udidahan.com/2010/06/09/nservicebus-presentation-now-online/</link>
		<comments>http://www.udidahan.com/2010/06/09/nservicebus-presentation-now-online/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 21:43:51 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1298</guid>
		<description><![CDATA[Last April I was in Bergen Norway for some consulting and training and I also gave my first NServiceBus presentation to a user group. I don&#8217;t particularly like giving NServiceBus-specific presentations, preferring to talk about the patterns and concepts of service-based architectures and service buses &#8211; NServiceBus is just an implementation. Ultimately, that&#8217;s what happened [...]]]></description>
			<content:encoded><![CDATA[<p>Last April I was in Bergen Norway for some consulting and training and I also gave my first NServiceBus presentation to a user group. I don&#8217;t particularly like giving NServiceBus-specific presentations, preferring to talk about the patterns and concepts of service-based architectures and service buses &#8211; NServiceBus is just an implementation. Ultimately, that&#8217;s what happened in the presentation &#8211; in the first half (or so) I talked about the theory, and in the second I demonstrated that theory with NServiceBus.</p>
<p>Currently, the video is being graciously hosted by Jon Torresdal on his blog, so let&#8217;s hope that the bandwidth holds up.</p>
<p>Get it <a href="http://blog.torresdal.net/2010/06/08/NNUGPresentationUdiDahanOnNServiceBus.aspx">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/06/09/nservicebus-presentation-now-online/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ESB Differences Between Java and .NET</title>
		<link>http://www.udidahan.com/2010/03/29/esb-differences-between-java-and-net/</link>
		<comments>http://www.udidahan.com/2010/03/29/esb-differences-between-java-and-net/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 13:53:52 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[BPM]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Podcast]]></category>
		<category><![CDATA[Pub/Sub]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1212</guid>
		<description><![CDATA[At QCon London a couple of weeks ago I had a chat with Ross Mason, the founder of Mule &#8211; the open source Java ESB. After a while, I realized that NServiceBus is a bit different from Mule ESB in terms of scope.
While Mule has many features in terms of connectivity and integration, NServiceBus provides [...]]]></description>
			<content:encoded><![CDATA[<p>At QCon London a couple of weeks ago I had a chat with Ross Mason, the founder of <a href="http://www.mulesoft.com/mule-esb-open-source-esb">Mule &#8211; the open source Java ESB</a>. After a while, I realized that NServiceBus is a bit different from Mule ESB in terms of scope.</p>
<p>While Mule has many features in terms of connectivity and integration, NServiceBus provides platform interop only. One could say that this is a product of the different backgrounds I and Ross come from.  </p>
<p>On the other hand, the saga capabilities in NServiceBus for handling long-running processes are considered to be BPM functionality on the Java side of the industry, and as such, Mule does not have them.</p>
<p>In terms of other enterprise features like management and monitoring, Mule is more mature, but NServiceBus holds its own in terms of high availability and actually surpasses Mule with the grid and scale-out capabilities of its distributor.</p>
<p>Anyway, I think it&#8217;s about time each of these parts was explicitly described so that companies already invested in Java ESB tools will know what they&#8217;re getting with NServiceBus.</p>
<p>Until then, I hope this podcast describing the full spectrum of NServiceBus, from top level SOA services to in-the-weeds transaction management, will provide more information about what it is and why you might want to use it:</p>
<p><a href="http://deepfriedbytes.com/deepfriedbytes/podcast/episode-49-getting-the-right-message-about-nservicebus-with-udi-dahan/">Deep Fried Bytes, episode 49 &#8211; Getting the right message about NServiceBus with Udi Dahan</a>.</p>
<p>Comments most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/03/29/esb-differences-between-java-and-net/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>NServiceBus 2.0 Release Candidate 2 Available</title>
		<link>http://www.udidahan.com/2010/02/01/nservicebus-2-0-release-candidate-2-available/</link>
		<comments>http://www.udidahan.com/2010/02/01/nservicebus-2-0-release-candidate-2-available/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:13:21 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1173</guid>
		<description><![CDATA[So it&#8217;s been about 6 months since my last NServiceBus post and since then about 1000 new people have subscribed to this blog so they might not know anything about it. For a bit of history, see the post (from almost exactly a year ago) describing the 1.9 release of NServiceBus here.
What&#8217;s New
The quickly approaching [...]]]></description>
			<content:encoded><![CDATA[<p>So it&#8217;s been about 6 months since my last NServiceBus post and since then about 1000 new people have subscribed to this blog so they might not know anything about it. For a bit of history, see the post (from almost exactly a year ago) describing the 1.9 release of NServiceBus <a href="http://www.udidahan.com/2009/02/07/nservicebus-19/">here</a>.</p>
<h2>What&#8217;s New</h2>
<p>The quickly approaching next release of NServiceBus will be version 2.0 and is a big step from 1.9. After 2 betas and 2 release candidates, this version has had a longer stabilization period than any of the versions so far (1.4-1.9). Many of my clients are already using it in production and are very pleased with it. I&#8217;ve heard similar reports from others in the community (now with over 500 members in the discussion group). There have been almost 10,000 downloads since the version 1.9 release and in every country I visit I meet people using NServiceBus in new and interesting applications.</p>
<p>With my appearance on <a href="http://www.hanselminutes.com/default.aspx?showID=194">Hanselminutes</a>, many in the mainstream .NET industry have started taking a look at NServiceBus. That, and the fact that Microsoft&#8217;s Oslo technology has now taken a very data-driven turn (rather than its original service-oriented direction).</p>
<p>Interestingly enough, I&#8217;ve been hearing more and more reports about people using NServiceBus as a developer-friendly API on top of other technologies. This includes BizTalk and even Neuron. I never thought that people would take the pluggability of NServiceBus that far.</p>
<h2>So, what is NServiceBus?</h2>
<p>Well, it&#8217;s a service bus, y&#8217;know, like an ESB &#8211; just an open-source one.</p>
<p>All kidding aside, in a nutshell, it gives you an easy way to integrate transactional messaging into your applications.</p>
<p>One of the reasons why you might want to do that is so that you don&#8217;t lose messages containing valuable data when IIS recycles your AppDomain, every 15-20 minutes (as I wrote about in <a href="http://msdn.microsoft.com/en-us/magazine/cc663023.aspx">this MSDN magazine article</a>).</p>
<p>There are many other nice things in there, like the ability to unit test your service layers and long-running processes but you can read more about that here&#8230;</p>
<h2>Documentation</h2>
<p>One of the biggest differences to NServiceBus in this release is <b>documentation</b>.</p>
<p>A lot of work has gone into the <a href="http://www.NServiceBus.com">NServiceBus.com</a> site to help developers hit the ground running with NServiceBus, including the more advanced aspects of <a href="http://www.nservicebus.com/Distributor.aspx">transparent scale-out with the distributor</a> and <a href="http://www.nservicebus.com/Gateway.aspx">multi-site communications</a>.</p>
<p>There is still work to be done in this area but feedback so far has been extremely positive (except for some grumblings from certain old-timers saying that if they could figure it out by themselves, well, you know the rest).</p>
<h2>In Closing</h2>
<p>If you&#8217;re building a distributed enterprise .NET system, take 5 minutes, download it, and see transactional publish/subscribe messaging working on your machine without any big heavy-weight middleware.</p>
<p><a href="http://www.NServiceBus.com">www.NServiceBus.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2010/02/01/nservicebus-2-0-release-candidate-2-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Messaging</title>
		<link>http://www.udidahan.com/2009/11/01/search-and-messaging/</link>
		<comments>http://www.udidahan.com/2009/11/01/search-and-messaging/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 05:33:35 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1134</guid>
		<description><![CDATA[
One question that I get asked about quite a bit with relation to messaging is about search. Isn&#8217;t search inherently request/response? Doesn&#8217;t it have to return immediately? Wouldn&#8217;t messaging in this case hurt our performance?
While I tend to put search in the query camp in the when keeping the responsibility of commands and queries separate, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/search.png" width="200" height="204" style="float:right; margin-left:10px; margin-bottom:10px;" alt="search" title="search" /><br />
One question that I get asked about quite a bit with relation to messaging is about search. Isn&#8217;t search inherently request/response? Doesn&#8217;t it have to return immediately? Wouldn&#8217;t messaging in this case hurt our performance?</p>
<p>While I tend to put search in the query camp in the when keeping the responsibility of commands and queries separate, and often recommend that those queries be done without messaging, there are certain types of search where messaging does make sense.</p>
<p>In this post, I&#8217;ll describe certain properties of the problem domain that make messaging a good candidate for a solution.</p>
<h3>Searching is besides the point &#8211; Finding is what it&#8217;s all about</h3>
<p>Remember that search is only a means to an end in the eyes of the user &#8211; they want to find something. One of the difficulties we users have is expressing what we want to find in ways that machines can understand.</p>
<p>In thinking about how we build systems to interact with users, we need to take this fuzziness into account. The more data that we have, the less homogeneous it is, the harder this problem becomes.</p>
<p>When talking about speed, while users are sensitive to the technical interactivity, the thing that matters most is the total time it takes for them to find what they want. If the result of each search screen pops up in 100ms, but the user hasn&#8217;t found what they&#8217;re looking for after clicking through 20 screens, the search function is ultimately broken.</p>
<p>Notice that the finding process isn&#8217;t perceived as &#8220;immediate&#8221; in the eyes of the user &#8211; the evaluation they do in their heads of the search results is as much a part of finding as the search itself.</p>
<p>Also, if the user needs to refine their search terms in order to find what they want, we&#8217;re now talking about a multi-request/multi-response process. There is nothing in the problem domain which indicates that finding is inherently request/response.</p>
<h3>Relationships in the data</h3>
<p>When bringing back data as the result of a search, what we&#8217;re saying is that there is a property which is the same across the result elements. But there may be more than one such property. For example, if we search for &#8220;blue&#8221; on Google Images, we get back pictures of the sky, birds, flowers, and more. Obvious so far &#8211; but let&#8217;s exploit the obvious a bit.</p>
<p>When the user sees that too many irrelevant results come back, they&#8217;ll want to refine their search. One way they can do that is to perform a new search and put in a more specific search phrase &#8211; like &#8220;blue sky&#8221;. Another way is for them to indicate this is by selecting an image and saying &#8220;not like this&#8221; or &#8220;more of these&#8221;. Then we can use the additional properties we know about those images to further refine the result group &#8211; either adding more images of one kind, or removing images of another.</p>
<p>Here&#8217;s something else that&#8217;s obvious:</p>
<p>Users often click or change their search before the entire result screen is shown. </p>
<p>It&#8217;s beginning to sound like users are already interacting with search in an asynchronous manner. What if we actually designed a system that played to that kind of interaction model?</p>
<h3>Data-space partitioning</h3>
<p>Once we accept the fact that the user is willing to have more results appear in increments, we can talk about having multiple servers processing the search in parallel. For large data spaces, it is unlikely for us to be able to store all the required meta data for search on one server anyway.</p>
<p>All we really need is a way to index these independent result-sets so that the user can access them. This can be done simply by allocating a GUID/UUID for the search request and storing the result-sets along with that ID.</p>
<h3>Browser interaction</h3>
<p>When the browser calls a server with the search request the first time, that server allocates an ID to that request, returns a URL containing that ID to the browser, and publishes an event containing the search term and the ID. Each of our processing nodes is subscribed to that event, performs the search on its part of the data-space, and writes its results (likely to a distributed cache) along with that ID. </p>
<p>The browser polls the above URL, which queries the cache (give me everything with this ID), and the browser sees which resources have been added since the last time it polled, and shows them to the user.</p>
<p>If the user clicks &#8220;more of these&#8221;, that initiates a new search request to the server, which follows the same pattern as before, just that the system is able to pull more relevant information. When implementing &#8220;not like this&#8221;, this performs a similar search but, instead of adding to the list of items shown, we&#8217;re removing items from the list shown based on the response from the server.</p>
<p>In this kind of user-system interaction model, having the user page through the result set doesn&#8217;t make very much sense as we&#8217;re not capturing the intent of the user, which is &#8220;you&#8217;re not showing me what I want&#8221;. By making it easy for the user to fine tune the result set, we get them closer to finding what they want. By performing work in parallel in a non-blocking manner on smaller sets of data, we greatly decrease the &#8220;time to first byte&#8221; as well as the time when the user can refine their search.</p>
<h3>But Google doesn&#8217;t work like that</h3>
<p>I know that this isn&#8217;t like the search UI we&#8217;ve all grown used to.</p>
<p>But then again, the search that you&#8217;re providing your users is more specific &#8211; not just pages on the web. If you&#8217;re a retailer allowing your users to search for a gift, this kind of &#8220;more like this, less like that&#8221; model is how users would interact with a real sales-person when shopping in a store. Why not model your system after the ways that people behave in the real world?</p>
<h3>In closing</h3>
<p>If we were to try to make use of messaging underneath &#8220;classical&#8221; search interaction models, it probably wouldn&#8217;t have been the greatest fit. If all we&#8217;re doing at a logical level is blocking RPC, then messaging would probably make the system slower. The real power that you get from messaging is being able to technically do things in parallel &#8211; that&#8217;s how it makes things faster. If you can find ways to see that parallelism in your problem domain, not only will messaging make sense technically &#8211; it will really be the only way to build that kind of system.</p>
<p>Learning how to disconnect from seeing the world through the RPC-tinted glasses of our technical past takes time. Focusing on the problem domain, seeing it from the user&#8217;s perspective without any technical constraints &#8211; that&#8217;s the key to finding elegant solutions. More often than not, you&#8217;ll see that the real world is non-blocking and parallel, and then you&#8217;ll be able to make the best use of messaging and other related patterns.</p>
<p>What are your thought? Post a comment and let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2009/11/01/search-and-messaging/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Progressive .NET Wrap-up</title>
		<link>http://www.udidahan.com/2009/09/07/progressive-net-wrap-up/</link>
		<comments>http://www.udidahan.com/2009/09/07/progressive-net-wrap-up/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 06:06:30 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Business Rules]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Data Access]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[Pub/Sub]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1103</guid>
		<description><![CDATA[So, I&#8217;ve gotten back from a most enjoyable couple of days in Sweden where I gave two half-day tutorials, the first being the SOA and UI composition talk I gave at the European Virtual ALT.NET meeting (which you can find online here) and the other on DDD in enterprise apps (the first time I&#8217;ve done [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve gotten back from a most enjoyable couple of days in Sweden where I gave two half-day tutorials, the first being the SOA and UI composition talk I gave at the European Virtual ALT.NET meeting (which you can find online <a href="http://www.vimeo.com/5022174">here</a>) and the other on DDD in enterprise apps (the first time I&#8217;ve done this talk).</p>
<p>I&#8217;ve gotten some questions about my DDD presentation there based on <a href="http://codebetter.com/blogs/aaron.jensen/">Aaron Jensen&#8217;s</a> pictures:</p>
<p><img src="http://www.udidahan.com/wp-content/uploads/cqs_udi_dahan_presentation.jpg" alt="cqs_udi_dahan_presentation" title="cqs_udi_dahan_presentation" width="500" height="332" class="alignnone size-full wp-image-1104" /></p>
<p>Yes &#8211; I talk with my hands. All the time.</p>
<p>That slide is quite an important one &#8211; I talked about it for at least 2 hours.</p>
<p>Here it is again, this time in full:</p>
<p><img src="http://www.udidahan.com/wp-content/uploads/cqs.jpg" alt="cqs" title="cqs" width="500" height="374" class="alignnone size-full wp-image-1107" /></p>
<p>You may notice that the nice clean layered abstraction that the industry has gotten so comfortable with doesn&#8217;t quite sit right when looking at it from this perspective. The reason for that is that this perspective takes into account physical distribution while layers don&#8217;t.</p>
<p>I&#8217;ll have some more posts on this topic as well as giving a session in TechEd Europe this November.</p>
<p>Oh &#8211; and please do feel free to already send your questions in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2009/09/07/progressive-net-wrap-up/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Hanselminutes on NServiceBus</title>
		<link>http://www.udidahan.com/2009/08/21/hanselminutes-on-nservicebus/</link>
		<comments>http://www.udidahan.com/2009/08/21/hanselminutes-on-nservicebus/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 19:53:11 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1087</guid>
		<description><![CDATA[
Yesterday me and Scott virtually sat down to have a chat about NServiceBus and service buses in general. While we didn&#8217;t get in to many of the more advanced parts, you may find it an interesting introduction to the topic as well as saving yourself the costly mistake of implementing a broker instead of a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hanselman.com/blog/images/author.jpg" style="float:right; margin-left:10px; margin-bottom:10px;" /><br />
Yesterday me and Scott virtually sat down to have a chat about NServiceBus and service buses in general. While we didn&#8217;t get in to many of the more advanced parts, you may find it an interesting introduction to the topic as well as saving yourself the costly mistake of implementing a broker instead of a bus (yes &#8211; they&#8217;re actually two different things).</p>
<p><a href="http://www.hanselminutes.com/default.aspx?showID=194">Take a listen.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2009/08/21/hanselminutes-on-nservicebus/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MSDN Magazine Smart Client Article</title>
		<link>http://www.udidahan.com/2009/03/28/msdn-magazine-smart-client-article/</link>
		<comments>http://www.udidahan.com/2009/03/28/msdn-magazine-smart-client-article/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 19:16:39 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Smart Client]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/2009/03/28/msdn-magazine-smart-client-article/</guid>
		<description><![CDATA[
My article on “optimizing a large-scale Software+Services application” has been published in the April edition of MSDN Magazine.
Here’s a short excerpt:
“We had to juggle occasional connectivity, data synchronization, and publish/subscribe all at the same time. We learned that we couldn’t solve all problems either client-side or server-side, but rather that an integrated approach was needed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; margin: 0px 0px 10px 10px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://www.udidahan.com/wp-content/uploads/MSDNMagazineSmartClientArticle_13E17/image.png" width="189" align="right" border="0" /></a></p>
<p>My article on “optimizing a large-scale Software+Services application” has been published in the April edition of MSDN Magazine.</p>
<p>Here’s a short excerpt:</p>
<blockquote><p>“We had to juggle occasional connectivity, data synchronization, and publish/subscribe all at the same time. We learned that we couldn’t solve all problems either client-side or server-side, but rather that an integrated approach was needed since any changes on one side needed corresponding changes on the other side.”</p></blockquote>
<p><a href="http://msdn.microsoft.com/en-us/magazine/dd569749.aspx">Continue reading… </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2009/03/28/msdn-magazine-smart-client-article/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>SOA, EDA, and CEP a winning combo</title>
		<link>http://www.udidahan.com/2008/11/01/soa-eda-and-cep-a-winning-combo/</link>
		<comments>http://www.udidahan.com/2008/11/01/soa-eda-and-cep-a-winning-combo/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 22:57:14 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/2008/11/01/soa-eda-and-cep-a-winning-combo/</guid>
		<description><![CDATA[ There&#8217;s been some discussion on the SOA yahoo group around the connection between SOA, EDA, and CEP (complex event processing) since Jack&#8217;s original post on the topic. I&#8217;ve been waiting for the right opportunity to jump in and it seems to have come.
Dennis asked this:

There are different design choices in a SOA, even when [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 10px 10px; border-left: 0px; border-bottom: 0px" height="240" alt="jump in" src="http://www.udidahan.com/wp-content/uploads/image46.png" width="320" align="right" border="0"> There&#8217;s been some discussion on the SOA yahoo group around the connection between SOA, EDA, and CEP (complex event processing) since Jack&#8217;s <a href="http://soa-eda.blogspot.com/2008/10/eda-versus-cep-and-soa.html">original post</a> on the topic. I&#8217;ve been waiting for the right opportunity to jump in and it seems to have come.
<p>Dennis asked this:<br />
<blockquote>
<p>There are different design choices in a SOA, even when you already have identified the services. I have a simple example that I would like to share:</p>
<p>Imagine a order-to-cash process. One part of that process is to register an order. Suppose we have two services, Order Service and Inventory Service. The task is to register the order and make a corresponding reservation of the stock level. I would be pleased to have the groups view on the following 3 design options (A, B, C):</p>
<p>A.<br />1. The &#8220;process/application&#8221; sends a message (sync or async) to &#8220;registerOrder&#8221; on the Order Service.<br />2. The &#8220;process/application&#8221; sends another message (sync or async) to &#8220;reserveStock&#8221; on the the Inventory Service.</p>
<p>B.<br />1. The &#8220;process/application&#8221; sends a message (sync or async) to &#8220;registerOrder&#8221; on the Order Service.<br />2. The Order Service sends a message (sync or async) to &#8220;reserveStock&#8221; on the the Inventory Service.</p>
<p>C.<br />1. The &#8220;process/application&#8221; sends a message (sync or async) to &#8220;registerOrder&#8221; on the Order Service.<br />2. The Order Service publishes an &#8220;orderReceived&#8221; event.<br />3. The Inventory Service subscribes to the &#8220;orderReceived&#8221; event .</p>
</blockquote>
<p>On the whole &#8220;already identified the services&#8221; thing &#8211; naming a service doesn&#8217;t mean much. It&#8217;s all about allocating responsibility, and until that&#8217;s been done, those &#8220;services&#8221; don&#8217;t give us very much information.
<p>&nbsp;<br />
<h3>Business Services</h3>
<p>If we were to view this example in light of business services, and look at the business events that make up this process, maybe we’d get a different perspective.<br />
<blockquote>
<p>Three business services: <strong>Sales</strong>, <strong>Inventory</strong>, and <strong>Shipping</strong>.</p>
</blockquote>
<p>In Sales, many applications and people may operate, including the person and the application he used to submit the order. When the order is submitted and goes through all the internal validation stuff, Sales raises an OrderTentativelyAccepted event.<br />
<h4>Inventory and Orders</h4>
<p>Inventory, which is subscribed to this event, checks if it has everything in stock for the order. For every item in the order on stock, it allocates that stock to the order and publishes the InventoryAllocatedToOrder event for it. For items/quantities not in stock, it starts a long running process which watches for inventory changes.
<p>When an InventoryChanged event occurs, it matches that against orders requiring allocation – if it finds one that requires stock, based on some logic to choose which order gets precedence, it publishes the InventoryAllocatedToOrder event.
<p>Sales, which is subscribed to the InventoryAllocatedToOrder event, upon receiving all events pertaining to the order tentatively accepted, will publish an OrderAccepted event.<br />
<h4>Orders and Shipping</h4>
<p>When Inventory receives the OrderAccepted event, it generates the pick list to bring all the stock from the warehouses to the loading docks, finally publishing the PickListGenerated event containing target docks.
<p>When Shipping receives the PickListGenerated event, it starts the yard management necessary to bring the needed kinds of trucks to the docks.
<p>&nbsp;<br />
<h3>What else is possible</h3>
<p>I could go on, talking about things like the maximum amount of time stock of various kinds can wait to be loaded on trucks, subscribing to earlier events to employ all kinds of optimization and prediction algorithms, having a Customer Care service notifying the customer about what’s going on with their order (probably different for different kinds of customers and preferred communication definitions). Obviously, we&#8217;d need a Billing service to handle the various kinds of billing procedures, whether or not the customer has credit, pays upon delivery, etc.
<p>It turns out that many business domains map very well to this join of SOA and EDA.
<p>&nbsp;<br />
<h3>What an ESB is for</h3>
<p>When we have these kinds of business services primarily publishing events and subscribing to those of other services, you don&#8217;t need much else from your &#8220;enterprise service bus&#8221;. All sorts of transformation, routing, and orchestration capabilities don&#8217;t come into play at all.
<p>In all truthfullness, those bits of functionality are really just a historical artifact of their broker heritage.
<p>Don&#8217;t get me wrong, sometimes a broker is a nice thing to have &#8211; behind a service boundary in order to perform some complex integration between existing legacy applications.
<p>Just keep that stuff in its place &#8211; not between services.<br />
<h3>&nbsp;</h3>
<h3>Complex Event Processing</h3>
<p>We can look at how Sales transitions an order from being tentatively accepted to being accepted as requiring event correlation around InventoryAllocatedToOrder events. This isn&#8217;t exactly &#8220;complex&#8221; in its own right. If there were some kind of CEP engine that did this for us out of the box, it might be a possible technology choice for implementing this logic within our service.
<p>As we add more concerns, like time, we may find new ways to make use of this engine. For instance, if the time to provide the order to the customer is approaching, we may choose to split the order into two &#8211; accepting one for which we have all the stock allocated, and leaving the second as tentatively accepted.<br />
<h3>&nbsp;</h3>
<h3>Summary</h3>
<p>While it is difficult to move forward on service responsibility without discussing the events it raises and those it subscribe to, the whole issue of CEP can be postponed for a while.
<p>Although there aren&#8217;t many who would say that EDA is necessary for driving down coupling in SOA, or that SOA won&#8217;t likely provide much value without EDA, or that SOA is necessary for providing the right boundaries for EDA, it&#8217;s been my experience that that is exactly the case.
<p>CEP, while being a challenging engineering field, and managing the technical risks around it necessary for a project to succeed in some circumstances, and really shines when used under the SOA/EDA umbrella, it should not be taken by itself and used at the topmost architectural levels.
<p>&nbsp;</p>
<hr size="1">
<h3>Related Content</h3>
<blockquote><p><a href="http://www.udidahan.com/2008/04/23/visual-cobol-enterprise-processes-and-soa/">SOA and Enterprise Processes</a></p>
<p><a href="http://www.udidahan.com/2008/08/11/command-query-separation-and-soa/">How client interaction fits with SOA</a></p>
<p><a href="http://www.udidahan.com/2008/04/20/time-dimension-necessary-for-successful-soa-data-strategy/">Time and SOA</a></p>
<p><a href="http://www.udidahan.com/2008/01/09/durable-messaging-is-not-enough/">Durable Messaging for Fault-Tolerant Services</a></p>
</blockquote>
<p>And if you&#8217;re wondering about how to handle all that complexity inside services (different kinds of billing, periodic tests for electronics inventory, etc), you might like listening to this <a href="http://www.udidahan.com/2006/08/28/podcast-business-and-autonomous-components-in-soa/">podcast about business components</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/11/01/soa-eda-and-cep-a-winning-combo/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Additional Logic Required For Service Autonomy</title>
		<link>http://www.udidahan.com/2008/10/22/additional-logic-required-for-service-autonomy/</link>
		<comments>http://www.udidahan.com/2008/10/22/additional-logic-required-for-service-autonomy/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 22:12:06 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/2008/10/22/additional-logic-required-for-service-autonomy/</guid>
		<description><![CDATA[Of the tenets of Service Orientation, the tenet of Autonomy is one that many understand intuitively. Interestingly enough, many in that same intuitive category don&#8217;t see pub/sub as a necessity for that autonomy.
Watch that first step
Although sometimes described as the first step of an organization moving to SOA, web-service-izing everything results in synchronous, blocking, request/response [...]]]></description>
			<content:encoded><![CDATA[<p>Of the tenets of Service Orientation, the tenet of Autonomy is one that many understand intuitively. Interestingly enough, many in that same intuitive category don&#8217;t see pub/sub as a necessity for that autonomy.</p>
<h3>Watch that first step</h3>
<p>Although sometimes described as the first step of an organization moving to SOA, web-service-izing everything results in synchronous, blocking, request/response interaction between services. The problem being that if one service were to become unavailable, all consumers of that service would not be able to perform any work. With the deep service &#8220;call stacks&#8221; this architectural style condones, the availability and performance of the entire organization will be dictated by the weakest link.</p>
<p>&nbsp;<img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 0px 100px; border-right-width: 0px" height="93" alt="weak link" src="http://www.udidahan.com/wp-content/uploads/image45.png" width="382" border="0"> </p>
<p>So, while I&#8217;d agree that many organizations do need to take this step, I&#8217;d caution against going into production at this step.</p>
<h3>Pub/Sub Considered Helpful</h3>
<p>When services interact with each other using publish/subscribe semantics we don&#8217;t have that technical problem of blocking. Subscribers cache the data published to them (either in memory or durably depending on their fault-tolerance requirements) thus enabling them to function and process requests even if the publisher is unavailable.</p>
<p>Consider the following scenario:</p>
<p>Let&#8217;s say we have an e-commerce site, a part of our Sales service responsible for selling products. Another service, let&#8217;s call it merchandising, is responsible for the catalog of products, and how much each product costs. Sales is subscribed to price update events published by Merchandising and saves (caches) those prices in its own database. When a customer orders some products on the site, Sales does not need to call Merchandising to get the price of the product and just uses the previously saved (cached) price. Thus, even if Merchandising is unavailable, Sales is able to accept orders. This is a big win as our merchandising application is not nearly as robust as our sales systems.</p>
<p>Yet, there are scenarios where data freshness requirements prevent this.</p>
<h3>Too Much of a Good Thing?</h3>
<p>Technically, the above story is accurate. There is nothing technically preventing Sales from accepting orders. Yet consider a scenario where Merchandising is down or unavailable for an extended period of time. While this may not be entirely likely for two servers in the same data center, consider physical kiosks which customers can use to buy products. Those kiosks may not receive updates for days. Should they accept orders?</p>
<p>That&#8217;s really a question to the business. If pricing data is stale for a time period greater than X, do not sell that item. The value of X may even be different for different kinds of products. Keep in mind that this issue only arose since we architected our services to be fully autonomous. In a synchronous systems architecture, this issue would not come up. As such, it is our responsibility as architects to go digging for these requirements as well as explaining to the business what the tradeoffs are.</p>
<p>In order to have more up to date data, we need to invest in more available hardware, networks, and infrastructure. This needs to be balanced against the predicted increase in revenue that more up to date (read higher) prices would give us.</p>
<h3>You Can Get What You Pay For</h3>
<p>Beyond the additional cost of writing that additional logic, and the perceived increased complexity, another difference to note between this architectural style and the synchronous/traditional one is that it puts control of spending back in the hands of business. </p>
<p>In a synchronous architecture, in order to achieve required performance and availability, all systems need to be performant requiring across the board investments in servers, networks, and storage. Without investing everywhere, the weakest link is liable to undo all other investments. In other words, your developers have made your investment choices for you. Scary, isn&#8217;t it.</p>
<p>A more prudent investment strategy would prefer spending on services that give the biggest bang for the buck, better known as return on investment. A pub/sub based architecture allows investing in data-freshness where it makes the most sense. For example, in sales of high profit products to strategic customers rather than inventory management of raw materials for products slated to be decommissioned. </p>
<p>That sounds a lot like IT-Business Alignment.</p>
<p>Maybe there&#8217;s something to this SOA thing after all&#8230;</p>
<hr size="1">
<p> Read more about:</p>
<blockquote><p><a href="http://www.udidahan.com/2008/05/16/7-simple-questions-for-service-selection/">7 Questions for Service Selection</a></p>
<p><a href="http://www.udidahan.com/2008/04/20/time-dimension-necessary-for-successful-soa-data-strategy/">7 Questions around data freshness</a>&nbsp;</p>
<p><a href="http://www.udidahan.com/2007/08/16/dont-eda-between-existing-systems/">Event-Driven Architecture and Legacy Applications</a></p>
<p><a href="http://www.udidahan.com/2007/02/20/autonomous-services-and-enterprise-entity-aggregation/">Autonomous Services and Enterprise Entity Aggregation</a></p>
</blockquote>
<p>Or listen to a podcast describing Business Components, <a href="http://www.udidahan.com/2006/08/28/podcast-business-and-autonomous-components-in-soa/">the connection of pub/sub and SOA</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/10/22/additional-logic-required-for-service-autonomy/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>NServiceBus Performance</title>
		<link>http://www.udidahan.com/2008/05/21/nservicebus-performance/</link>
		<comments>http://www.udidahan.com/2008/05/21/nservicebus-performance/#comments</comments>
		<pubDate>Wed, 21 May 2008 07:08:05 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Scalability]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/05/21/nservicebus-performance/</guid>
		<description><![CDATA[I&#8217;ve gotten this question several times already but now companies are beginning to look for performance comparisons in making decisions around the use of nServiceBus. It&#8217;s often compared to straight WCF, BizTalk, and now Neuron ESB. In Sam&#8217;s recent post he posts to a case study of Neuron doing 28 million messages an hour. That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten this question several times already but now companies are beginning to look for performance comparisons in making decisions around the use of nServiceBus. It&#8217;s often compared to straight WCF, BizTalk, and now Neuron ESB. In Sam&#8217;s <a href="http://samgentile.com/blogs/samgentile/archive/2008/05/19/new-and-notable-243.aspx">recent post</a> he posts to a case study of Neuron doing 28 million messages an hour. That&#8217;s far more than I&#8217;ve ever heard quoted for BizTalk.</p>
<h3>Disclaimer</h3>
<p>Before giving some numbers, please keep in mind that high performance of system infrastructure does not necessarily by itself mean that the system above it is running that fast. For instance, you may have server heartbeats running really quickly but the time it takes to save a purchase order borders on a minute. So, please, take all benchmarks with a grain of salt, or two, or a whole shaker-full.</p>
<p>While I&#8217;m not at liberty to say on which specific domain/company these numbers were measured, I can say that we had the full gamut of &#8220;stateless services&#8221;, statefull services (sagas), number crunching, large data sets, many users, complex visualization, etc. Also, this wasn&#8217;t the largest installation of nServiceBus that I&#8217;m aware of, but its the one I have the most specific numbers for.</p>
<h3>Setup</h3>
<p>OK, so using the default nServiceBus distribution using MSMQ, on servers where the queue files themselves were on separate SCSI RAID disks, we were pumping around 1000 durable, transactionally processed messages per second, per server. That means that similar to the Neuron case, no messages would be lost in the case of a single fault per server per window (time to replace a failed disk set at 3 hours from failure, through detection, to replacement per site &#8211; but that&#8217;s more an operational staffing concern, not the technology itself). </p>
<p>So, that&#8217;s 3.6 million messages per hour per server, at full load. We had a total of 98 servers doing these kinds of processing, not including web servers, databases, etc. Keep in mind that web servers would be communicating with other servers using nServiceBus, but that would maybe be an unfair comparison to the Neuron numbers.</p>
<h3>Server Breakdown</h3>
<p>Anyway, the 48 number crunching servers (blade centers) we had were at full load, so we were pumping more than 170 million messages there. Keep in mind that those servers had a really fast backbone so weren&#8217;t held up by IO. Your environment may be different.</p>
<p>Another 30 (regular pizza boxes) were doing our sagas. Saga state was stored in a distributed in-memory &#8220;cache&#8221;, so once again IO wasn&#8217;t an issue for processing those messages. We were at about 70% utilization there, coming to just over 100 million messages an hour.</p>
<p>The last 20 were clustered boxes (fairly expensive) that handled the various nServiceBus distributor and timeout manager processes were at full load since they handled control messages for all the servers as well as dynamically routing the load. However, on those boxes we used much higher performance disks for the messages, since they had to feed everything else, capable of doing, on average, around 5000 messages a second. That adds up to 360 million messages an hour.</p>
<h3>Unnecessary Durability</h3>
<p>Later, we moved a bunch of messages that didn&#8217;t need all that durability and transactionality off the disks, pushing the total throughput over 1 billion messages an hour. That was about 100 million per hour durable, 900 million per hour non-durable. You can guess that we were left with plenty of IO to spare at that point while we weren&#8217;t yet pushing the limit of our memory.</p>
<p>One thing that&#8217;s important to understand is the size of the messages that didn&#8217;t require durability was less than 1MB, with most weighing in under 10KB. Also, since most of those messages were published, less state management was required around them, enabling us to further improve performance.</p>
<h3>Summary</h3>
<p>NServiceBus didn&#8217;t give us all that by itself. It was the result of skilled architects, developers, and operations staff working together for many iterations, deploying, monitoring, re-designing, etc. You need to understand your technology, your hardware, and your specific performance, availability, and fault-tolerance requirements if you want to get anywhere.</p>
<p>There&#8217;s no magic.</p>
<p>I didn&#8217;t see the number or kinds of servers involved in the Neuron case study so this wasn&#8217;t ever really a comparison. Nor or we talking about the same system here. </p>
<p>So, please, don&#8217;t base your decisions on arbitrary numbers. Spend some time setting up a scaled down version of your target architecture with all the relevant technologies and <em>measure</em>. Be aware that you want high performance end to end, not just of the messaging part. At times, it makes sense to actively throw away messages (of the non-durable, published kind) to help a server come online faster especially after a restart.</p>
<p>Thus ends the tale of another &#8220;benchmark&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/05/21/nservicebus-performance/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>7 Simple Questions for Service Selection</title>
		<link>http://www.udidahan.com/2008/05/16/7-simple-questions-for-service-selection/</link>
		<comments>http://www.udidahan.com/2008/05/16/7-simple-questions-for-service-selection/#comments</comments>
		<pubDate>Fri, 16 May 2008 22:21:09 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[Business Rules]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/05/16/7-simple-questions-for-service-selection/</guid>
		<description><![CDATA[&#8220;So, which services do I need?&#8221;
This innocuous question comes up a lot. Usually I get this question after a short problem domain description. One of these came up on the nServiceBus discussion groups. Ayende took it and ran with it turning it into a nice blog post, An exercise in designing SOA systems. I&#8217;ve been [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;So, which services do I need?&#8221;</p>
<p>This innocuous question comes up a lot. Usually I get this question after a short problem domain description. One of these came up on the nServiceBus discussion groups. Ayende took it and ran with it turning it into a nice blog post, <a href="http://ayende.com/Blog/archive/2008/04/08/An-exercise-in-designing-SOA-systems.aspx">An exercise in designing SOA systems</a>. I&#8217;ve been meaning to write something myself. Bill put up a response already in his <a href="http://bill-poole.blogspot.com/2008/05/service-granularity-example.html">Service Granularity Example</a>. So, I&#8217;m late to the party, again, but here we go.</p>
<p>It&#8217;s almost impossible to know, right away, which services are appropriate.</p>
<p>So, I&#8217;m going to focus more on the process of getting there, rather than describing the solution itself.</p>
<p>The domain deals with a placement agency placing physicians in positions at hospitals. <a href="http://udidahan.weblogs.us/wp-content/uploads/doctor.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 10px 10px; border-left: 0px; border-bottom: 0px" height="244" alt="doctor" src="http://udidahan.weblogs.us/wp-content/uploads/doctor-thumb.png" width="225" align="right" border="0"></a> </p>
<h3>1. So, what does it actually <em>do</em>?</h3>
<p>In Ayende&#8217;s post, he describes several services, but I&#8217;d rather look at them as use cases: registering an open position, registering a candidate, verifying their credentials, etc. It&#8217;s worth going through this <em>requirements</em> process. It doesn&#8217;t necessarily translate immediately to services, but there&#8217;s value in it.</p>
<h3>2. What does it do it <em>to</em>?</h3>
<p>We should also be looking at the data model, an entity relationship diagram (ERD) , where we see that we may have placed a certain physician at a number of positions. It&#8217;s also important for us to know about under which circumstances a physician finished their employment at a previous position before, say, trying to place them at a position in the same hospital or chain of hospitals. Don&#8217;t go thinking that this what the database schema will look like, it&#8217;s all about understanding connections between various bits of data.</p>
<h3>3. When does that happen?</h3>
<p>The next step is to map the uses cases above to the entities in the ERD, which entity is used in which use case. It&#8217;s also important to differentiate between entities (or even more importantly, specific fields of entities) that are used in a read-only fashion within a given use case. For instance, when registering a new position, we&#8217;ll want to check that against other open positions in the same hospital so we don&#8217;t end up registering the same position twice. Also, we might want to suggest verified physicians whose credentials match the position&#8217;s requirements. Data we wouldn&#8217;t be interested in might be which other physicians we placed at that hospital.</p>
<h3>4. What just happened?</h3>
<p>Another valuable perspective on the problem domain is the business process view &#8211; what are the interesting business events in the system and how they unfold over time. For instance, physician registered, position opened, physician&#8217;s credentials verified, and physician placed in position (or position filled by physician) are events that describe a different business perspective than use cases.<a href="http://udidahan.weblogs.us/wp-content/uploads/image20.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 0px 10px; border-left: 0px; border-bottom: 0px" height="241" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb17.png" width="244" align="right" border="0"></a></p>
<h3>5. How do I decide? </h3>
<p>Once we know what events there are, we can start looking at what kind of decisions we might want to make when those events occur and what data we&#8217;d need to make those decisions. These decisions may be as simple as updating a database or sending an email to a user. They also may include more advanced logic like when the profitability of an agreement with a specific hospital chain changes, prefer placing physicians in positions in that chain over others.</p>
<h3>6. How do I deal with all this information?</h3>
<p>After we have all of this information, we can start looking for cohesive bunching across all of these axes using these rules:</p>
<ul>
<li>Data that is modified by a use case gets published as an event.</li>
<li>Data that is required by a use case for read-only purposes, arrives as the result of subscribing to some event.</li>
</ul>
<p>Look for rules that differentiate behaviour based on the properties of data. Look for a correlation to some business concept. For instance, physicians probably won&#8217;t be changing their specialization, and open positions often deal with a certain specialization. Therefore, specific data instances tied to two different specializations can be said to be loosely coupled.</p>
<h3><strong>7. Which property slices across the domain?<a href="http://udidahan.weblogs.us/wp-content/uploads/image21.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 10px 10px; border-left: 0px; border-bottom: 0px" height="161" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb18.png" width="244" align="right" border="0"></a> </strong></h3>
<p>Even though the ERD may not have made it clear, and the use cases didn&#8217;t show any particular break-down, nor did the events call out this point, the key to finding the way a business domain decomposes into services lies in decoupling specific data instances.</p>
<p>Actually, at this point we can clump autonomous components (mere technical bits) that handle a single message, into more granular business components.</p>
<blockquote><p>If you think about it, it makes a lot of sense. The kind of credential checking you&#8217;d do for physicians specializing in brain surgery would likely be different than for general practitioners. The kind of information you&#8217;d store would, therefore, also be different.</p>
</blockquote>
<h3>But, which services do I need?</h3>
<p>Quite frankly, I don&#8217;t have enough information to know. </p>
<p>But if we had continued this conversation, going through issues like transactional consistency, availability requirements, and other non-functional issues we could have&nbsp; gotten there. </p>
<p>If there&#8217;s one thing that I hope you got out of this, it&#8217;s that the questions are what&#8217;s important. The iterative process of looking at the problem domain from various perspectives, incorporating the new-found knowledge, and asking more questions is what leads us to a solution. But we don&#8217;t stop there. We keep looking for characteristics which split services apart into business components, and for consistency requirements that brings autonomous components together into services.</p>
<p>It&#8217;s not easy, but by focusing on these simple questions, you can get to a coherent service oriented architecture.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/05/16/7-simple-questions-for-service-selection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Abbott &amp; Costello of SOA</title>
		<link>http://www.udidahan.com/2008/05/02/the-abbott-costello-of-soa/</link>
		<comments>http://www.udidahan.com/2008/05/02/the-abbott-costello-of-soa/#comments</comments>
		<pubDate>Fri, 02 May 2008 22:37:16 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[ESB]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/05/02/the-abbott-costello-of-soa/</guid>
		<description><![CDATA[My long-time readers will no doubt remember Bill, he who has sent me so many great questions around SOA and gotten me to put some of my best podcast episodes out. Well, Bill&#8217;s now got a blog and he&#8217;s putting up a lot of great information on SOA (and that&#8217;s saying quite a bit, I [...]]]></description>
			<content:encoded><![CDATA[<p>My long-time readers will no doubt remember Bill, he who has sent me so many great questions around SOA and gotten me to put some of my best <a href="http://udidahan.weblogs.us/ask-udi/">podcast</a> episodes out. Well, Bill&#8217;s now got a <a href="http://bill-poole.blogspot.com/">blog</a> and he&#8217;s putting up a lot of great information on SOA (and that&#8217;s saying quite a bit, I barely agree with myself when it comes to SOA). In his post on <a href="http://bill-poole.blogspot.com/2008/04/publish-subscribe-with-legacy.html">Publish-Subscribe with Legacy Applications</a> he discusses some ways to do the integration, but I want to talk here about WHO does the integration.</p>
<h3>What&#8217;s on first?<a href="http://udidahan.weblogs.us/wp-content/uploads/image19.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px; border-left: 0px; border-bottom: 0px" height="179" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb16.png" width="227" align="right" border="0"></a> </h3>
<p>Many times I see SOA projects integrate existing/legacy systems focusing only on getting those systems to talk to the ESB (bits flowing) using the right structures (canonical schema, oy). However, little attention is often given to where that integration code runs &#8211; in other words, which endpoint does the rest of the system talk to? Who&#8217;s in charge of the integration?</p>
<p>The answer is usually muddled &#8211; sometimes its the <a href="http://udidahan.weblogs.us/category/esb">ESB</a> itself (serving more as an EAI broker at that point), sometimes its some DLL that the calling service uses, but I VERY rarely hear anything about the actual process that&#8217;s hosting that code, the endpoint itself, or anything that will help us deal with Service-Level Agreements.</p>
<h3>No. What&#8217;s on second.</h3>
<p>If you can&#8217;t (or don&#8217;t want to) change the legacy application at all, I suggest setting up a new endpoint and an additional process which listens on that endpoint. That process is in charge of communicating with the legacy application and translating whatever is going on to the messaging semantics of the SOA environment. Not everything may be publish/subscribe &#8211; other systems may send command messages to the endpoint, resulting in API calls on the legacy application. </p>
<p>One of the things that the process can/should do, is to subscribe to events/messages from other services and feed the relevant information to the legacy application. At times this will be done on an as-needed basis from the legacy application&#8217;s perspective &#8211; it will call some API/web service that will need to communicate with the afore-mentioned process, and the process will return the data needed.</p>
<h3>How is playing a different game</h3>
<p>From the perspective of all the other services, the legacy application might as well not even be there &#8211; they communicate via the regular messaging semantics with everything.</p>
<p>What is important to understand is that developing that kind of process is not a trivial undertaking. In <a href="http://udidahan.weblogs.us/category/ddd">DDD</a> terms, it can be called an Anti-Corruption Layer, as it prevents the legacy from influencing the structure of any other service. This procedure is one of the ways one can go about slowly getting data and functionality off of mainframes and into more versionable and change-friendly (and cheaper) environments.</p>
<h3>I don&#8217;t give a darn!</h3>
<p><a href="http://www.baseball-almanac.com/humor4.shtml">Oh, that&#8217;s our esb</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/05/02/the-abbott-costello-of-soa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Cobol, Enterprise Processes, and SOA</title>
		<link>http://www.udidahan.com/2008/04/23/visual-cobol-enterprise-processes-and-soa/</link>
		<comments>http://www.udidahan.com/2008/04/23/visual-cobol-enterprise-processes-and-soa/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 15:15:08 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/04/23/visual-cobol-enterprise-processes-and-soa/</guid>
		<description><![CDATA[There&#8217;s a fairly intense discussion going on these days amongst the SOA illuminati. In the hopes that people will see me standing beside them and conclude that I too know something, I&#8217;ve decided to chip in.
Jim brought the concept of cohesion to the regular SOA discussions around loose coupling in his post Anemic Service Model, [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a fairly intense discussion going on these days amongst the SOA illuminati. In the hopes that people will see me standing beside them and conclude that I too know something, I&#8217;ve decided to chip in.</p>
<p>Jim brought the concept of cohesion to the regular SOA discussions around loose coupling in his post <a href="http://jim.webber.name/2008/04/19/30b4f0e9-f67a-4310-bf38-ca0a3423206e.aspx">Anemic Service Model</a>, which I think, all in all, is a very good idea.</p>
<h3>Naïve Service Composition</h3>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image15.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px; border-left: 0px; border-bottom: 0px" height="173" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb12.png" width="124" align="right" border="0"></a> Jim first calls out a common anti-pattern that seems to have become quite rampant &#8211; I&#8217;d call it <a href="http://jim.webber.name/?img=77cfd6f8-b2e0-4abe-bbbd-94c09036a5d4">naïve service composition</a> if only the things being composed could even be called services. And I think the tone being set is correct &#8211; a service needs to meet a stronger set of criteria than just being able to be composed. Multiple services sharing the same logical data store (in that the same actual rows/data elements are managed by multiple services) probably means there&#8217;s an encapsulation problem here. I agree with Jim sentiment here:</p>
<blockquote><p>&#8220;On the one hand we&#8217;re inclined, and indeed encouraged by the SOA brigade, to think of this architecture as a good fit for purpose because it is very loosely coupled. Since every component or service is decoupled from every other component or service it should be possible to arrange and re-arrange them in a Lego-style in a myriad of useful ways. Building out &#8220;business services&#8221; from some more fundamental set of services is how the books tell us to do it. In fact we could even do that quite easily with point-and-[click] BPM tools, ruling out such overheads as developers and change management along the way. Right?&#8221;</p>
</blockquote>
<h3>MVC? There are, like, 6 of them!<a href="http://udidahan.weblogs.us/wp-content/uploads/image16.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px; border-left: 0px; border-bottom: 0px" height="146" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb13.png" width="133" align="right" border="0"></a> </h3>
<p> However, I disagree with some of the conclusions that Jim draws from that point. Jim states &#8220;build your services to implement business processes&#8221;, and that services are &#8220;just an instance of MVC&#8221;. I&#8217;m going to leave alone the MVC statement since there are like 6 documented kinds of MVC not including the Front Controller stuff that the web guys are now calling MVC. I&#8217;m going to focus on the business process advice. JJ also <a href="http://www.ebpml.org/blog/75.htm">doesn&#8217;t seem to agree with this advice</a>. As Savas has already <a href="http://savas.parastatidis.name/2008/04/22/0a938298-7e90-42e5-9ab0-64e0fd7c7184.aspx">taken issue</a> with the tone of JJ&#8217;s response, I&#8217;ll keep my focus on the content.</p>
<h3>Visual Cobol</h3>
<p>First of all, in my previous conversations with Jim he had already denounced the procedural nature of composing higher-level business processes out of smaller services which implement small bits of common activities. Visual Cobol was how he described it. In JJ&#8217;s <a href="http://www.ebpml.org/blog/76.htm">follow-up post</a>, he called out the necessary aspect of autonomy that jives with Jim&#8217;s cohesion principle.</p>
<p>I&#8217;m a bit concerned about the way JJ tends to version what SOA means over time. It might make it impossible to have intelligent design discussions without tagging each sentence with &#8220;as SOA meant in 2006&#8243;. I acknowledge that the accepted meaning of SOA by various vendors has changed over the years. However, I&#8217;ve found that meanings rooted in decades of computer science tend to last and provide value that outlasts much of the industry-buzzword-bingo (SOA 2.0 anyone?).</p>
<h3>Cohesion, Business Domains, and Business Processes</h3>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image17.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px; border-left: 0px; border-bottom: 0px" height="204" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb14.png" width="204" align="right" border="0"></a> My view of the original cohesion principles Steve discusses in his 2005 article <a href="http://steve.vinoski.net/pdf/IEEE-Old_Measures_for_New_Services.pdf">Old Measures for New Services</a> takes a business spin to Functional Cohesion:</p>
<blockquote><p>A service should be responsible for one business domain.</p>
</blockquote>
<p>If we jump off from this point, we&#8217;ll see that certain business processes which occur entirely in one business domain are fully encapsulated, whereas those macro-processes which cross many domains (like Order to Cash) cross multiple services &#8211; they do not become a service since that would break the &#8220;one business domain&#8221; rule. Given that services are loosely coupled, avoiding temporal coupling leads to services raising events. Thus, macro-processes are really just a series of events of various services where each service does its own internal business processes.</p>
<h3>Enterprise Processes &gt;&gt; Business Processes</h3>
<p>I think that maybe some of the difficulty in discussing concrete SOA guidance has to do with granularity. I&#8217;ve started calling those macro-processes something different from business processes, and that may just bring me full circle to Jim&#8217;s guidance.</p>
<blockquote><p>An Enterprise Process is any process which involves multiple business domains.</p>
</blockquote>
<p>Under that definition, a service may be responsible for multiple business processes in the same business domain. But still, one business process is usually not a service by itself.</p>
<h3>Business Components &amp; Autonomous Components to the Rescue</h3>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image18.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 10px; border-left: 0px; border-bottom: 0px" height="242" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb15.png" width="183" align="right" border="0"></a> Finally, by introducing the additional levels of decomposition of business components and autonomous components I&#8217;ve found that we can focus the discourse on one concern at a time. My presentation on the topic can be found <a href="http://cid-c8ad44874742a74d.skydrive.live.com/self.aspx/Blog/Avoid_a_failed_SOA.ppsx">here</a>. The 30 second pitch is this:</p>
<blockquote><p>Business domains are inherently partitionable &#8211; data and rules. A business component represents one partition. An example of this is the domain of Sales being partitioned by strategic and non-strategic customers. Although the data structure might be similar or the same, the actual rows/data elements are not shared. Rules around discounts are different.</p>
<p>Within a business component, different activities should not interfere with each other. An autonomous component represents one activity. In our example, reporting on orders from strategic customers should not interfere with accepting their orders. As such, those activities should have different messages coming in on different endpoints. Each endpoint could have different characteristics, like durability. Losing a request for a report when a server restarts isn&#8217;t a big deal, however not a good idea for orders.</p>
</blockquote>
<p>For more information you could check out these episodes from my podcast:</p>
<blockquote><h4><b></b><a href="http://udidahan.weblogs.us/2006/08/28/podcast-business-and-autonomous-components-in-soa/">Business and Autonomous Components in SOA</a></h4>
<h4><a href="http://udidahan.weblogs.us/2007/06/02/podcast-using-autonomous-components-for-slas-in-soa/">Using Autonomous Components for SLAs in SOA</a></h4>
</blockquote>
<p>Questions and comments are always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/04/23/visual-cobol-enterprise-processes-and-soa/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Scalability Article up on InfoQ</title>
		<link>http://www.udidahan.com/2008/04/10/scalability-article-up-on-infoq/</link>
		<comments>http://www.udidahan.com/2008/04/10/scalability-article-up-on-infoq/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 05:59:38 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[Scalability]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/04/10/scalability-article-up-on-infoq/</guid>
		<description><![CDATA[I&#8217;ve published a new article on performance and scalability on InfoQ:
Spectacular Scalability with Smart Service Contracts

In this article, I attempt to debunk some of the myths around stateless-ness as the key to scalability.
Here&#8217;s how it starts:
It was a sunny day in June 2005 and our spirits were high as we watched the new ordering system [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve published a new article on performance and scalability on InfoQ:</p>
<blockquote><p><a href="http://www.infoq.com/articles/scale-with-service-contracts">Spectacular Scalability with Smart Service Contracts</a></p>
</blockquote>
<p>In this article, I attempt to debunk some of the myths around stateless-ness as the key to scalability.</p>
<p>Here&#8217;s how it starts:</p>
<blockquote><p>It was a sunny day in June 2005 and our spirits were high as we watched the new ordering system we&#8217;d worked on for the past 2 years go live in our production environment. Our partners began sending us orders and our monitoring system showed us that everything looked good. After an hour or so, our COO sent out an email to our strategic partners letting them know that they should send their orders to the new system. 5 minutes later, one server went down. A minute after that, 2 more went down. Partners started calling in. We knew that we wouldn&#8217;t be seeing any of that sun for a while.</p>
<p>The system that was supposed to increase the profitability of orders from strategic partners crumbled. The then seething COO emailed the strategic partners again, this time to ask them to return to the old system. The weird thing was that although we had servers to spare, just a few orders from a strategic customer could bring a server to its knees. The system could scale to large numbers of regular partners, but couldn&#8217;t handle even a few strategic partners.
<p>This is the story of what we did wrong, what we did to fix it, and how it all worked out.
<p><a href="http://www.infoq.com/articles/scale-with-service-contracts">Continue reading&#8230;</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/04/10/scalability-article-up-on-infoq/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I Hate WSDL</title>
		<link>http://www.udidahan.com/2008/03/28/i-hate-wsdl/</link>
		<comments>http://www.udidahan.com/2008/03/28/i-hate-wsdl/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 16:44:28 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/03/28/i-hate-wsdl/</guid>
		<description><![CDATA[Ted says it really well, and let me add a big +1.
Note to those who didn&#8217;t attend the session: you didn&#8217;t hear me say it, so I&#8217;ll repeat it: I hate WSDL almost as much as I hate Las Vegas. Ask me why sometime, or if I get enough of a critical mass of questions, [...]]]></description>
			<content:encoded><![CDATA[<p>Ted <a href="http://blogs.tedneward.com/2008/03/28/Hangin+In+Vegas.aspx">says it really well</a>, and let me add a big +1.</p>
<blockquote><p><em>Note to those who didn&#8217;t attend the session: you didn&#8217;t hear me say it, so I&#8217;ll repeat it: I hate WSDL almost as much as I hate Las Vegas. Ask me why sometime, or if I get enough of a critical mass of questions, I&#8217;ll blog it. If you&#8217;ve seen me do talks on Web Services, though, you&#8217;ve probably heard the rant: WSDL creates tightly-coupled endpoints precisely where loose coupling is necessary, WSDL encourages schema definitions that are inflexible and unevolvable, and WSDL intrinsically assumes a synchronous client-server invocation model that doesn&#8217;t really meet the scalability or feature needs of the modern enterprise. And that&#8217;s just for starters.</em>
<p><em>I hate WSDL.</em>
<p><em>I still hate Vegas more, though.</em></p>
</blockquote>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image11.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 0px 20px; border-left: 0px; border-bottom: 0px" height="156" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb8.png" width="152" align="right" border="0"></a> Web Services, and WSDL by connection have taken hold of the industry like cancer &#8211; inhibiting the minds of otherwise intelligent developers and architects. Whenever I get the &#8220;Web Services Question&#8221; (Does X support Web Services &#8211; where X is some design pattern, tool, and sometimes nServiceBus), I have to suppress an urge to groan &#8211; I&#8217;ve got the question <em>that</em> many times. The other day I was at a client and Sam, their head architect asked me that question. I gave my stock response:</p>
<blockquote><p>&#8220;When you say &#8216;Web Services&#8217;, are you referring to SOAP or WSDL, and is HTTP a necessary component too?&#8221;</p>
</blockquote>
<p>See how good I got at the suppressing thing?</p>
<p>Sam conceded that Web Services over TCP is OK too, so I pressed on with:</p>
<blockquote><p>&#8220;What about UDP? FTP? MSMQ? Is it still &#8216;Web Services&#8217; then? Is the rule then that &#8216;Web Services&#8217; == SOAP?&#8221;</p>
</blockquote>
<p>At that point, Sam was beginning to get a little flustered. </p>
<blockquote><p>&#8220;And what&#8217;s so great about SOAP? Is it the interoperability? Because that&#8217;s just because it&#8217;s based on XSD.&#8221;</p>
</blockquote>
<p>He didn&#8217;t know how to reply. Instead, he walked away from the whiteboard and sat down. I didn&#8217;t let up:</p>
<blockquote><p>&#8220;And what if we want to do something other than Request/Response? How about one request with many responses? How about many requests and one response? And why does this decision need to be rigid? Shouldn&#8217;t we just be able to decide programmatically how many responses we want to return? Wouldn&#8217;t that flexibility be better than creating huge response structures for web methods to return?&#8221;</p>
</blockquote>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image13.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="132" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb9.png" width="189" align="right" border="0"></a> Sam made his last stand:</p>
<blockquote><p>&#8220;Look, we can&#8217;t go and do something different from the rest of the industry. Everybody else is doing Web Services. It&#8217;s not like the technology doesn&#8217;t work.&#8221;</p>
</blockquote>
<p>I gave way, a little:</p>
<blockquote><p>&#8220;If you want, we can offer two interfaces. One, the flexible, robust, scalable XSD over messaging based solution. The second, an icky, synchronous Web Services facade which calls into our first interface. </p>
<p>I&#8217;m not saying that the technology doesn&#8217;t work &#8211; but both of us know that every problem has multiple solutions, some are fragile and error prone like WS, others are more elegant and have decades of knowledge behind them like messaging.</p>
<p>But we can do both if you like. How&#8217;s that?&#8221;</p>
</blockquote>
<p><a href="http://udidahan.weblogs.us/wp-content/uploads/image14.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="166" alt="image" src="http://udidahan.weblogs.us/wp-content/uploads/image-thumb11.png" width="244" align="right" border="0"></a> And it was agreed. The entire system would be built on one-way messaging patterns using XSD in cases where interoperability was required. And WS would be layered on, like a tiny little pig on top of a gigantic lipstick &#8230; thing &#8211; hmm, that metaphor isn&#8217;t really working &#8211; well, you get the idea.</p>
<p>I hate WSDL. Never been to Vegas, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/03/28/i-hate-wsdl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

