<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Udi Dahan - The Software Simplist</title>
	
	<link>http://www.udidahan.com</link>
	<description>Enterprise Development Expert &amp; SOA Specialist</description>
	<lastBuildDate>Fri, 03 May 2013 19:27:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist" /><feedburner:info uri="udidahan-thesoftwaresimplist" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://udidahan.weblogs.us</link><url>http://udidahan.weblogs.us/wp-content/uploads/2007/04/udi_on_white_left.JPG</url><title>Udi Dahan</title></image><feedburner:emailServiceId>UdiDahan-TheSoftwareSimplist</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
		<title>Queries, Patterns, and Search – food for thought</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/Sd_udILOF9Y/</link>
		<comments>http://www.udidahan.com/2013/04/28/queries-patterns-and-search-food-for-thought/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 10:44:56 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Data Access]]></category>
		<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1950</guid>
		<description><![CDATA[With all the talk of CQRS, the area that doesn&#8217;t get enough treatment (in my opinion) is that of queries. Many are already beginning to understand the importance of task-based UIs and how that aligns to the underlying commands being sent, validated, and processed in the system as well as the benefits of messaging-centric infrastructure [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/fish.png" alt="fish" title="fish" width="250" height="250" style="float:right; margin-left:10px; margin-bottom:10px;" />With all the talk of CQRS, the area that doesn&#8217;t get enough treatment (in my opinion) is that of queries. Many are already beginning to understand the importance of task-based UIs and how that aligns to the underlying commands being sent, validated, and processed in the system as well as the benefits of messaging-centric infrastructure (like <a href="http://www.NServiceBus.com">NServiceBus</a>) for handling those commands reliably. When it comes to queries, though, it isn&#8217;t nearly as well understood what it means for a query to be &#8220;task based&#8221;.</p>
<h3>Starting with CRUD</h3>
<p>Let&#8217;s start with a traditional CRUD application and work our way out from there.</p>
<p>In these environments, we often see users asking us to build &#8220;excel-like&#8221; screens that allow them to view a set of data as well as sort, filter, and group that data along various axes. While we might not get this requirement right away, after some time users begin to ask us to allow them to &#8220;save&#8221; a certain &#8220;query&#8221; that they have set up, providing it some kind of name.</p>
<p>That, right there, is a task-based query and it is the beginning of deeper domain insight.</p>
<h3>Pattern matching</h3>
<p>Any time a user is repeatedly running the same query (this can be once a day or some other unit of time) there is some scenario that the business is trying to identify and is using that user as a pattern-matching engine to see if the data indicates that that scenario has occurred.</p>
<p>It&#8217;s quite common for us to get a requirement to add some field (often a boolean or enum) to an entity which defaults to some value and then see that same field used in filtering other queries. These measures are sometimes instituted as a temporary stop-gap while a larger feature is being implemented, though (as the saying goes) there is nothing more permanent than a temporary solution.</p>
<h3>Where we developers go wrong</h3>
<p>The thing is, many developers don&#8217;t notice these sorts of things happening because we don&#8217;t actually look at the kinds of queries users are running.</p>
<p>One excellent technique to better understand a domain is to sit down with your users while they&#8217;re working and ask them, &#8220;what made you run that query just now?&#8221;, &#8220;why that specific set of filters?&#8221;. </p>
<p>What I&#8217;ve noticed over the years is that our users find very creative ways to achieve their business objectives <b><i>despite</i></b> the limitations of the system that they&#8217;re working with. We developers ultimately see these as requirements, but they are better interpreted as <b>workarounds</b>.</p>
<p>I&#8217;ll talk some more about how a software development organization should deal with these workarounds in a future post, but I want to focus back in on the queries for now.</p>
<p>Oh, and don&#8217;t get me started on caching or NoSQL, not that I think that those tools don&#8217;t provide value &#8211; they do, but they&#8217;re only relevant once you know which business problem you&#8217;re solving and why.</p>
<h3>Not all queries are created equal</h3>
<p>Even before bringing up the questions I described in the previous section, any time you get query-centric requirements the first question to ask is &#8220;how often will the user be running this specific query?&#8221;.</p>
<p>If the answer is that the <b>specific</b> query will be run periodically (every day, week, etc), then drill deeper to see what pattern the user will be looking for in the data. If the person you&#8217;re talking to doesn&#8217;t know to answer that question, then go find someone who does. Every periodic query I&#8217;ve seen has some pattern behind it &#8211; and in my conversations with thousands of other developers over the years, I&#8217;ve seen that this is not just my personal experience.</p>
<p>But there is a case where a query does get run repeatedly without there being a pattern behind it.</p>
<p>I know this sounds like I&#8217;m contradicting myself, but the distinction is the word &#8220;specific&#8221; that I emphasized above.</p>
<p>There are certain users who behave very differently from other users &#8211; these users are often doing what I call <b>research</b>, i.e. the &#8220;I don&#8217;t know what I&#8217;m looking for but I&#8217;ll know it when I see it&#8221; people.</p>
<p>These researchers tend to repeatedly query the data in the system however they tend to run different queries all the time. This is the reason why traditional data warehouse type solutions don&#8217;t tend to work well for them. Data warehouses are optimized for running specific queries repeatedly.</p>
<p>Keeping the Single-Responsibility Principle in mind &#8211; we should not try to create a single query mechanism that will address these two very different and independently evolving needs.</p>
<h3>And now on to Search</h3>
<p>Search is a feature that is needed in many systems and whose complexity is greatly underestimated.</p>
<p>While the developer community has taken some decent strides in understanding that search needs to be treated differently from other queries, the common Lucene/Solr solutions that are applied are often overwhelmed by the size of the data set on which the business operates.</p>
<p>The problem is compounded by our user population being spoiled by Google &#8211; that simple little text box and voila, exactly what you&#8217;re looking for magically appears instantaneously. They don&#8217;t understand (or care) how much engineering effort went into making that &#8220;just work&#8221;.</p>
<p>Lucene and Solr work well when your data set isn&#8217;t too large, and then they become pretty useless as the quality of their results degrades. The thing is that many of us in IT tend to work on projects where we have an unrealistically small data set that we use to test the system and, at these volumes, it looks like our solutions work great. But if you have 20 million customers, do you think a full text search on &#8220;Smith&#8221; is going to find just the right one?</p>
<p>Larger data sets require a <b>relevance engine</b> &#8211; something that feeds off of what users do <b>AFTER</b> the query to influence the results of future queries. Did the user page to the next screen? That needs to be fed back in. Did they click on one of the results? That needs to be fed back in too. Did they go back to the search and do another similar search right after looking at a result &#8211; that should possibly undo the previous feedback.</p>
<p>And that&#8217;s just relevance for beginners.</p>
<p>You know what makes Google, you know, Google? It&#8217;s that they have this absolutely massive data set of what users do after the query that informs which results they return when. You probably don&#8217;t have that. That and search is/was their main business for many years &#8211; I&#8217;m betting that it&#8217;s not your main business.</p>
<p>You should discuss this with your stakeholders the next time they ask for search functionality in your system.</p>
<h3>In closing</h3>
<p>I know that the common CQRS talking points tell you to keep your queries simple, but that doesn&#8217;t mean that simple is easy.</p>
<p>It takes a fair bit of domain understanding to figure out what the queries in the system are supposed to be &#8211; what tasks users are trying to achieve through these queries. And even when you do reach this understanding, convincing various business stakeholders to change the design of the UI to reflect these insights is far from easy.</p>
<p>It often seems like the reasonable solution to give our users everything, to not limit them in any way, and then they&#8217;ll be able to do anything. What ends up happening is that our users end up drowning in a sea of data, unable to see the forest for the trees, ultimately resulting in the company not noticing important trends quickly enough (or at all) and therefore making poor business decisions.</p>
<p>Even if your company doesn&#8217;t believe itself to be in &#8220;Big Data&#8221; territory, I&#8217;d suggest talking with the people on the &#8220;front lines&#8221; just in case. Many of them will report feeling overwhelmed by the quantity of stuff (to use the correct scientific term) they need to deal with.</p>
<p>It&#8217;s not about Lucene, Solr, OData, SSRS, or any other technology.</p>
<p>It&#8217;s on you. Go get &#8216;em.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Sd_udILOF9Y:-POQArstVLM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Sd_udILOF9Y:-POQArstVLM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=Sd_udILOF9Y:-POQArstVLM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Sd_udILOF9Y:-POQArstVLM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=Sd_udILOF9Y:-POQArstVLM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/Sd_udILOF9Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2013/04/28/queries-patterns-and-search-food-for-thought/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2013/04/28/queries-patterns-and-search-food-for-thought/</feedburner:origLink></item>
		<item>
		<title>SOA Course in NYC almost full</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/TjRCl5ipN6M/</link>
		<comments>http://www.udidahan.com/2013/03/28/soa-course-in-nyc-almost-full/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 16:56:27 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1947</guid>
		<description><![CDATA[So, there are just a few spots left for my course in New York on April 8.
If you want to come please don&#8217;t wait to register.
We&#8217;re also going to be re-recording the course as the recording from Denver turned out pretty bad, only this time with a much more professional crew. This means that attendees [...]]]></description>
			<content:encoded><![CDATA[<p>So, there are just a few spots left for my course in New York on April 8.</p>
<p>If you want to come please don&#8217;t wait to register.</p>
<p>We&#8217;re also going to be re-recording the course as the recording from Denver turned out pretty bad, only this time with a much more professional crew. This means that attendees will be getting the recording of the course which they themselves attended instead of that of a previous group &#8211; an added bonus.</p>
<p>Just as a reminder &#8211; if your company won&#8217;t pay for the course and you still want to come, there are significant discounts available. Just send me an email to training@udidahan.com.</p>
<p>Hope to see you there.</p>
<p><a href="http://www.eventbee.com/v/nservicebus/event?eid=900376302">Register here</a></p>
<p>* PS &#8211; After this will be <a href="http://www.cornerstone.se/Web/Templates/CoursePage.aspx?id=2513&#038;course=COUR2011030713242304266086&#038;epslanguage=SV">Stockholm</a> and then <a href="https://skillsmatter.com/register-online/course/2595">London</a> and that&#8217;ll be all folks!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=TjRCl5ipN6M:IpFO1PyNAUo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=TjRCl5ipN6M:IpFO1PyNAUo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=TjRCl5ipN6M:IpFO1PyNAUo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=TjRCl5ipN6M:IpFO1PyNAUo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=TjRCl5ipN6M:IpFO1PyNAUo:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/TjRCl5ipN6M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2013/03/28/soa-course-in-nyc-almost-full/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2013/03/28/soa-course-in-nyc-almost-full/</feedburner:origLink></item>
		<item>
		<title>Uploaded some old “Ask Udi” podcasts</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/9ufTUIIsbHk/</link>
		<comments>http://www.udidahan.com/2013/03/09/uploaded-some-old-ask-udi-podcasts/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 17:50:43 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Ask Udi Podcast]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1945</guid>
		<description><![CDATA[I&#8217;ve been able to track down the files for some of my old &#8220;Ask Udi&#8221; podcasts. I haven&#8217;t listened through them again, so it could be that some of the stuff in there is someone dated, and/or that my perspectives have changed, but there is probably some good stuff in there regardless.
Enjoy:
060518ud01.mp3
060808ud01.mp3
060831ud01.mp3
061017ud01.mp3
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been able to track down the files for some of my old &#8220;Ask Udi&#8221; podcasts. I haven&#8217;t listened through them again, so it could be that some of the stuff in there is someone dated, and/or that my perspectives have changed, but there is probably some good stuff in there regardless.</p>
<p>Enjoy:</p>
<p><a href="http://www.udidahan.com/wp-content/uploads/060518ud01.mp3">060518ud01.mp3</a><br/><br />
<a href="http://www.udidahan.com/wp-content/uploads/060808ud01.mp3">060808ud01.mp3</a><br/><br />
<a href="http://www.udidahan.com/wp-content/uploads/060831ud01.mp3">060831ud01.mp3</a><br/><br />
<a href="http://www.udidahan.com/wp-content/uploads/061017ud01.mp3">061017ud01.mp3</a><br/></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=9ufTUIIsbHk:dRfFvX8XlX4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=9ufTUIIsbHk:dRfFvX8XlX4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=9ufTUIIsbHk:dRfFvX8XlX4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=9ufTUIIsbHk:dRfFvX8XlX4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=9ufTUIIsbHk:dRfFvX8XlX4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/9ufTUIIsbHk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2013/03/09/uploaded-some-old-ask-udi-podcasts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>

<enclosure url="http://www.udidahan.com/wp-content/uploads/060808ud01.mp3" length="3104278" type="audio/mpeg" />
<enclosure url="http://www.udidahan.com/wp-content/uploads/060831ud01.mp3" length="3655148" type="audio/mpeg" />
<enclosure url="http://www.udidahan.com/wp-content/uploads/061017ud01.mp3" length="7403621" type="audio/mpeg" />
		<feedburner:origLink>http://www.udidahan.com/2013/03/09/uploaded-some-old-ask-udi-podcasts/</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~5/ICU5-gs1peA/060518ud01.mp3" length="2395210" type="audio/mpeg" /><feedburner:origEnclosureLink>http://www.udidahan.com/wp-content/uploads/060518ud01.mp3</feedburner:origEnclosureLink></item>
		<item>
		<title>Last round of training</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/ceGm62cxjmA/</link>
		<comments>http://www.udidahan.com/2013/02/23/last-round-of-training/#comments</comments>
		<pubDate>Sat, 23 Feb 2013 11:00:18 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Courses]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1929</guid>
		<description><![CDATA[If you&#8217;d asked me last year how long I saw myself jetting around the world giving my SOA course, I probably would have said that I could see myself doing this well into &#8220;retirement&#8221;. But things change &#8211; usually when you least expect it.
In any case, I&#8217;ll be giving the course 4 more times, and [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;d asked me last year how long I saw myself jetting around the world giving my SOA course, I probably would have said that I could see myself doing this well into &#8220;retirement&#8221;. But things change &#8211; usually when you least expect it.</p>
<p>In any case, I&#8217;ll be giving the course 4 more times, and that&#8217;ll be it.</p>
<table cellpadding="0" cellspacing="0" border="1" width="100%">
<tr style="font-weight:bold; text-align:center; ">
<td>Date</td>
<td>City</td>
<td>Address</td>
<td>Register</td>
</tr>
<tr style="text-align:center;">
<td>Mar 18</td>
<td>Oslo, NO</td>
<td><a style="font-weight: normal;" href="https://maps.google.com/maps?q=Martin+Lingesvei+17+%E2%80%93+25+oslo+norway&#038;hl=en&#038;ie=UTF8&#038;sll=38.997934,-105.550567&#038;sspn=6.10311,10.953369&#038;t=h&#038;hnear=Martin+Linges+Vei+17,+%C3%98stensj%C3%B8,+0692+Oslo,+Norway&#038;z=16&#038;iwloc=A">Program Utvikling</a><br/>Martin Lingesvei 17 – 25</td>
<td><a style="font-weight:normal;" href="http://www.programutvikling.no/kurskalenderoversikt.aspx?id=1042071">Register</a></td>
</tr>
<tr style="text-align:center;">
<td>Apr 8</td>
<td>New York, US</td>
<td><a style="font-weight: normal;" href="http://maps.google.com/maps?q=290+Madison+Ave%2BNew+York%2B%2BUSA">New Horizons</a><br/>290 Madison Ave</td>
<td><a style="font-weight:normal;" href="http://nservicebus.eventbee.com/event?eid=900376302">Register</a></td>
</tr>
<tr style="text-align:center;">
<td>May 13</td>
<td>Stockholm, Sweden</td>
<td><a style="font-weight: normal;" href=https://maps.google.com/maps?q=Sv%C3%A4rdv%C3%A4gen+3A,+182+11+Danderyd+sweden&#038;hl=en&#038;ie=UTF8&#038;sll=37.0625,-95.677068&#038;sspn=60.806372,108.720703&#038;t=h&#038;hnear=Sv%C3%A4rdv%C3%A4gen+3A,+182+33+Danderyd,+Sweden&#038;z=16">Cornerstone</a><br/>Svärdvägen 3A, 182 11 Danderyd </td>
<td><a style="font-weight:normal;" href="http://www.cornerstone.se/Web/Templates/CoursePage.aspx?id=2513&#038;course=COUR2011030713242304266086&#038;epslanguage=SV">Register</a></td>
</tr>
<tr style="text-align:center;">
<td>June 3</td>
<td>London UK</td>
<td><a style="font-weight: normal;" href="http://skillsmatter.com/location-details/open-source-dot-net/2595/196">Skills Matter</a><br/>107-111 Fleet Street</td>
<td><a style="font-weight:normal;" href="https://skillsmatter.com/register-online/course/2595">Register</a></td>
</tr>
</table>
<p>When I was in Denver last month, I had the SOA course professionally recorded so if you can&#8217;t make any of these dates, you&#8217;ll still be able to get the videos. If you bought the videos in the past, don&#8217;t worry, I&#8217;ll be getting you the new videos as soon as they&#8217;re available. The NServiceBus courses delivered by other trainers will continue to run the same as before.</p>
<p>This change is part of a larger change in priorities for me. There are some big things coming that I&#8217;m very excited about that require quite a bit more of my attention.</p>
<p>Anyway, hope to see you either in Oslo, New York, Stockholm, or London.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ceGm62cxjmA:QZg3Ewnx_mI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ceGm62cxjmA:QZg3Ewnx_mI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=ceGm62cxjmA:QZg3Ewnx_mI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ceGm62cxjmA:QZg3Ewnx_mI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=ceGm62cxjmA:QZg3Ewnx_mI:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/ceGm62cxjmA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2013/02/23/last-round-of-training/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2013/02/23/last-round-of-training/</feedburner:origLink></item>
		<item>
		<title>Life without distributed transactions</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/GYMvtVWO3ts/</link>
		<comments>http://www.udidahan.com/2012/12/31/life-without-distributed-transactions/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 10:34:44 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Consistency]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Databases]]></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>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1913</guid>
		<description><![CDATA[Occasionally I get questions about the issue of transactional messaging &#8211; why is it so important, why does NServiceBus default to this behavior, and if we didn&#8217;t use it, what bad things could happen. I&#8217;m talking specifically about the ability to enlist a queue in a distributed transaction here.
I think the reason for this interest [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/article-new_ehow_images_a06_co_v2_preferred-transaction-bankruptcy_-800x800.jpg" alt="transactions" title="transactions" width="250" height="167" style="float:right; margin-left:10px; margin-bottom:10px; " />Occasionally I get questions about the issue of transactional messaging &#8211; why is it so important, why does NServiceBus default to this behavior, and if we didn&#8217;t use it, what bad things could happen. I&#8217;m talking specifically about the ability to enlist a queue in a distributed transaction here.</p>
<p>I think the reason for this interest is the rise in popularity of cloud platforms and queuing systems like RabbitMQ (which don&#8217;t support distributed transactions) and the difficulty of setting up distributed transactions even in on-premise.</p>
<p>Of course, there&#8217;s also the regular scalability hand-wringing going on even though most people wouldn&#8217;t bump up against those limits anyway.</p>
<p>In this post, I&#8217;ll talk about the nature of the problem, explain the pitfalls in some of the common solutions, but I&#8217;ll put off the description of how to provide consistency without distributed transactions to a future post as this one is already going to be quite long.</p>
<p>I&#8217;ll start with the basic fault-tolerance issues and then explain how things spiral out from there.</p>
<h3>Starting with the basics</h3>
<p>OK, so we have a queuing system in place that dispatches messages to our business logic which does some transactional work against a database.</p>
<p>Let&#8217;s say that we completed the transaction against our database but before we could acknowledge to the queue that the message was processed successfully, our machine crashed. What our machine comes up again, the queue will once again dispatch us the same message. Unless we have some logic to detect that we&#8217;ve already processed it (called &#8220;idempotence&#8221; in the REST community), we will end up processing it again.</p>
<p>In short, the problem is duplicates.</p>
<h3>Attempted solutions to the duplicate problem</h3>
<p>Most queuing systems don&#8217;t do anything about duplicates, actually giving it a proper architectural name: At-least-once message delivery, as opposed to the Once-and-only-once model that a queue that supports distributed transaction provides.</p>
<p>The solution often suggested is to have your logic check to see if it has already processed a message with that ID before &#8211; in essence storing the ID of each message processed for some period of time. Of course, there is some performance overhead with that, but it might be a small price to pay compared to dealing with it in the logic of every use case.</p>
<p>On the other hand, you&#8217;ll often have some messages (like Update commands) for which it looks like you can safely process them multiple times, in which case you might want not to pay the performance overhead there. The thing is, if your logic publishes an event in addition to the regular database work (something that is quite common) and you process the same message twice, you will probably end up publishing the event twice as well. </p>
<p>These duplicates are different in that here we have two distinct messages with different IDs that contain the same business data. This means that recipients of these messages will not be able to filter them out at an infrastructure level anymore.</p>
<h3>NOTE: Deduplication abilities in queues</h3>
<p>Although the Azure Service Bus doesn&#8217;t support distributed transactions meaning you still have the issue mentioned above, Microsoft added the ability to detect and filter out duplicates based on message contents rather than just the ID. This helps quite a bit but it&#8217;s important to understand that that doesn&#8217;t cover everything for you. Let me explain:</p>
<h3>More complex logic</h3>
<p>In some of your most important use cases, you may have both entity updates as well as entity creation happening together in your domain model. You might be using some kind of event model (like I wrote about <a href="http://www.udidahan.com/2009/06/14/domain-events-salvation/">here</a>) to percolate out the information that an entity was created in order to keep your service layer decoupled from the internals of the domain model.</p>
<p>In the callback code from these domain events, you will likely publish out an event on the queuing system containing information like the ID of the entities created as well as other business data. And there&#8217;s the rub.</p>
<p>You see, without distributed transactions, you can run into some problematic scenarios:</p>
<p>For example, if you don&#8217;t make sure that your event publishing calls to the queuing system include the same transaction object as the one you used when retrieving the original message from the queue, then those calls could &#8220;escape&#8221; before you know if the database transaction is going to succeed. Deadlocks always happen at the lousiest times. Anyway, if you&#8217;re using database generated IDs for your entities, then those IDs will get published out in events despite the database rolling back and your subscribers will now be making decisions on <b><i>wrong</i></b> data &#8211; not just eventually consistent data.</p>
<p>In this case, processing the message again doesn&#8217;t really solve the problem &#8211; it just means that you&#8217;ll be publishing events with different IDs, so an infrastructure like Azure Service Bus couldn&#8217;t really de-duplicate them.</p>
<p>On the other hand, if you do use the same transaction and combine in the infrastructural message ID based de-duplication described above (as identifying duplicate calls for complex business logic is damn hard), you&#8217;ll run into another problem. </p>
<p>Consider what would happen if your server crashes right after finishing its database work but before it completes the transaction against the queuing system. When going to retry the message, the infrastructure filtering thing would know not to call your business logic again and that message would be quietly swallowed. Unfortunately, the event publishing calls to the queuing system from the first time the message was processed were rolled back and since your business logic isn&#8217;t called again, the event publishing won&#8217;t happen again.</p>
<p>Oops.</p>
<h3>In closing</h3>
<p>I hope I&#8217;ve been able to clarify what kind of scenarios distributed transactions solve for you and some of the difficulties in solving them yourself.</p>
<p>Now, to be clear, you could solve these problems by going in-depth on each of your use cases, analyzing the consistency needs and structuring the code differently to address those needs. But give this another thought, if our consistency is dependent on calling otherwise independent APIs in exactly the right order, and that a change in this order would not cause any visible functional effects, what would happen when developers with less expertise maintain this code?</p>
<p>The folks in the event sourcing community have their solution to this which is based on writing their business logic differently. As the adoption of this pattern is still pretty limited (probably still in the Innovator section of the Technology Adoption Curve), it&#8217;ll be interesting to see how it holds up with larger teams in the mainstream.</p>
<p>Oh, and in case it wasn&#8217;t clear from before, the guys in the REST community haven&#8217;t even begun addressing this problem when it comes to server-to-server integration.</p>
<p>We&#8217;re working on a solution for this with NServiceBus that won&#8217;t require you to change how you write business logic. We&#8217;ve got one big release to do before we can roll this in, and that&#8217;s coming soon (with all sorts of cool things like support for ActiveMQ and queues in the database). The solution we&#8217;ve found is architecturally sound but you&#8217;ll have to wait for my next post to hear about it.</p>
<p>Stay tuned.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=GYMvtVWO3ts:YdNfS8nWsBk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=GYMvtVWO3ts:YdNfS8nWsBk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=GYMvtVWO3ts:YdNfS8nWsBk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=GYMvtVWO3ts:YdNfS8nWsBk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=GYMvtVWO3ts:YdNfS8nWsBk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/GYMvtVWO3ts" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/12/31/life-without-distributed-transactions/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/12/31/life-without-distributed-transactions/</feedburner:origLink></item>
		<item>
		<title>Service-Oriented API implementations</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/k4km4rSjZH4/</link>
		<comments>http://www.udidahan.com/2012/12/10/service-oriented-api-implementations/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 15:29:27 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1896</guid>
		<description><![CDATA[It&#8217;s quite common for our systems to need to expose an API for external parties to call that isn&#8217;t exactly aligned with our service boundaries &#8211; at least, when you follow the &#8220;vertical services&#8221; model rather than the &#8220;layered services&#8221; approach. I&#8217;ve blogged many times about the problems with layering, so I won&#8217;t go into [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/gears.jpg" alt="gears" title="gears" width="250" height="167" style="float:right; margin-left:10px; margin-bottom:10px;"/>It&#8217;s quite common for our systems to need to expose an API for external parties to call that isn&#8217;t exactly aligned with our service boundaries &#8211; at least, when you follow the &#8220;vertical services&#8221; model rather than the &#8220;layered services&#8221; approach. I&#8217;ve blogged many times about the problems with layering, so I won&#8217;t go into that now beyond to say that you really, REALLY, should avoid it.</p>
<h3>A short intro to SOA, done right</h3>
<p>In the &#8220;vertical services&#8221; approach I espouse, you often see components from multiple services deployed to any given endpoint. While these services usually don&#8217;t need to communicate with each other at all, occasionally you&#8217;ll see them leaving &#8220;breadcrumbs&#8221; behind for each other &#8211; things like UserId or OrderId in the session. What&#8217;s especially important is that these IDs are accessible even before the entity is finalized &#8211; this enables each service to collect its own data without needing any other service to know about that data.</p>
<p>In an ecommerce environment, we would see one service owning money, another the product catalog (excluding prices, those would be owned by the previous service), another service owning the customers&#8217; payment info (credit cards, etc), and yet another owning shipping addresses &#8211; all of these separate from the one that owns the shopping cart. Let&#8217;s call these Finance, Catalog, Payment, Shipping, and finally Shopping &#8211; just so that we have something to reference later.</p>
<h3>The API</h3>
<p>While we can do all sorts of cool browser composition with the UI in our own system, enabling each service to collect and display its own information, if we want to expose an API for clients to call, we wouldn&#8217;t want to force those clients to have to make a separate call to each service in order to make a purchase. Instead, we&#8217;d want something that looks like:</p>
<p>MakePurchase(Guid orderId, Dictionary<Guid, int> cart, CreditCardInfo cc, Address shippingAddress)</p>
<p>In case you were wondering, the service which owns the definition of this API is different from all of the above services &#8211; it is a service that is primarily technical in nature and is responsible for things like integration and data transformations. I call this service IT/Ops.</p>
<h3>Getting the data from the API to the services</h3>
<p>So, we don&#8217;t want any of our business-centric services to know about anybody else&#8217;s data structures, so that leaves it to IT/Ops to pass the data to them. The thing is that we still want to do that in the most loosely-coupled way possible &#8211; with messaging being a good candidate for that.</p>
<p>So, what we&#8217;ll do is have IT/Ops send a message containing the data to the other services, but with a slight twist.</p>
<p>Here&#8217;s what the code would look like with <a href="http://www.nservicebus.com">NServiceBus</a>:<br/><br/></p>
<pre class="csharpcode">
Bus.SendLocal(<span class="kwrd">new</span> Order { Id = orderId, Cart = cart,
                          CreditCard = cc, ShippingAddress = shippingAddress });</pre>
<p><br/><br />
Why the SendLocal?</p>
<p>So that the components from the other services can all run together with IT/Ops in the same process giving a nice tight deployment model.</p>
<p>Before we get to the services, let me show you the Order class &#8211; specifically, the interfaces it implements:<br/><br/></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">class</span> Order : ShoppingOrder, PaymentsOrder, ShippingOrder
{
    <span class="kwrd">public</span> Guid OrderId { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    <span class="kwrd">public</span> Dictionary&lt;Guid, <span class="kwrd">int</span>&gt; Cart { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    <span class="kwrd">public</span> CreditCardInfo CreditCard { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    <span class="kwrd">public</span> Address ShippingAddress { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
}

<span class="kwrd">public</span> <span class="kwrd">interface</span> ShoppingOrder
{
    Guid OrderId { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    Dictionary&lt;Guid, <span class="kwrd">int</span>&gt; Cart { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
}

<span class="kwrd">public</span> <span class="kwrd">interface</span> PaymentsOrder
{
    Guid OrderId { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    CreditCardInfo CreditCard { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
}

<span class="kwrd">public</span> <span class="kwrd">interface</span> ShippingOrder
{
    Guid OrderId { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
    Address ShippingAddress { <span class="kwrd">get</span>; <span class="kwrd">set</span>; }
}</pre>
<p><br/><br/><br />
Each of the above interfaces represents the data that each service cares about. Therefore, each service will provide an assembly that handles that message/data and persists it to its database, like this:<br/><br/></p>
<pre class="csharpcode">

<span class="kwrd">public</span> <span class="kwrd">class</span> ShoppingAPIHandler : IHandleMessages&lt;ShoppingOrder&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(ShoppingOrder message)
    {
        <span class="rem">//persist to shopping service db</span>
    }
}

<span class="kwrd">public</span> <span class="kwrd">class</span> PaymentsAPIHandler : IHandleMessages&lt;PaymentsOrder&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(PaymentsOrder message)
    {
        <span class="rem">//persist to payment service db</span>
    }
}

<span class="kwrd">public</span> <span class="kwrd">class</span> ShippingAPIHandler : IHandleMessages&lt;ShippingOrder&gt;
{
    <span class="kwrd">public</span> <span class="kwrd">void</span> Handle(ShippingOrder message)
    {
        <span class="rem">//persist to shipping service db</span>
    }
}</pre>
<p><br/><br/></p>
<p>Since the Order object being sent is a polymorphic match for all of these interfaces, NServiceBus knows to invoke all of these handlers. By the way, if you care about the order of invocation, then you can control that as well (but I won&#8217;t get into that here).</p>
<p>Also, since all of these handler assemblies are deployed to the same endpoint, and the Order object is sent just once, this means that all the handlers will be invoked in a single transaction on a single thread &#8211; either all of them succeeding, or all failing. Since they&#8217;re all connected on the same Order Id, referential integrity can be preserved as well.</p>
<h3>Wrapping up</h3>
<p>When you are building a system on SOA principles, you&#8217;ll often find that you need a service like IT/Ops to handle data transformation and other broker-centric tasks. While much of SOA is based on the Bus Architectural Style &#8211; meaning primarily publish/subscribe interaction between services &#8211; that doesn&#8217;t mean that your business-centric services cannot have their components deployed in the same process.</p>
<p>I&#8217;d go so far as to say that if you aren&#8217;t deploying components from multiple services in process with each other at least some of the time then it&#8217;s quite likely that your service boundaries are probably incorrect.</p>
<p>Anyway, I hope you found this post interesting. Shout out to Slawek who gave me the idea for this post.</p>
<p>By the way, if you&#8217;d like to learn more about these kinds of patterns, the next batch of courses is open for registration &#8211; but the early bird prices are almost over, so you&#8217;d better hurry. </p>
<p>Register for &nbsp;&nbsp;<a href="http://www.eventbee.com/v/nservicebus/event?eid=918444435">Denver CO, USA</a>, &nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.professional-developer-training.net/items.aspx?catId=c45">Bad Ems, Germany</a>, &nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.eventbee.com/v/nservicebus/event?eid=948045332">Perth, Australia</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=k4km4rSjZH4:9wdkyTVrbVs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=k4km4rSjZH4:9wdkyTVrbVs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=k4km4rSjZH4:9wdkyTVrbVs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=k4km4rSjZH4:9wdkyTVrbVs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=k4km4rSjZH4:9wdkyTVrbVs:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/k4km4rSjZH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/12/10/service-oriented-api-implementations/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/12/10/service-oriented-api-implementations/</feedburner:origLink></item>
		<item>
		<title>JPA with REST, OData, and SQL</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/2jw748SJCpg/</link>
		<comments>http://www.udidahan.com/2012/11/04/jpa-with-rest-odata-and-sql/#comments</comments>
		<pubDate>Sun, 04 Nov 2012 14:56:24 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Business Rules]]></category>
		<category><![CDATA[Data Access]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1893</guid>
		<description><![CDATA[Feeling a little bit rant-y today, as I just saw some more abuse of remote calls, this time on the Java side of things.
JPA is the Java Persistence API &#8211; a kind of ORM, as you&#8217;d expect. Luckily, a lot of the web services stuff was already on the way out by the time that [...]]]></description>
			<content:encoded><![CDATA[<p>Feeling a little bit rant-y today, as I just saw some more abuse of remote calls, this time on the Java side of things.</p>
<p>JPA is the Java Persistence API &#8211; a kind of ORM, as you&#8217;d expect. Luckily, a lot of the web services stuff was already on the way out by the time that <a href="http://wiki.eclipse.org/EclipseLink/FAQ/WhatIsDBWS">EclipseLink DBWS</a> came out. DBWS allowed you to expose database artifacts as web services.</p>
<p>I mean, it&#8217;s not like we have any other interoperable ways of accessing data, right?</p>
<p>Anyway, like I said, that didn&#8217;t take off, but now they&#8217;re reinventing it &#8211; this time with REST!</p>
<p>In case you had any doubts, REST is pure awesomeness and adding it to anything else makes it awesome too. Lest anybody take this out of context (it&#8217;s happened before), I&#8217;m being sarcastic.</p>
<p><a href="http://wiki.eclipse.org/EclipseLink/Development/2.4.0/JPA-RS/REST-API#Overview">Here it is</a>.</p>
<p>God knows they couldn&#8217;t let Microsoft totally dominate this area with <a href="http://en.wikipedia.org/wiki/Open_Data_Protocol">OData</a> coming out quite some time ago. In case you were wondering, OData was designed to provide standard CRUD access of a data source over HTTP.</p>
<p>Of course, none of these support any transactions so if you actually wanted to do some meaningful business logic on top of this CRUD, you wouldn&#8217;t have any consistency. And, let&#8217;s face it, if you&#8217;re not doing any meaningful business logic, just basic persistence, you just do it. That problem&#8217;s been solved a long time ago.</p>
<p>Can we please stop reinventing SQL already?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=2jw748SJCpg:cwWy_K6lMiM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=2jw748SJCpg:cwWy_K6lMiM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=2jw748SJCpg:cwWy_K6lMiM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=2jw748SJCpg:cwWy_K6lMiM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=2jw748SJCpg:cwWy_K6lMiM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/2jw748SJCpg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/11/04/jpa-with-rest-odata-and-sql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/11/04/jpa-with-rest-odata-and-sql/</feedburner:origLink></item>
		<item>
		<title>Training for this winter</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/xrvucXx1q0U/</link>
		<comments>http://www.udidahan.com/2012/10/12/training-for-this-winter/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 06:06:48 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1888</guid>
		<description><![CDATA[I wanted to let you know that registration has opened for several new locations this winter &#8211; this time, some courses will even be delivered in Spanish.
Spain
Marçal Serrate will be teaching the Enterprise Development with NServiceBus course in Spanish in:

Barcelona on Nov 26 &#8211; register here
Madrid on Dec 10 &#8211; register here

Marçal has been working [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to let you know that registration has opened for several new locations this winter &#8211; this time, some courses will even be delivered in Spanish.</p>
<h3>Spain</h3>
<p>Marçal Serrate will be teaching the Enterprise Development with NServiceBus course in Spanish in:</p>
<ul>
<li>Barcelona on Nov 26 &#8211; <a href="http://masterarquitecturabcn.eventbrite.com/">register here</a></li>
<li>Madrid on Dec 10 &#8211; <a href="http://masterarquitecturamad.eventbrite.com/">register here</a></li>
</ul>
<p>Marçal has been working with NServiceBus for a couple of years now building a very large system for an insurance company and knows all the ins and outs of taking NServiceBus live at scale &#8211; including all the infrastructure issues of big deployments.</p>
<p>We&#8217;re very happy to have him bringing NServiceBus to the Spanish-speaking community.</p>
<h3>Other locations</h3>
<p>Jimmy Bogard will be giving the next NServiceBus course in <a href="http://www.headspring.com/services/developer-training/nservicebus-boot-camp">Austin</a> in 2 weeks &#8211; Oct 23 and then heading over to <a href="http://skillsmatter.com/course/open-source-dot-net/udi-dahan-nservicebus-workshop/ud-886">London</a> to teach it with our good friends from Skills Matter on Dec 4.</p>
<h3>SOA &#8211; US, UK, AU, IL, DE</h3>
<p>In addition to teaching my 5-day course in <a href="http://nservicebus.eventbee.com/event?eid=977435214">Miami</a> on Nov 5, I&#8217;ll also be dropping by the Tallahassee Code Camp as a guest on the Dot Net Rocks Road Trip, so if you&#8217;re in the area, come by and say hello.</p>
<p>I&#8217;m also going to be teaching my course in <a href="http://www.eventbee.com/v/nservicebus/event?eid=918444435">Denver Colorado</a> early next year, Jan 14 and it&#8217;ll be my first time there. I&#8217;m still looking for the right venue so if you have any recommendations, I&#8217;d love to hear them.</p>
<p>Of course, I will be back in <a href="http://skillsmatter.com/course/design-architecture/advanced-distributed-systems-design-with-soa/ud-886">London</a>  one more time this year, Dec 3 and won&#8217;t be forgetting my local peeps in <a href="http://www.sela.co.il/syl/Syllabus.aspx?CourseCode=AdvDistDahan&#038;CategoryID=165">Israel</a> either &#8211; that&#8217;s on Dec 23.</p>
<p>Since I had such a wonderful time in <a href="http://www.professional-developer-training.net/items.aspx?catId=c45">Germany</a> last time, I&#8217;ll also be back again next year on Jan 28 because who couldn&#8217;t appreciate a venue like the Hackers Hotel, not just for its name, but the chairs in the dining room are kind of like thrones &#8211; makes you feel like you&#8217;re getting the royal treatment.</p>
<p>Finally, for the guys down-under &#8211; this time I&#8217;m going to <a href="http://www.eventbee.com/v/nservicebus/event?eid=948045332">Perth</a>. The past 3 years were always Sydney, Sydney, Sydney and I think that I should see more of the country. We&#8217;ve just about finalized the venue with Cliftons but figured that we might as well open up registration too &#8211; the course will be on Feb 11.</p>
<h3>In closing</h3>
<p>Yes, just like this past year, I&#8217;ll be travelling quite a bit &#8211; trying to get the good word out. I hope you&#8217;ll be able to make one of these dates &#8211; it&#8217;s always great meeting some of my long-time blog readers. </p>
<p>One time I gave the course this year, and there wasn&#8217;t a single person who&#8217;d read my blog there &#8211; and in a public course, no less! Not that I&#8217;m complaining, of course, because often times people who&#8217;ve already been on the course recommend it to their colleagues who might not be big blog readers, but it was kind of a surreal moment for me.</p>
<p>Anyway, that&#8217;s all the announcements for now.</p>
<p>If you need the full information on these courses, you can see it all up on my training page <a href="http://www.udidahan.com/training/">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=xrvucXx1q0U:fe-BuW_VqGg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=xrvucXx1q0U:fe-BuW_VqGg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=xrvucXx1q0U:fe-BuW_VqGg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=xrvucXx1q0U:fe-BuW_VqGg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=xrvucXx1q0U:fe-BuW_VqGg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/xrvucXx1q0U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/10/12/training-for-this-winter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/10/12/training-for-this-winter/</feedburner:origLink></item>
		<item>
		<title>Leveraging irrationality towards success</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/r7RJeHsf8vY/</link>
		<comments>http://www.udidahan.com/2012/09/27/leveraging-irrationality-towards-success/#comments</comments>
		<pubDate>Thu, 27 Sep 2012 09:10:20 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coaching]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Job Hunting]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[The Team]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1879</guid>
		<description><![CDATA[We&#8217;ve all seen good ideas emerge in the software space &#8211; from objects, to components, to services, to domain models, and the *DD approaches. Yet, in most organizations, it is very hard for these ideas to get traction.
I&#8217;ve heard from countless developers and architects over the years about their frustration in getting everybody else to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/irrational.jpg" alt="irrational" title="irrational" width="200" height="192" style="float:right; margin-left:10px; margin-bottom:10px;" />We&#8217;ve all seen good ideas emerge in the software space &#8211; from objects, to components, to services, to domain models, and the *DD approaches. Yet, in most organizations, it is very hard for these ideas to get traction.</p>
<p>I&#8217;ve heard from countless developers and architects over the years about their frustration in getting everybody else to go along with them. &#8220;Can&#8217;t they see how much better [new approach] is over what we&#8217;re doing now?!&#8221; they ask, believing that things could and actually would be evaluated on their merits, especially in a rational field like IT.</p>
<p>The usual explanation I give has a couple of parts.</p>
<h3>Conway&#8217;s Law</h3>
<p>In 1968 Melvin Conway penned what later became known as <a href="http://en.wikipedia.org/wiki/Conway's_law">Conway&#8217;s Law</a> which stated:</p>
<blockquote><p>&#8220;organizations which design systems &#8230; are constrained to produce designs which are copies of the communication structures of these organizations.&#8221;</p></blockquote>
<p>An important corollary of that law is that if you wish to have a significant impact on the design of a system, you would need to have a similarly significant impact on the communication structure of the organization making that system.</p>
<p>The main problem is that the people that tend to be pushing for DDD, IoC, CQRS, SOA, etc are usually not as strong when it comes to the soft skills that are so necessary for bringing about organizational change. The thing is that, at a minimum, these types of changes take 3 to 5 years so it really takes a long-term commitment, both from the individual and the organization.</p>
<h3>On the rationality of people in IT</h3>
<p>First of all, people are a whole lot less rational than they&#8217;d like to believe &#8211; or that they&#8217;d like other people to notice. In fact, people will go to great lengths to maintain the appearance of consistency and rationality, even at the cost of harm to themselves. How&#8217;s that for irrational?</p>
<p>Don&#8217;t take my word for it &#8211; there&#8217;s a great book on the topic: <a href="http://www.amazon.com/gp/product/0061353248/ref=as_li_ss_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0061353248&#038;linkCode=as2&#038;tag=thesoftwaresi-20">Predictably Irrational: The Hidden Forces That Shape Our Decisions</a>. The somewhat scary thing about it is that not only are we irrational beings, but that that irrationality can be predicted and, yes, even manipulated.</p>
<p>Once you can understand that the people you&#8217;re trying to convince aren&#8217;t Vulcan, you have a much better chance of being effective. I&#8217;d say that, for myself, understanding my own modes of irrationality increased my effectiveness as well, and made me quite a bit happier in life too.</p>
<h3>Why you need to bring in a consultant</h3>
<p>This isn&#8217;t me hawking my wares &#8211; believe me, I&#8217;m busy enough as it is, but let me know when this starts to sound familiar to you.</p>
<p>There&#8217;s a problem in your organization &#8211; could be that you&#8217;re not delivering software fast enough, high enough quality, whatever. Suffice it to say that Management isn&#8217;t happy. You&#8217;ve been living this pain for a while and know exactly what the source of the problem is (more often than not, management has at least a hand if not a whole arm in it). You come up with some recommendations, bring them to the higher-ups, but ultimately are ignored, dismissed, or don&#8217;t even get into the room.</p>
<p>Some time later, management brings in a Consultant (that&#8217;s right, with a capital &#8216;C&#8217;) who is there to figure out what&#8217;s wrong and come up with recommendations. In some cases, especially in larger organizations, they bring in a whole bunch of them from a brand name like McKinsey or Ernst &#038; Young.</p>
<p>If these guys are smart, they listen to you, ultimately presenting your analysis and recommendations to management. Of course, those higher-ups are in awe of how quickly these guys were able to understand the inner workings of their organization. That awe lends instant credibility to their recommendations which are then adopted and given powerful political backing.</p>
<p>And you&#8217;re sitting there thinking, &#8220;but&#8230; but&#8230; but that&#8217;s what I was saying!!&#8221;.</p>
<p>It&#8217;s not the message &#8211; it&#8217;s the messenger. </p>
<p>Let me put it another way, explained from the perspective of management &#8211; we&#8217;re having problems, you work here, ergo you&#8217;re part of the problem. Also, you don&#8217;t make that much money (compared to management), so how smart could you be? Those brand-name consultants, well, they cost a LOT, so they MUST be good (good enough to know not to work here too).</p>
<p>Therefore the more the consultant costs, the more likely management is to listen, which ultimately creates the conditions for success, which makes the change happen, which proves to management that they were right to bring in an expensive consultant. A vicious (or virtuous) cycle &#8211; depending on how you look at it.</p>
<p>Now, it doesn&#8217;t always work this way, but it does often enough to perpetuate management&#8217;s world view.</p>
<h3>In Closing</h3>
<p>I do hope your organization and its leaders aren&#8217;t trapped in this kind of dysfunction, but if they are, know that you&#8217;re not alone and that you can get help &#8211; either via consulting or in some books:</p>
<p>Some good books include <a href="http://www.amazon.com/gp/product/1400064287/ref=as_li_ss_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=1400064287&#038;linkCode=as2&#038;tag=thesoftwaresi-20">Made to Stick: Why Some Ideas Survive and Others Die</a> and the grandfather of the field: <a href="http://www.amazon.com/gp/product/0671027034/ref=as_li_ss_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0671027034&#038;linkCode=as2&#038;tag=thesoftwaresi-20">How to Win Friends &#038; Influence People</a>. There are countless others and there isn&#8217;t any right place to start &#8211; the most important thing to do is to start.</p>
<p>It&#8217;s been over 40 years since Melvin Conway&#8217;s observation and, as an industry, we&#8217;re still relearning these things &#8211; usually through the school of hard knocks. But there is an upside here &#8211; I&#8217;m pretty sure that, knowing these patterns, you could pick up on some signals during the interviewing process and find a company that&#8217;s outgrown many of these issues &#8211; one that would be able to have more meritocratic discussions on technical choices.</p>
<p>In the worst case, you could become a consultant and make a living off of all this irrationality <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=r7RJeHsf8vY:98R7fznl1zo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=r7RJeHsf8vY:98R7fznl1zo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=r7RJeHsf8vY:98R7fznl1zo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=r7RJeHsf8vY:98R7fznl1zo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=r7RJeHsf8vY:98R7fznl1zo:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/r7RJeHsf8vY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/09/27/leveraging-irrationality-towards-success/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/09/27/leveraging-irrationality-towards-success/</feedburner:origLink></item>
		<item>
		<title>Dennis does High Availability, the full story</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/mOT9vU1oehw/</link>
		<comments>http://www.udidahan.com/2012/09/20/dennis-does-high-availability-the-full-story/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 08:12:37 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Availability]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1872</guid>
		<description><![CDATA[It looks like my previous post worked &#8211; Dennis put up a nice meaty blog post about his experiences applying the principles of my course to a tightly-coupled legacy code base.
Here&#8217;s the punchline:
&#8220;By using messaging, queues, and publish/subscribe patterns, we were able to upgrade a core part of our system without touching any other parts [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like <a href="http://www.udidahan.com/2012/09/03/high-availability-a-la-dennis/">my previous post</a> worked &#8211; Dennis put up a nice meaty blog post about his experiences applying the principles of <a href="http://www.udidahan.com/training/">my course</a> to a tightly-coupled legacy code base.</p>
<p>Here&#8217;s the punchline:</p>
<blockquote><p>&#8220;By using messaging, queues, and publish/subscribe patterns, we were able to upgrade a core part of our system without touching any other parts – even those that it communicates with on an ongoing basis. During the short period of time that it was down, the queues took care of buffering the communication for that service without affecting anything else. The system as a whole was never really down.</p>
<p>This was a totally new experience for our company – an upgrade without downtime, even with the thousands of websites we’re running.&#8221;</p></blockquote>
<p><a href="http://bloggingabout.net/blogs/dennis/archive/2012/09/19/high-availability.aspx">Read the full story</a>.</p>
<p>By the way, if your in the Netherlands next week, you can catch Dennis speaking about these topics at the Dutch .NET User Group. You can get all the info and register <a href="http://www.dotned.nl/register/48/distributed-systems-design-bij-macaw-door-dennis-van-der-stelt.aspx">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=mOT9vU1oehw:-C0Jt8TuZIk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=mOT9vU1oehw:-C0Jt8TuZIk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=mOT9vU1oehw:-C0Jt8TuZIk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=mOT9vU1oehw:-C0Jt8TuZIk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=mOT9vU1oehw:-C0Jt8TuZIk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/mOT9vU1oehw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/09/20/dennis-does-high-availability-the-full-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/09/20/dennis-does-high-availability-the-full-story/</feedburner:origLink></item>
		<item>
		<title>Build one to throw away</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/8snaEJKeQQg/</link>
		<comments>http://www.udidahan.com/2012/09/08/build-one-to-throw-away/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 21:38:10 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Prototyping]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1867</guid>
		<description><![CDATA[There&#8217;s a pattern I&#8217;ve seen with companies that are starting on a large green-field project that gets them into trouble later on that I wanted to call out because the pitfall is quite subtle.
It&#8217;s something I touched on in my presentation last week about Balancing Architecture &#038; Agile at the Agile Practitioners group in Israel [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/recycle.jpg" alt="recycle" title="recycle" width="250" height="165" style="float:right; margin-left: 10px; margin-bottom:10px;" />There&#8217;s a pattern I&#8217;ve seen with companies that are starting on a large green-field project that gets them into trouble later on that I wanted to call out because the pitfall is quite subtle.</p>
<p>It&#8217;s something I touched on in my presentation last week about Balancing Architecture &#038; Agile at the Agile Practitioners group in Israel but didn&#8217;t have as much time to get into.</p>
<h3>Agile</h3>
<p>You see, at the beginning of these projects, often our users or customers don&#8217;t exactly know what they want. Even if you go through some process of doing mock-ups, sometimes users can&#8217;t really know what they want until they can interact with working software.</p>
<p>This is one of the advantages of an agile approach that focuses on getting working software in the hands of users very early. It allows us to mitigate the risk of us building the wrong system.</p>
<h3>Pitfalls</h3>
<p>The mistake here is believing that this needs to be done in a production-ready manner, using all of the super-scalability and highly reliable infrastructural elements in our target deployment environment. </p>
<p>While there is value in building real functionality on top of your production infrastructure to learn more about the challenges in doing that and in that process, refining the API of your platform, baking more capabilities into it, etc, the problem is that you are slowing down the important learning of what system needs to be built.</p>
<p>Decouple those two things.</p>
<h3>Build one to throw away.</h3>
<p>Sometimes, the way to be most effective is to be somewhat inefficient.</p>
<p>Once you&#8217;ve gotten your users to the point that they can point at a piece of working software and say, &#8220;Yes &#8211; build me that&#8221;, then you can go about building it the right way on top of your production platform.</p>
<p>Let me go a step further, just to be crystal clear.</p>
<p>Do not unit-test that code. Do not use TDD, DDD, CQRS, Event Sourcing, SOA, etc.</p>
<p>Just get it done.</p>
<h3>Architecture</h3>
<p>You also want to have a good understanding of the use cases in your system before you make too many big architectural decisions (where that might even be just 1 decision, but you only find out after the fact). Some use cases are architecturally significant &#8211; many aren&#8217;t. This falls under the &#8220;just enough architecture up-front&#8221;, but is really very dependent on the experience and skills of the people on your team so I really can&#8217;t give you anything more prescriptive.</p>
<p>Of course, there&#8217;s another risk around this approach.</p>
<h3>Organizational Dysfunction</h3>
<p>In some organizations, there isn&#8217;t enough of an understanding or appreciation of the difference between production-ready software and a prototype. I think we&#8217;ve all been through this at one time or another. If users see &#8220;the software&#8221; works, we might be forced to deploy the prototype &#8211; all our protests for naught.</p>
<p>If this is the environment you&#8217;re in, don&#8217;t worry about it.</p>
<p>Seriously &#8211; don&#8217;t.</p>
<h3>Growing up</h3>
<p>You can explain to a child that fire is hot, and that they will get burned if they stick their hand in it, but all of that is theoretical &#8211; it doesn&#8217;t really sink in, because they haven&#8217;t yet had a visceral experience of &#8220;hot&#8221;. </p>
<p>If the organization you&#8217;re in isn&#8217;t that mature yet, they&#8217;re going to have to get burned a couple of times until they learn. The only thing you can do as a responsible adult is to *try* to get them started with smaller burns so that they&#8217;ll learn the lessons with the minimal amount of pain.</p>
<p>Given that the people doing the learning are higher up the food-chain, you really don&#8217;t have much influence. Accept that and move on. If necessary, cover your assets &#8211; write an email containing the &#8220;meeting minutes&#8221; in which you describe the concerns that you raised and that the decision was made against your recommendations &#8211; but phrase it gently. Depending on the state of the economy and your network, it might be a good time to start job-hunting.</p>
<h3>In closing</h3>
<p>I said it before but it bears repeating:</p>
<p>Efficiency is secondary to effectiveness.</p>
<p>You want to make sure your headed in the right direction before putting the pedal to the metal.</p>
<p>Rework is to be accepted and, yes, even embraced.</p>
<p><a href="http://37signals.com/rework">There&#8217;s even a book about it</a>.</p>
<p>Have fun.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=8snaEJKeQQg:Wlo-uQqqniA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=8snaEJKeQQg:Wlo-uQqqniA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=8snaEJKeQQg:Wlo-uQqqniA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=8snaEJKeQQg:Wlo-uQqqniA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=8snaEJKeQQg:Wlo-uQqqniA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/8snaEJKeQQg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/09/08/build-one-to-throw-away/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/09/08/build-one-to-throw-away/</feedburner:origLink></item>
		<item>
		<title>Course feedback from Canada</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/per6ASsvwpE/</link>
		<comments>http://www.udidahan.com/2012/09/06/course-feedback-from-canada/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 12:37:14 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1865</guid>
		<description><![CDATA[I just love getting emails from people who&#8217;ve attended my course and are now in a place where they&#8217;ve been able to apply what they&#8217;ve learned. Sean from Canada sent me this:
&#8220;It&#8217;s the first project I&#8217;ve been able to use the principles from your course and the resulting codebase is so simple. I was able [...]]]></description>
			<content:encoded><![CDATA[<p>I just love getting emails from people who&#8217;ve attended my <a href="http://www.udidahan.com/training/">course</a> and are now in a place where they&#8217;ve been able to apply what they&#8217;ve learned. Sean from Canada sent me this:</p>
<blockquote><p>&#8220;It&#8217;s the first project I&#8217;ve been able to use the principles from your course and the resulting codebase is so simple. I was able to add reporting module without changing a line of existing code just by subscribing to events. Awesome. Keeping everything explicit is the best was to keep it simple which i find is easier developing for mobile.  I&#8217;m sure there is lots I could improve.  I&#8217;d like to take course again one day.&#8221;</p></blockquote>
<p>This right here is what I use as an answer when people ask me, &#8220;don&#8217;t you get tired of giving the same course over and over again?&#8221;</p>
<p>Quite simply &#8211; I don&#8217;t. There&#8217;s really nothing quite like having this kind of impact on people.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=per6ASsvwpE:F7_r64YujNs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=per6ASsvwpE:F7_r64YujNs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=per6ASsvwpE:F7_r64YujNs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=per6ASsvwpE:F7_r64YujNs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=per6ASsvwpE:F7_r64YujNs:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/per6ASsvwpE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/09/06/course-feedback-from-canada/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/09/06/course-feedback-from-canada/</feedburner:origLink></item>
		<item>
		<title>High Availability a la Dennis</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/qX5ZBZDcdNE/</link>
		<comments>http://www.udidahan.com/2012/09/03/high-availability-a-la-dennis/#comments</comments>
		<pubDate>Mon, 03 Sep 2012 14:51:28 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Availability]]></category>
		<category><![CDATA[Courses]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1863</guid>
		<description><![CDATA[I thought I&#8217;d give a bit of a shout-out to Dennis van der Stelt whose been applying many of the principles from my course on his project and now has something of a success story to share. Although all he put out was a little tweet about it, I think if more people bug him, [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d give a bit of a shout-out to Dennis van der Stelt whose been applying many of the principles from my course on his project and now has something of a success story to share. Although all he put out was a little tweet about it, I think if more people bug him, we can tease some more out:</p>
<blockquote class="twitter-tweet"><p>First big update released of our system based on <a href="https://twitter.com/udidahan"><s>@</s><b>udidahan</b></a> ADSD training, makes a maintainable system &amp; site updates in &lt;1sec instead of 24h</p>
<p>&mdash; Dennis van der Stelt (@dvdstelt) <a href="https://twitter.com/dvdstelt/status/241869330575421442" data-datetime="2012-09-01T12:05:16+00:00">September 1, 2012</a></p></blockquote>
<p><script src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>It&#8217;s not just about getting the system built quickly the first time, and it&#8217;s not just about having a maintainable code base longer term, equally important is the ability to quickly deploy major releases to the system without downtime &#8211; &#8216;cuz when you&#8217;re system is down, it&#8217;s not providing any business value (which is what being Agile is all about).</p>
<p>What do you say, Dennis? Tell us some more!</p>
<h3>UPDATE</h3>
<p>Dennis gives the full story <a href="http://bloggingabout.net/blogs/dennis/archive/2012/09/19/high-availability.aspx">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=qX5ZBZDcdNE:cfr71RnEg_s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=qX5ZBZDcdNE:cfr71RnEg_s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=qX5ZBZDcdNE:cfr71RnEg_s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=qX5ZBZDcdNE:cfr71RnEg_s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=qX5ZBZDcdNE:cfr71RnEg_s:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/qX5ZBZDcdNE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/09/03/high-availability-a-la-dennis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/09/03/high-availability-a-la-dennis/</feedburner:origLink></item>
		<item>
		<title>NServiceBus Events in Sweden</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/c7aSqNlGVho/</link>
		<comments>http://www.udidahan.com/2012/08/31/nservicebus-events-in-sweden/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 11:33:15 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1861</guid>
		<description><![CDATA[The one and only Andreas Ohlund will be touring through Sweden as a part of the .NET Best Practices Community Days organized by Edument and Informator. He&#8217;ll be hitting Göteborg on Sep 12, Stockholm on Sep 13, and Malmö on Sep 14.
These full-day events will include topics like CQRS, REST, as well as async and [...]]]></description>
			<content:encoded><![CDATA[<p>The one and only Andreas Ohlund will be touring through Sweden as a part of the .NET Best Practices Community Days organized by Edument and Informator. He&#8217;ll be hitting Göteborg on Sep 12, Stockholm on Sep 13, and Malmö on Sep 14.</p>
<p>These full-day events will include topics like CQRS, REST, as well as async and functional programming.</p>
<p>Full information and registration is available <a href="http://www.edument.se/events/2012/dot-Net-Best-Practices-Community-Day-2012-Overview.html">here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=c7aSqNlGVho:nqNZW1tH0ts:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=c7aSqNlGVho:nqNZW1tH0ts:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=c7aSqNlGVho:nqNZW1tH0ts:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=c7aSqNlGVho:nqNZW1tH0ts:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=c7aSqNlGVho:nqNZW1tH0ts:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/c7aSqNlGVho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/31/nservicebus-events-in-sweden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/31/nservicebus-events-in-sweden/</feedburner:origLink></item>
		<item>
		<title>NServiceBus Security Issue Fixed</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/K2jccZ_0_44/</link>
		<comments>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-fixed/#comments</comments>
		<pubDate>Wed, 29 Aug 2012 17:33:05 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1859</guid>
		<description><![CDATA[Just wanted to follow up to say that the issue has been fixed in version 3.2.8 of NServiceBus. You can download this via our website or through NuGet. Despite our best efforts, we weren&#8217;t able to fix the issue in such a way that you&#8217;d be able to do a zero-downtime upgrade in all cases [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to follow up to say that the issue has been fixed in version 3.2.8 of NServiceBus. You can download this via our website or through NuGet. Despite our best efforts, we weren&#8217;t able to fix the issue in such a way that you&#8217;d be able to do a zero-downtime upgrade in all cases (like in every NServiceBus upgrade so far), but we think that you wouldn&#8217;t incur more than 5 to 10 minutes of downtime on this.</p>
<p><a href="http://tech.groups.yahoo.com/group/nservicebus/message/15582">Full information here.</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=K2jccZ_0_44:BdrwWQpfphs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=K2jccZ_0_44:BdrwWQpfphs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=K2jccZ_0_44:BdrwWQpfphs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=K2jccZ_0_44:BdrwWQpfphs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=K2jccZ_0_44:BdrwWQpfphs:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/K2jccZ_0_44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-fixed/</feedburner:origLink></item>
		<item>
		<title>NServiceBus Security Issue Found</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/ayH5RVLQR_U/</link>
		<comments>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-found/#comments</comments>
		<pubDate>Wed, 29 Aug 2012 08:28:44 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1857</guid>
		<description><![CDATA[For anybody that is using NServiceBus that isn&#8217;t receiving messages via our public list, I wanted to let you know that we&#8217;ve uncovered a security issue. This affects systems using WireEncryptedString on types that aren&#8217;t messages themselves but are used in messages.
Here&#8217;s the full information.
]]></description>
			<content:encoded><![CDATA[<p>For anybody that is using NServiceBus that isn&#8217;t receiving messages via our public list, I wanted to let you know that we&#8217;ve uncovered a security issue. This affects systems using WireEncryptedString on types that aren&#8217;t messages themselves but are used in messages.</p>
<p><a href="http://tech.groups.yahoo.com/group/nservicebus/message/15568">Here&#8217;s the full information</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ayH5RVLQR_U:STftslgoWOo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ayH5RVLQR_U:STftslgoWOo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=ayH5RVLQR_U:STftslgoWOo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=ayH5RVLQR_U:STftslgoWOo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=ayH5RVLQR_U:STftslgoWOo:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/ayH5RVLQR_U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/29/nservicebus-security-issue-found/</feedburner:origLink></item>
		<item>
		<title>Data Duplication and Replication</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/3RX138-c-xk/</link>
		<comments>http://www.udidahan.com/2012/08/28/data-duplication-and-replication/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 08:10:59 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1850</guid>
		<description><![CDATA[Occasionally I&#8217;ll get questions from people who have been going down the CQRS path about why I&#8217;m so against data duplication. Aren&#8217;t the performance benefits of a denormalized view model justified, they ask. This is even more pronounced in geographically distributed systems where the &#8220;round-trip&#8221; may involve going outside your datacenter over a relatively slow [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/agent_smith_replication.jpg" alt="agent_smith_replication" title="agent_smith_replication" width="250" height="165" style="float:right; margin-left:10px; margin-bottom:10px;" />Occasionally I&#8217;ll get questions from people who have been going down the CQRS path about why I&#8217;m so against data duplication. Aren&#8217;t the performance benefits of a denormalized view model justified, they ask. This is even more pronounced in geographically distributed systems where the &#8220;round-trip&#8221; may involve going outside your datacenter over a relatively slow link to another site.</p>
<h3>CQRS</h3>
<p>As his been said several times before by many others, it&#8217;s not the denormalized view model that defines CQRS.</p>
<p>One of the things that sometimes surprising people after going through my course is that in most cases you don&#8217;t need a denormalized view model, or at least, not the kind you think. Yes, that&#8217;s right: MOST cases.</p>
<p>But I don&#8217;t want to get too deep into the CQRS thing in this post &#8211; that can wait.</p>
<h3>SOA</h3>
<p>The big thing I&#8217;m against is raw business data being duplicated between services.</p>
<p>Data that can be expected to be accessible in multiple services includes things like identifiers, status information, and date-times. These date-times are used to anchor the status changes in time so that our system will behave correctly even if data/messages are processed out of order. Not all status information necessarily needs to be anchored in time explicitly &#8211; sometimes this can be implicit to the context of a given flow through the system.</p>
<p>For example, the Amazon.com checkout workflow.</p>
<p>In that flow, if you provide a shipping address that is in the US, you are presented with one set of options for shipping speed, whereas an international address will lead you to a different set of options.</p>
<p>Assuming that the address information of the customer and the shipping speed options are in different services, we need to propagate the status InternationalAddress(true/false) between these services in that same flow. In this case, there isn&#8217;t a need to explicitly anchor that status in time.</p>
<h3>But what&#8217;s so bad about duplication of data between services?</h3>
<p>The danger is that functionality ultimately follows raw business data.</p>
<p>You start with something small like having product prices in the catalog service, the order service, and the invoice service. Then, when you get requirements around supporting multiple currencies, you now need to implement that logic in multiple places, or create a shared library that all the services depend on. </p>
<p>These dependencies creep up on you slowly, tying your shoelaces together, gradually slowing down the pace of development, undermining the stability of your code pace where changes to one part of the system break other parts. It&#8217;s a slow death by a thousand cuts, and as a result nobody is exactly sure what big decision we made that caused everything to go so bad.</p>
<p>That&#8217;s the thing, it wasn&#8217;t viewed as a &#8220;big decision&#8221; but rather as just one &#8220;pragmatic choice&#8221; for that specific case. The first one excuses the second, which paves the way for third, and from that point on, it&#8217;s a &#8220;pattern&#8221; &#8211; how we do things around here; the proverbial slippery slope.</p>
<h3>So what&#8217;s with the word &#8220;Replication&#8221; in the title of this post?</h3>
<p>While data duplication between services is very dangerous, replication of business data WITHIN a service is perfectly alright.</p>
<p>Let&#8217;s get back into multi-site scenarios, like a retail chain that has a headquarters (HQ) and many stores. Prices are pushed out from the HQ and orders are pushed back from the stores according to some schedule.</p>
<p>We know that we can&#8217;t guarantee a perfect connection between all stores and the HQ at all times, therefore we copy the prices published from the HQ and store them locally in the store. Also, since we want to perform top-level analytics on the orders made at the various stores, that would be best done by having all of those orders copied locally at the HQ as well.</p>
<p>We should not view this movement of data from one physical location to another as duplication, but rather as replication done for performance reasons. If there were some magical always-on zero-latency network that existed, we wouldn&#8217;t need to do any of this replication. </p>
<p>And that&#8217;s just the thing &#8211; logical boundaries should not be impacted by these types of physical infrastructure choices (generally speaking). Since services are aligned with logical boundaries, we should expect to see them cross physical boundaries &#8211; this includes SYSTEM boundaries (since a system is really nothing more than a unit of deployment).</p>
<p>I know that you might be reading that and thinking &#8220;What!?&#8221; but there isn&#8217;t enough time to get into this in any more depth here. You can read some of my previous posts on the topic of SOA for more info <a href="http://www.udidahan.com/category/soa/">here</a>.</p>
<h3>Cross-site integration without replication</h3>
<p>There are some domains where sensitive data cannot be allowed to &#8220;rest&#8221; just anywhere. Let&#8217;s look at a healthcare environment where we&#8217;re integrating data from multiple hospitals and care providers. While all of these partners are interested in working together to make sure that patients get the best care, which means that they need to share their data with each other, they don&#8217;t want any of THEIR data to remain at any partner sites afterwards (and are quite adamant about this).</p>
<p>In these cases, the decision was made that performance is less important than data ownership. Personally, I don&#8217;t agree with this mindset. The fact that data is &#8220;at rest&#8221; in a location as opposed to &#8220;in flight&#8221; does not change ownership. It could be stored in an encrypted manner so that only a certain application could use it, resulting in the same overall effect, but this is an argument that I&#8217;ve never won.</p>
<p>People (as physical beings) put a great deal of emphasis on the physical locations of things. It&#8217;s understandable but quite counterproductive when dealing with the more abstract domain of software. </p>
<h3>In closing</h3>
<p>By virtue of the fact that we don&#8217;t duplicate raw business data between services, that means that the regular data structures inside a service already look very different from what they would have looked like in a traditional layered architecture with an ORM-persisted entity model.</p>
<p>In fact, you probably wouldn&#8217;t see very many relationships between entities at all.</p>
<p>Going beyond that, you probably wouldn&#8217;t see the same entities you had before. An Order wouldn&#8217;t exist the way you expect; addresses (billing and shipping) would be stored (indexed by OrderID) in one service whereas the shipping speed (also indexed by OrderId) would be in another, and the prices may well be in yet another.</p>
<p>It is in this manner that data does not end up being duplicated between services, but rather is composed by many services whether that is in the UI of one system, the print-outs down by a second system, or in the integration with 3rd parties done by a third system.</p>
<p>If performance needs to be improved, look at having these services replicate their data from one physical system to another &#8211; in-memory caching is one way of doing this, denormalized view models might be though of as another (until you realize there isn&#8217;t very much normalization within a service to begin with).</p>
<h3>And a word from our sponsor <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </h3>
<p>For those of you on &#8220;rewrite that big-ball-of-mud&#8221; projects looking to use these principles, I strongly suggest coming on one of my courses. The next one is in <a href="http://www.eventbee.com/v/nservicebus/event?eid=993424225">San Francisco</a> and I&#8217;ve just opened up the registration for <a href="http://nservicebus.eventbee.com/event?eid=977435214">Miami</a>. </p>
<p>For those of you on the other side of the Atlantic, the next courses will be in <a href="http://www.cornerstone.se/Web/Templates/CoursePage.aspx?id=2513&#038;course=COUR2011030713242304266086">Stockholm</a> in October and in <a href="http://skillsmatter.com/course/design-architecture/advanced-distributed-systems-design-with-soa/ud-886">London</a> this December.</p>
<p>The schedule for next year is also coming together and it will include South Africa and Australia too.</p>
<p>Anyway, here&#8217;s what one attendee had to say after taking the course earlier this month:</p>
<blockquote><p>I wanted to thank you for the excellent workshop in Toronto last week.  I spent the better part of the weekend reflecting over what was presented, the insights we learned through the group exercises, and how my preconceptions of SOA have changed.  By the end of the course, all the tidbits of (usually) rather ambiguous information that I&#8217;ve collected from various blogs, books, and other sources, finally coalesced into something more intelligible &#8211; one big A-HA moment if you will. Overall, I found the content of the workshop to be incredibly enlightening and it left me feeling invigorated and excited to learn more.<br />
<font style="font-size:small; font-style:italic">- Joel from Canada</font>
</p></blockquote>
<p>Hope you&#8217;ll be able to make it.</p>
<p>If travel is out of the question for you, you can also look at get a recording of the course <a href="https://www.flickrocket.com/eshop/Catalog2.aspx?CID=2956&#038;Theme=32">here</a>.</p>
<h4>One final thing</h4>
<p>If your employer won&#8217;t foot the bill for these, please get in touch with me.<br />
I wouldn&#8217;t want you not to be able to come just because you&#8217;re paying out of pocket.</p>
<p>There are very substantial discounts available.</p>
<p><a href="mailto:discounts@udidahan.com">Contact me</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=3RX138-c-xk:UrDTsRfCxoM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=3RX138-c-xk:UrDTsRfCxoM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=3RX138-c-xk:UrDTsRfCxoM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=3RX138-c-xk:UrDTsRfCxoM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=3RX138-c-xk:UrDTsRfCxoM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/3RX138-c-xk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/28/data-duplication-and-replication/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/28/data-duplication-and-replication/</feedburner:origLink></item>
		<item>
		<title>NServiceBus Community Events in Germany</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/jVE_iAJP7pA/</link>
		<comments>http://www.udidahan.com/2012/08/21/nservicebus-community-events-in-germany/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 17:35:44 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1844</guid>
		<description><![CDATA[Daniel Marbach will be doing a road trip through Germany talking about NServiceBus. Daniel&#8217;s been working with NServiceBus for some time, been active on the discussion group, contributed to the Ninject container support, and has also taken the 5-day Advanced Distributed Systems Design course. In short, if you&#8217;ve got in-depth NServiceBus questions, or even if [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.planetgeek.ch/author/danielmarbach/">Daniel Marbach</a> will be doing a road trip through Germany talking about NServiceBus. Daniel&#8217;s been working with NServiceBus for some time, been active on the discussion group, contributed to the Ninject container support, and has also taken the 5-day Advanced Distributed Systems Design course. In short, if you&#8217;ve got in-depth NServiceBus questions, or even if you&#8217;ve never heard of it and want to get an overview, Daniel&#8217;s got you covered.</p>
<p>Here&#8217;s the plan:</p>
<ul>
<li><a href="http://www.altnetberlin.de/Neues/25092012einfuehrunginnservicebusmitdanielmarbach">Sep 25 in Berlin</a></li>
<li><a href="http://dd-dotnet.de/?p=114">Sep 26 in Dresden</a></li>
<li><a href="http://dotnet-leipzig.de/veranstaltungen/dnug-event-2012-nservicebus/">Sep 27 in Leipzig</a></li>
</ul>
<p>If you&#8217;re in and around one of those areas, drop by and support the community. If you have some friends or colleagues that are working on distributed systems, drag them along as well. They&#8217;ll thank you for it later.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=jVE_iAJP7pA:c_K_8ybtcc8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=jVE_iAJP7pA:c_K_8ybtcc8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=jVE_iAJP7pA:c_K_8ybtcc8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=jVE_iAJP7pA:c_K_8ybtcc8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=jVE_iAJP7pA:c_K_8ybtcc8:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/jVE_iAJP7pA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/21/nservicebus-community-events-in-germany/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/21/nservicebus-community-events-in-germany/</feedburner:origLink></item>
		<item>
		<title>Bandwidth, Priority, and Service Contracts</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/Bay1z1I3UUg/</link>
		<comments>http://www.udidahan.com/2012/08/20/bandwidth-priority-and-service-contracts/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 15:55:30 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1837</guid>
		<description><![CDATA[Here&#8217;s a small quick tip that can help you improve the performance of important use cases in your systems. It doesn&#8217;t require very many changes to your code and can improve matters when your system is under load but won&#8217;t make much of a difference when you have capacity to spare.
This is something I talk [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/contract.jpg" alt="contract" title="contract" width="250" height="167" style="float:right; margin-left:10px; margin-bottom:10px;" />Here&#8217;s a small quick tip that can help you improve the performance of important use cases in your systems. It doesn&#8217;t require very many changes to your code and can improve matters when your system is under load but won&#8217;t make much of a difference when you have capacity to spare.</p>
<p>This is something I talk about in the first day of <a href="http://www.udidahan.com/training/">my course</a> when going through the fallacies of distributed computing &#8211; specifically fallacy #3 which talks about bandwidth.</p>
<h3>What about bandwidth?</h3>
<p>When it comes to network bandwidth in your datacenter, there&#8217;s a pretty good chance you&#8217;re still on gigabit ethernet. When most developers hear that prefix, &#8220;giga&#8221;, there is an instantaneous translation in their brain to &#8220;so much I don&#8217;t need to worry about it&#8221;.</p>
<p>The thing is that it&#8217;s Giga<b>BIT</b>, not GigaByte, so we&#8217;re talking about 128 MBps. </p>
<p>Also, keep in mind that hardly anybody programs at the level of ethernet, we&#8217;re several layers up the stack. You can expect roughly 40% the bandwidth of ethernet up in TCP land due to its collision detection, exponential backoff, etc. So that&#8217;s roughly 50MBps, not counting overhead for serialization (which can be very significant if it&#8217;s text-based like XML or JSON).</p>
<p>In practice, you might be getting something like 25MBps &#8211; definitely not so much that you don&#8217;t even need to think about it.</p>
<p>Everybody&#8217;s talking scalability in terms of number of servers and memory, storage, CPU per server &#8211; but what about the network? More importantly, what happens when (not if) you run out? Well, the latency of your calls increase &#8211; and that can be quite substantial.</p>
<h3>Business Priority</h3>
<p>And now we get to the crux of the matter. </p>
<p>Consider a &#8220;Customer&#8221; web service with a bunch of methods on it, including these two: GenerateTopCustomersByRegionReport and MarkCustomerAsFraud.</p>
<p>Now, your system is under significant load and there&#8217;s just enough bandwidth left for one call to make it across the network without timing out. Two users invoke the functionality above &#8211; one doing the report, the other doing the fraud. Should the fact that one user clicked the button a millisecond before the other mean that the MarkCustomerAsFraud should be delayed to the point of failure?</p>
<p>I&#8217;m fairly sure that if we asked a business stakeholder the answer would be a clear no.</p>
<p>While we could try asking the network engineers to give higher priority to that webmethod, let&#8217;s face it, that&#8217;s never going to happen. Since both methods are on the same web service, clients are bound to the address where that web service is hosted, regardless of which methods they call.</p>
<h3>The problem with &#8220;the&#8221; network</h3>
<p>If there&#8217;s one word I loathe in the English language, it&#8217;s the word &#8220;the&#8221;.</p>
<p>Such a small word, tacked on in front of so many other words that, without you even noticing it, traps your mind into thinking you can have only one of that thing. </p>
<p>The network.<br />
The database.</p>
<p>But you CAN have more than one &#8211; it&#8217;s YOUR system. Design it however you like.</p>
<p>Most servers (if not all) can have more than one network card these days. And even if yours couldn&#8217;t &#8211; you can ask your network engineers to set up multiple virtual networks on top of the physical network and divide up the bandwidth between them.</p>
<h3>Putting it together</h3>
<p>The next step is to simply put the MarkAsFraud method on a different web service. This way, you can decide at deployment time which web service should be hosted over which network.</p>
<p>When your system is under load, you will then be guaranteed that even if there are a large number of low priority calls being invoked, they will not use up the network bandwidth reserved for your higher priority calls. You will likely still need to take care of processing and other IO concerns on your servers, but if worst comes to worst, you can partition your server farm as well.</p>
<p>While this may sound a bit <a href="http://www.udidahan.com/category/cqrs/">CQRS-ish</a> but it would be more accurate to say that CQRS is a more specific case of this pattern &#8211; that of partitioning the API according to business priority. </p>
<p>One of the interesting things about messaging is that we tend to forgo the traditional &#8220;service contracts&#8221; where many methods are put together on a single &#8220;service&#8221;. Instead, each message definition stands on its own and can be routed to any destination.</p>
<h3>In summary</h3>
<p>If you are still using WCF and web services, be aware that these apparently little things can have an impact on how your system behaves under load. Even if you do use MSMQ under WCF, the traditional service contract made of multiple methods will still govern your routing.</p>
<p>If you do go all the way with this pattern, you&#8217;ll see that each of your service contracts ends up with only one method on it. This might make you wonder what&#8217;s the point of the whole service contract thing in WCF &#8211; that would be a very good issue to resolve.</p>
<p>Remember the first rule of remote communication &#8211; Don&#8217;t.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Bay1z1I3UUg:EtEM3m5NKjM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Bay1z1I3UUg:EtEM3m5NKjM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=Bay1z1I3UUg:EtEM3m5NKjM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=Bay1z1I3UUg:EtEM3m5NKjM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=Bay1z1I3UUg:EtEM3m5NKjM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/Bay1z1I3UUg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/08/20/bandwidth-priority-and-service-contracts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/08/20/bandwidth-priority-and-service-contracts/</feedburner:origLink></item>
		<item>
		<title>Services are (still) not Remotely Callable Components</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/cJ7CisXmbFg/</link>
		<comments>http://www.udidahan.com/2012/07/29/services-are-still-not-remotely-callable-components/#comments</comments>
		<pubDate>Sun, 29 Jul 2012 18:21:05 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1825</guid>
		<description><![CDATA[We&#8217;re more than half-way through 2012, more than 16 years since the term SOA was introduced, and still people are treating the term &#8220;service&#8221; as if it were nothing more than a remotely-callable component (like a web service).
Take this &#8220;Bare-knuckle SOA&#8221; thing that&#8217;s started making the rounds. Not to say that the approach doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/OutOfService.jpg" alt="Out Of Service" title="Out Of Service" width="135" height="200" style="float:right; margin-left:10px; margin-bottom:10px;"/>We&#8217;re more than half-way through 2012, more than 16 years since the term SOA was introduced, and still people are treating the term &#8220;service&#8221; as if it were nothing more than a remotely-callable component (like a web service).</p>
<p>Take this <a href="http://johannesbrodwall.com/2012/07/19/teaser-bare-knuckle-soa/">&#8220;Bare-knuckle SOA&#8221;</a> thing that&#8217;s started making the rounds. Not to say that the approach doesn&#8217;t have its merits (regardless of the SOA thing), but it seems to be talking about little more than regular XML and HTTP communication. Personally, I think that the functional testing done over HTTP in that post would have been much better done directly against the API of the component, bypassing HTTP entirely.</p>
<p>Appending the word &#8220;service&#8221; to a concept doesn&#8217;t change any of its architectural properties.</p>
<p>EmailService, CurrencyService, GeoLocationService &#8211; all of them just components which have methods that can be invoked remotely. If anything, the design would probably have been better if all the XML and HTTP was removed &#8211; if the components were all hosted in the same process.</p>
<p>In fact, in a well designed Service-Oriented Architecture, we tend to see components from many services deployed in process with each other (as I showed in my recent post <a href="http://www.udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/">UI Composition for Correct Service Boundaries</a>).</p>
<p>But I&#8217;ve got to admit &#8211; the &#8220;bare knuckle&#8221; prefix, that&#8217;s some good link-bait.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=cJ7CisXmbFg:WQVrcEPhW0o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=cJ7CisXmbFg:WQVrcEPhW0o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=cJ7CisXmbFg:WQVrcEPhW0o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=cJ7CisXmbFg:WQVrcEPhW0o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=cJ7CisXmbFg:WQVrcEPhW0o:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/cJ7CisXmbFg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/07/29/services-are-still-not-remotely-callable-components/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/07/29/services-are-still-not-remotely-callable-components/</feedburner:origLink></item>
		<item>
		<title>With thanks to and from our community</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/-ywYza7r9r0/</link>
		<comments>http://www.udidahan.com/2012/07/25/with-thanks-to-and-from-our-community/#comments</comments>
		<pubDate>Wed, 25 Jul 2012 17:19:53 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[NServiceBus]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1814</guid>
		<description><![CDATA[A post from one of the long-time users of NServiceBus on our discussion group caught my eye a couple of weeks ago and I wanted to blog it as well. Our organically growing team here at NServiceBus Ltd have been working around the clock (literally) on both product and support, and deserve recognition for all [...]]]></description>
			<content:encoded><![CDATA[<p>A post from one of the long-time users of NServiceBus on our discussion group caught my eye a couple of weeks ago and I wanted to blog it as well. Our organically growing team here at NServiceBus Ltd have been working around the clock (literally) on both product and support, and deserve recognition for all their efforts.</p>
<p><a href="http://tech.groups.yahoo.com/group/nservicebus/message/14537">Werner posts</a>:</p>
<blockquote><p>
As this is a support forum, the nature of the threads are almost always about problems; which is fine. But I just feel like posting something not related to problems <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After spending 2 weeks with [version] 3.x I must say that I like it a lot, and have recommended that we make a global change to the new version (we&#8217;re using 1.9 and 2.0). </p>
<p>I like the support that I see in this forum. Both from other users and especially from the people now making a living developing and supporting NServiceBus. No one mentioned, no one forgotten; thanks to all and keep up the good work!
</p></blockquote>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>The most incredible thing about NServiceBus is our community &#8211; over 1600 of the best and brightest of the .NET developer ecosystem &#8211; over 500 of which have gone to the 5-day Advanced Distributed Systems Design course. In addition to going about building the most reliable software their industries have ever seen, many are there to lend a helping hand to those just getting started. </p>
<p>Not surprisingly, we&#8217;ve seen more people downloading NServiceBus than actually in the community, at least a 2 to 1 ratio. In my work with clients, I often see somewhere in the area 5-10 people actively developing with NServiceBus in a company, but only one of them downloading new releases and bringing them into the company. </p>
<p>I&#8217;ve heard mention of this &#8220;power law&#8221; before, but I&#8217;ve got to tell you, when I started on this journey with NServiceBus 6 years ago, in my wildest dreams I wouldn&#8217;t have ever thought that tens of thousands of developers around the world would be using my baby.</p>
<p>Thank you all.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=-ywYza7r9r0:WjvYS5f43BU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=-ywYza7r9r0:WjvYS5f43BU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=-ywYza7r9r0:WjvYS5f43BU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=-ywYza7r9r0:WjvYS5f43BU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=-ywYza7r9r0:WjvYS5f43BU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/-ywYza7r9r0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/07/25/with-thanks-to-and-from-our-community/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/07/25/with-thanks-to-and-from-our-community/</feedburner:origLink></item>
		<item>
		<title>UI Composition vs. Server-side Orchestration</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/lXlSdyOlOBw/</link>
		<comments>http://www.udidahan.com/2012/07/09/ui-composition-vs-server-side-orchestration/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 06:49:26 +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[Reliability]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1813</guid>
		<description><![CDATA[Following on my last post called UI composition techniques for correct service boundaries, one commentor didn&#8217;t seem to like the approach I described saying:
&#8220;I’m sorry, but with all due respect I must strongly disagree. You haven’t avoided any orchestration work at all, you’ve just moved it in to client side script! 
How are you going [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/orchestra_composition.jpg" alt="orchestra_composition" title="orchestra_composition" width="186" height="224" style="float:right; margin-left:10px; margin-bottom:10px;" />Following on my last post called <a href="http://www.udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/">UI composition techniques for correct service boundaries</a>, one commentor didn&#8217;t seem to like the approach I described saying:</p>
<blockquote><p>&#8220;I’m sorry, but with all due respect I must strongly disagree. You haven’t avoided any orchestration work at all, you’ve just moved it in to client side script! </p>
<p>How are you going to deal with the scenario that one of the service calls fails? Say a failed credit card payment, or no more rooms left? In more javascript?? </p>
<p>I would much rather take the less brittle approach of introducing an orchestration service. Like it or not, however trivial it may be, there is a relationship between these services, if one call fails, they both fail. This should be reflected in the architecture, not hidden in javascript. With an orchestration service you also either get transactions for free provided by infrastructure, or alternatively if the underlying service doesnt support this, explicit and unit testable control over recovery.&#8221;</p></blockquote>
<p>Since this is a common point of view, I thought I&#8217;d take the time to explain a bit more.</p>
<p>Let&#8217;s start at a fairly high level.</p>
<h3>On failures</h3>
<p>I&#8217;ve talked many times in the past about how to handle technical causes for failure like server crashes, database deadlocks, and even deserialization exceptions. Messaging and queuing solutions like <a href="http://www.nservicebus.com">NServiceBus</a> can help overcome these issues such that things don&#8217;t actually fail &#8211; they just take a little longer to succeed.</p>
<p>On the logical side of things, the CQRS patterns I talk about describe an approach where aggressive client-side validation is done to prevent almost all logical causes for failure. The only thing that can&#8217;t be mitigated client-side are race conditions resulting in actions taken by other users at the same time.</p>
<p>In short, it really is uncommon for things to fail when being processed server-side.</p>
<h3>Back to the specific example</h3>
<p>The concerns raised in the comment specifically talked about a failed credit card payment or no rooms left in the hotel, so let&#8217;s start with the credit card thing:</p>
<p>In my last post I talked about collecting guest and credit card information from the user as a part of the &#8220;checkout&#8221; process when making a reservation for a hotel room. Just to be clear &#8211; there is a final &#8220;confirm your reservation&#8221; step that happens after all information has been collected.</p>
<p>What this means is that we aren&#8217;t actually charging the customer&#8217;s card when we collect that data, therefore there is no real issue with a failed credit card payment that needs to be handled by the client-side javascript. When the customer confirms their reservation, yes, there might be a failure when charging the card though there are only some specific types of rates for which the hotel charges your card when you make a reservation. </p>
<p>In general, failed credit card payments are handled pretty much the same way for all ecommerce &#8211; an email is sent to the customer asking for an alternative form of payment, also saying that their purchase won&#8217;t be processed until payment is made.</p>
<p>In any case, it is only after the reservation is placed that the responsible service would publish an event about that. The service which collected the credit card information would be subscribed to that event and initiate the charge of the card when that event arrives (or not, depending on the rate rules mentioned). </p>
<p>With regards to there not being any rooms left, well, first of all, there&#8217;s overbooking &#8211; hotels accept more reservations than rooms available because they know that customers sometimes need to cancel, and some just don&#8217;t show up. Secondly, there is a manual compensation process if more people show up than there are actual rooms to put them in. In some cases, a hotel will bump you up to a higher class of room (assuming there aren&#8217;t too many reservations for those), and in others they will call a &#8220;partner&#8221; hotel nearby and put you up there instead.</p>
<h3>In summary</h3>
<p>While arguments can be made that yes, these issues have been addressed in this specific example, there may be other domains where it is not possible to do these kinds of &#8220;tricks&#8221;. Although I do agree with that in theory, I&#8217;ve spent the better part of 5 years travelling around the world talking to hundreds of people in quite a few business domains, and every single time I&#8217;ve found it possible to apply these principles.</p>
<p>In short, the use of UI composition allows services to collect their own data, making it so anything outside that service doesn&#8217;t depend on those data structures which makes both development and versioning much easier. Technical failure conditions can be mitigated at infrastructure levels in most cases and other business logic concerns can be addressed asynchronously with respect to the data collection.</p>
<p>Give it a try.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=lXlSdyOlOBw:npFDYb6-UcU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=lXlSdyOlOBw:npFDYb6-UcU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=lXlSdyOlOBw:npFDYb6-UcU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=lXlSdyOlOBw:npFDYb6-UcU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=lXlSdyOlOBw:npFDYb6-UcU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/lXlSdyOlOBw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/07/09/ui-composition-vs-server-side-orchestration/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/07/09/ui-composition-vs-server-side-orchestration/</feedburner:origLink></item>
		<item>
		<title>UI Composition Techniques for Correct Service Boundires</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/sg9kjrkUrmE/</link>
		<comments>http://www.udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/#comments</comments>
		<pubDate>Sat, 23 Jun 2012 13:04:00 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1803</guid>
		<description><![CDATA[One of the things which often throws people off when looking to identify their service boundaries is the UI design. Even those who know that the screen a user is looking at is the result of multiple services working together sometimes stumble when dealing with forms that users enter data into.
Let&#8217;s take for example a [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="Prism" src="http://al-chemist.info/sites/default/files/prism.jpg" title="Prism" width="250" height="192" style="float:right; margin-left:10px; margin-bottom:10px;"/>One of the things which often throws people off when looking to identify their service boundaries is the UI design. Even those who know that the screen a user is looking at is the result of multiple services working together sometimes stumble when dealing with forms that users enter data into.</p>
<p>Let&#8217;s take for example a screen from the Marriott.com online reservation system (below). This screen collects information about the guest staying at the hotel (name, phone number, address, etc) and credit card information.</p>
<p><img src="http://www.udidahan.com/wp-content/uploads/marriott.png" alt="marriott" title="marriott" width="547" height="829" class="alignnone size-full wp-image-1806" /></p>
<p>While we might have wanted to keep guest information in a separate service from the credit card information (which may very well be the corporate card of someone responsible for travel), the above screen would seem to indicate that the data would be collected together, validated together, and would also have to be processed together.</p>
<h3>The traditional way</h3>
<p>In standard layered architectures you would have all the data submitted by the user passed in a single call from a controller to some &#8220;service layer&#8221; (possibly running on a different machine), which would then persist that data in one transaction.</p>
<p>Even if some attempt was made to separate things out, there likely would be some &#8220;orchestration service&#8221; that received the full set of data and it would make calls to the other &#8220;services&#8221;, passing in the specific data that each &#8220;service&#8221; is responsible for.</p>
<p>I am putting quotes around the word &#8220;service&#8221; to indicate that I don&#8217;t consider these proper services in the SOA sense (as they lack the necessary autonomy) &#8211; they are more like functions or procedures, whether or not they&#8217;re invoked XML over HTTP is besides the point.</p>
<h3>What to do?</h3>
<p>Like so many other things, the solution is simple but a bit counter-intuitive as it doesn&#8217;t follow the way most web development is done, i.e. one submit button => one call to the server.</p>
<p>Let&#8217;s say the &#8220;Red&#8221; service is responsible for guest information and the &#8220;Blue&#8221; service is responsible for credit card data. In this case, each service would have its own javascript come done with the page and that script would register itself for a callback on the click of the submit button. Each service would take the data the user entered into its part of the page and independently make a call to &#8220;the&#8221; server (could be to 2 separate servers) where the data is persisted (potentially to 2 different databases).</p>
<p>This raises other questions, of course.</p>
<p>Now that the data submitted is being processed in 2 transactions rather than just one, we may need to figure out how to correlate the data. In this specific case, it&#8217;s not such a big deal as there is no direct relationship between the guest and the credit card &#8211; both need to be independently correlated to some reservation ID.</p>
<p>That reservation ID would likely have been &#8220;created&#8221; on a button click on a previous screen by some other service. The reason why I put the word &#8220;created&#8221; in quotes is that this could be as simple as having the client generate a new GUID and put that in a cookie (which would cause the reservation ID to end up being submitted along with subsequent requests). Another alternative would be to put the reservation ID in the session.</p>
<p>It&#8217;s quite possible that the reservation ID would only be persisted much later in the service that owns it when the user actually confirms the reservation on the website.</p>
<p>In any case, what we can see is that each of the commands of our respective services can now be processed independently of the others in an entirely asynchronous fashion thus vastly improving the autonomy of our services.</p>
<h3>Some words on CQRS</h3>
<p>This style of UI composition where services leverage javascript code running in the browser isn&#8217;t technically difficult in the slightest. The rest of the implementation of each service &#8211; having a controller that takes that data and passes it on for persistence can be quite simple.</p>
<p>I&#8217;d say even more strongly, most of the time you shouldn&#8217;t need to use any fancy-dancy messaging to get that data persisted &#8211; that is, unless you&#8217;re still stuck with the big relational database behind 23 firewalls type data tier. Embrace NoSQL databases for the simplicity and scalability they provide &#8211; don&#8217;t try to re-invent that using messaging, CQRS, persistent view models, event-sourcing, and other crap.</p>
<p>There are other very valid business reasons to embrace CQRS, but they have nothing to do with persistence.</p>
<p>Also notice, this is all happening within a service boundary / bounded context.</p>
<h3>In closing</h3>
<p>If you aren&#8217;t leveraging these types of composite UI techniques, it&#8217;s quite likely that your service boundaries aren&#8217;t quite right. Do be aware of the UI design and use it to inform your choices around boundaries, but be aware of certain programming &#8220;best practices&#8221; that may lead you astray with your architecture.</p>
<p>Also, if you&#8217;re planning on coming to my <a href="http://www.eventbee.com/v/nservicebus/event?eid=946408325">course in Toronto</a> to learn more about these topics, just wanted to let you know that there&#8217;s one week left for the early-bird discount.</p>
<p>Finally, it&#8217;s good I have a birthday that comes around once a year to remind me that my time here isn&#8217;t unlimited and that I had better get off my rear and do something meaningful with the time I do have. If you get value from these posts, leave a comment or send me a tweet to let me know &#8211; it does wonders for my motivation.</p>
<p>Thanks a bunch.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=sg9kjrkUrmE:zS4IpwUJhSg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=sg9kjrkUrmE:zS4IpwUJhSg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=sg9kjrkUrmE:zS4IpwUJhSg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=sg9kjrkUrmE:zS4IpwUJhSg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=sg9kjrkUrmE:zS4IpwUJhSg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/sg9kjrkUrmE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/</feedburner:origLink></item>
		<item>
		<title>Summer Courses and User Group Presentations</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/a3SWu5pUDw4/</link>
		<comments>http://www.udidahan.com/2012/06/05/summer-courses-and-user-group-presentations/#comments</comments>
		<pubDate>Tue, 05 Jun 2012 10:40:42 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Courses]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1797</guid>
		<description><![CDATA[As I make my way to the Norwegian Developers Conference, I thought I&#8217;d post some other upcoming community events you might be interested in attending &#8211; depending on where you are.
In June, Andreas Ohlund will be teaching the Enterprise Development with NServiceBus course in London (details here) and on Wednesday June 27 he&#8217;ll be giving [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.udidahan.com/wp-content/uploads/summer.png" alt="summer" title="summer" width="150" height="206" style="float:right; margin-left:5px; margin-bottom:5px;" />As I make my way to the Norwegian Developers Conference, I thought I&#8217;d post some other upcoming community events you might be interested in attending &#8211; depending on where you are.</p>
<p>In June, Andreas Ohlund will be teaching the Enterprise Development with NServiceBus course in London (details <a href="http://skillsmatter.com/course/open-source-dot-net/udi-dahan-nservicebus-workshop/ud-886">here</a>) and on Wednesday June 27 he&#8217;ll be giving a user group presentation &#8211; Death to the Batch Job (details <a href="http://skillsmatter.com/podcast/design-architecture/death-batch-job/js-4409">here</a>).</p>
<p>In the beginning of July I&#8217;ll be in London delivering my Advanced Distributed Systems Design course (details <a href="http://skillsmatter.com/course/design-architecture/advanced-distributed-systems-design-with-soa/ud-886">here</a>) and on Monday evening (July 2) will be giving a talk about Command, Queries, and Consistency (details <a href="http://skillsmatter.com/podcast/design-architecture/udidahan-cqrs/js-4408">here</a>).</p>
<p>Towards mid-July I&#8217;ll be giving the same course in Israel (details <a href="http://www.sela.co.il/syl/Syllabus.aspx?CourseCode=AdvDistDahan&#038;CategoryID=165">here</a>) and giving my &#8220;Who needs a service bus anyway?&#8221; talk on Wednesday July 18th to the Israel .NET Developers User Group &#8211; details <a href="http://idndug-jul-2012.eventbrite.com/">here</a>.</p>
<p>Hope you can make it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=a3SWu5pUDw4:whI_hVJqsak:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=a3SWu5pUDw4:whI_hVJqsak:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=a3SWu5pUDw4:whI_hVJqsak:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=a3SWu5pUDw4:whI_hVJqsak:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=a3SWu5pUDw4:whI_hVJqsak:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/a3SWu5pUDw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/06/05/summer-courses-and-user-group-presentations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/06/05/summer-courses-and-user-group-presentations/</feedburner:origLink></item>
		<item>
		<title>ADSD Toronto 2012 Registration Open</title>
		<link>http://feedproxy.google.com/~r/UdiDahan-TheSoftwareSimplist/~3/C26wIws19hk/</link>
		<comments>http://www.udidahan.com/2012/05/30/adsd-toronto-2012-registration-open/#comments</comments>
		<pubDate>Wed, 30 May 2012 13:05:46 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Courses]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/?p=1792</guid>
		<description><![CDATA[Dates:     Aug 13-17
Location: Rostie Group &#8211; 11th floor, 20 Bay Street Toronto ON
Although the prices has gone up a bit to meet the rates of my training partners, I&#8217;m including the video recording of the course in the price so that you&#8217;ll have a complete reference to go back to after [...]]]></description>
			<content:encoded><![CDATA[<p>Dates:     Aug 13-17<br />
Location: Rostie Group &#8211; 11th floor, 20 Bay Street Toronto ON</p>
<p>Although the prices has gone up a bit to meet the rates of my training partners, I&#8217;m including the video recording of the course in the price so that you&#8217;ll have a complete reference to go back to after the course is over.</p>
<p>Hope to see you there.</p>
<p><a href="http://www.eventbee.com/v/nservicebus/event?eid=946408325">Register here</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=C26wIws19hk:XmHkTPXMnNc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=C26wIws19hk:XmHkTPXMnNc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=C26wIws19hk:XmHkTPXMnNc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?a=C26wIws19hk:XmHkTPXMnNc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/UdiDahan-TheSoftwareSimplist?i=C26wIws19hk:XmHkTPXMnNc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UdiDahan-TheSoftwareSimplist/~4/C26wIws19hk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2012/05/30/adsd-toronto-2012-registration-open/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.udidahan.com/2012/05/30/adsd-toronto-2012-registration-open/</feedburner:origLink></item>
	</channel>
</rss>
