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

<channel>
	<title>Udi Dahan - The Software Simplist &#187; REST</title>
	<atom:link href="http://www.udidahan.com/category/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.udidahan.com</link>
	<description>Enterprise Development Expert &#38; SOA Specialist</description>
	<lastBuildDate>Sun, 08 Jan 2012 12:45:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building Super-Scalable Web Systems with REST</title>
		<link>http://www.udidahan.com/2008/12/29/building-super-scalable-web-systems-with-rest/</link>
		<comments>http://www.udidahan.com/2008/12/29/building-super-scalable-web-systems-with-rest/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 21:38:58 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/2008/12/29/building-super-scalable-web-systems-with-rest/</guid>
		<description><![CDATA[I&#8217;ve been consulting with a client who has a wildly successful web-based system, with well over 10 million users and looking at a tenfold growth in the near future. One of the recent features in their system was to show users their local weather and it almost maxed out their capacity. That raised certain warning [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been consulting with a client who has a wildly successful web-based system, with well over 10 million users and looking at a tenfold growth in the near future. One of the recent features in their system was to show users their local weather and it almost maxed out their capacity. That raised certain warning flags as to the ability of their current architecture to scale to the levels that the business was taking them.</p>
<p> <center><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="139" alt="danger" src="http://www.udidahan.com/wp-content/uploads/image51.png" width="408" border="0"></center>
</p>
<h3>On Web 2.0 Mashups</h3>
<p>One would think that sites like Weather.com and friends would be the first choice for implementing such a feature. Only thing is that they were strongly against being mashed-up Web 2.0 style on the client &#8211; they had enough scalability problems of their own. Interestingly enough (or not), these partners were quite happy to publish their weather data to us and let us handle the whole scalability issue.</p>
<h3>Implementation 1.0</h3>
<p>The current implementation was fairly straightforward &#8211; client issues a regular web service request to the GetWeather webmethod, the server uses the user&#8217;s IP address to find out their location, then use that location to find the weather for that location in the database, and return that to the user. Standard fare for most dynamic data and the way most everybody would tell you to do it.</p>
<p>Only thing is that it scales like a dog.</p>
<h3>Add Some Caching</h3>
<p>The first thing you do when you have scalability problems and the database is the bottleneck is to cache, well, that&#8217;s what everybody says (same everybody as above).</p>
<p>The thing is that holding all the weather of the entire globe in memory, well, takes a lot of memory. More than is reasonable. In which case, there&#8217;s a fairly decent chance that a given request can&#8217;t be served from the cache, resulting in a query to the database, an update to the cache, which bumps out something else, in short, not a very good hit rate.</p>
<p>Not much bang for the buck.</p>
<p>If you have a single datacenter, having a caching tier that stores this data is possible, but costly. If you want a highly available, business continuity supportable, multi-datacenter infrastructure, the costs add up quite a bit quicker &#8211; to the point of not being cost effective (&#8221;You need HOW much money for weather?! We&#8217;ve got dozens more features like that in the pipe!&#8221;)</p>
<p>What we can do is to tell the client we&#8217;re responding to that they can cache the result, but that isn&#8217;t close to being enough for us to scale.</p>
<h3>Look at the Data, Leverage the Internet</h3>
<p>When you find yourself in this sort of situation, there&#8217;s really only one thing to do:</p>
<div style="border-right: black 1px solid; border-top: black 1px solid; float: right; margin-left: 5px; border-left: black 1px solid; width: 220px; border-bottom: black 1px solid; background-color: beige">
<div style="font-size: 12px; margin: 5px">
<p>In order to save on bandwidth, the most precious commodity of the internet, the various ISPs and backbone providers cache aggressively. In fact, HTTP is designed exactly for that. </p>
<p>If user A asks for some html page, the various intermediaries between his browser and the server hosting that page will cache that page (based on HTTP headers). When user B asks for that same page, and their request goes through one of the intermediaries that user A&#8217;s request went through, that intermediary will serve back its cached copy of the page rather than calling the hosting server.</p>
<p>Also, users located in the same geographic region by and large go through the same intermediaries when calling a remote site.</p>
</div>
</div>
<p>Leverage the Internet</p>
<p>The internet is the biggest, most scalable data serving infrastructure that mankind was lucky enough to have happen to it. However, in order to leverage it &#8211; you need to understand your data and how your users use it, and finally align yourself with the way the internet works.</p>
<p>Let&#8217;s say we have 1,000 users in London. All of them are going to have the same weather. If all these users come to our site in the period of a few hours and ask for the weather, they all are going to get the exact same data. The thing is that the response semantics of the GetWeather webmethod must prevent intermediaries from caching so that users in Dublin and Glasgow don&#8217;t get London weather (although at times I bet they&#8217;d like to).</p>
<h3>REST Helps You Leverage the Internet</h3>
<p>Rather than thinking of getting the weather as an operation/webmethod, we can represent the various locations weather data as explicit web resources, each with its own URI. Thus, the weather in London would be <strong>http://weather.myclient.com/UK/London</strong>.</p>
<p>If we were able to make our clients in London perform an HTTP GET on <strong>http://weather.myclient.com/UK/London</strong> then we could return headers in the HTTP response telling the intermediaries that they can cache the response for an hour, or however long we want.</p>
<p>That way, after the first user in London gets the weather from our servers, all the other 999 users will be getting the same data served to them from one of the intermediaries. Instead of getting hammered by millions of requests a day, the internet would shoulder easily 90% of that load making it much easier to scale. <a href="http://www.perkel.com/politics/gore/internet.htm">Thanks Al</a>.</p>
<p>This isn&#8217;t a &#8220;cheap trick&#8221;. While being straight forward for something like weather, understanding the nature of your data and intelligently mapping that to a URI space is critical to building a scalable system, and reaping the benefits of REST.</p>
<h3>What&#8217;s left?</h3>
<p>The only thing that&#8217;s left is to get the client to know which URI to call. A simple matter, really. </p>
<p>When the user logs in, we perform the IP to location lookup and then write a cookie to the client with their location (UK/London). That cookie then stays with the user saving us from having to perform that IP to location lookup all the time. On subsequent logins, if the cookie is already there, we don&#8217;t do the lookup.</p>
<blockquote><p>BTW, we also show the user &#8220;you&#8217;re in London, <font color="#0000ff"><strong><u>aren&#8217;t you</u></strong></font>?&#8221; with the link allowing the user to change their location, which we then update the cookie with and change the URI we get the weather from.</p>
</blockquote>
<h3>In Closing</h3>
<p>While web services are great for getting a system up and running quickly and interoperably, scalability often suffers. Not so much as to be in your face, but after you&#8217;ve gone quite a ways and invested a fair amount of development in it, you find it standing between you and the scalability you seek.</p>
<p>Moving to REST is not about turning on the &#8220;make it restful&#8221; switch in your technology stack (ASP.NET MVC and WCF, I&#8217;m talking to you). Just like with databases there is no &#8220;make it go fast&#8221; switch &#8211; you really do need to understand your data, the various users access patterns, and the volatility of the data so that you can map it to the &#8220;right&#8221; resources and URIs.</p>
<p>If you do walk the RESTful path, you&#8217;ll find that the scalability that was once so distant is now within your grasp.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/12/29/building-super-scalable-web-systems-with-rest/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>SOA, REST, and Pub/Sub</title>
		<link>http://www.udidahan.com/2008/12/15/soa-rest-and-pubsub/</link>
		<comments>http://www.udidahan.com/2008/12/15/soa-rest-and-pubsub/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 08:34:24 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[Integrated Simplicity]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Scalability]]></category>

		<guid isPermaLink="false">http://www.udidahan.com/2008/12/15/soa-rest-and-pubsub/</guid>
		<description><![CDATA[From Integrated Simplicity:
 
The question of how web-based (or 3rd party) consumers can work with pub/sub based services comes up a lot.
Many developers are used to implementing web services exposing methods on them like GetAllCustomers.
When moving to pub/sub and other more loosely coupled messaging patterns, developers look to implement the same pattern, opting for something [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.IntegratedSimplicity.com">Integrated Simplicity</a>:</p>
<p><a href="http://www.udidahan.com/wp-content/uploads/image49.png"><img style="border-right: 0px; border-top: 0px; margin: 0px 0px 10px; border-left: 0px; border-bottom: 0px" height="277" alt="SOA &amp; Web" src="http://www.udidahan.com/wp-content/uploads/image-thumb34.png" width="526" border="0"></a> </p>
<p>The question of how web-based (or 3rd party) consumers can work with pub/sub based services comes up a lot.</p>
<p>Many developers are used to implementing web services exposing methods on them like GetAllCustomers.</p>
<p>When moving to pub/sub and other more loosely coupled messaging patterns, developers look to implement the same pattern, opting for something like duplex GetCustomersRequest and GetCustomersResponse. The reasoning is simple and straightforward &#8211; it is difficult to push data over the web to consumers.</p>
<p>However, there are still ways to disconnect the preparation of the data from its usage thus gaining many of the advantages of pub/sub.</p>
<p>By employing REST principles and modelling our customer list as an explicit resource, web-based consumers would simply perform regular HTTP GET operations on the URI to get the list of customers.</p>
<p>The resource itself could be a simple XML file &#8211; it wouldn&#8217;t need to be dynamic at all.</p>
<p>You can get all the scalability benefits of pub/sub for web based consumers. All you need is a bit of REST <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/12/15/soa-rest-and-pubsub/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>QCon London 2008 Recap</title>
		<link>http://www.udidahan.com/2008/03/20/qcon-london-2008-recap/</link>
		<comments>http://www.udidahan.com/2008/03/20/qcon-london-2008-recap/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 09:07:06 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[OO]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/03/20/qcon-london-2008-recap/</guid>
		<description><![CDATA[Well QCon was a blast.
NServiceBus Tutorial
I gave a full day tutorial on nServiceBus and we had a full house! The tutorial was about 90% how to think about distributed systems, and 10% mapping those concepts onto nServiceBus. I made an effort to cram about 3 days of a 5 day training course I give clients [...]]]></description>
			<content:encoded><![CDATA[<p>Well QCon was a blast.</p>
<h3>NServiceBus Tutorial</h3>
<p>I gave a full day tutorial on <a href="http://www.nservicebus.com">nServiceBus</a> and we had a full house! The tutorial was about 90% how to think about distributed systems, and 10% mapping those concepts onto nServiceBus. I made an effort to cram about 3 days of a 5 day training course I give clients into one day, but I think I was only about 85% successful. People didn&#8217;t have the time needed to let things really sink in and ask questions, but the <a href="http://tech.groups.yahoo.com/group/nservicebus/">lively forums</a> and <a href="http://udidahan.weblogs.us/2008/02/25/would-you-spend-a-buck-to-save-a-hundred/">skype conversations</a> available will probably do the trick.</p>
<p><a href="http://jim.webber.name/">Jim Webber</a> after looking at the unit testing features of nServiceBus had this to say:</p>
<blockquote><p>&#8220;Oh my God &#8211; you&#8217;ve created testable middleware! It&#8217;ll never catch on. The vendors won&#8217;t have it.&#8221;</p>
</blockquote>
<p>To which I replied that several vendors were already coming on board with their own implementations of transports and saga persistence. I have absolutely no intention, desire, or (quite frankly) the ability to write an enterprise-class middleware runtime. All I hope to do with nServiceBus is to make it so that developers use what&#8217;s out there in one, middleware-product-agnostic way that will make their code more robust and flexible.</p>
<h3>MEST &amp; Mark &#8211; REST &amp; Stefan</h3>
<p>It was also great finally meeting the head MESTian, <a href="http://markclittle.blogspot.com/">Mark Little</a>, who also happens to work for Redhat as SOA Technical Development Manager and Director of Standards in the JBoss division. It was interesting to see the difference between how I went about messaging in nServiceBus (full peer-to-peer including pub/sub) whereas most of the Java world has the messaging infrastructure handled by something database-like in a deployment/networking kind of perspective. If that&#8217;s the way things are done, then I can definitely appreciate the advantages of <a href="http://udidahan.weblogs.us/2007/06/20/space-based-architecture-%e2%80%93-scalable-but-not-much-to-do-with-soa/">Space-Based Architectures</a>.</p>
<p>And I even got to steal <a href="http://www.innoq.com/blog/st/">Stefan Tilkov</a>&#8217;s RESTful ear for an hour or so before I had to jet back home. It looks like we MESTians and RESTians can be one big happy family. I&#8217;m guessing that our despise of WS connects us all at a deeper level <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Core Design Principles</h3>
<p>I also gave a talk about core design principles, &#8220;Intentions &amp; Interfaces &#8211; making patterns concrete&#8221;, and it went over very well especially considering that that was the first time that I gave that talk. You can find the slides <a href="http://www.eos1.dk/qcon-london-2008/slides/UdiDahan_IntentionsAndInterfaces.pdf">here</a>. From the feedback I heard after the talk, I think many people were surprised how many different parts of a system can be designed this way, and how flexible it is without making the code any more complex. The message was this:</p>
<blockquote><p>Make Roles Explicit</p>
</blockquote>
<p>Despite its simplicity, that leads to IEntity, IValidator&lt;T&gt; where T : IEntity, (which I wrote about a year ago &#8211; <a href="http://udidahan.weblogs.us/2007/04/30/generic-validation/">generic validation</a>) and with a bit of Service Locator capabilities, you can add a line of code to your infrastructure that will validate all entities before they&#8217;re sent from the client to the server. </p>
<p>It leads to IFetchingStrategy&lt;T&gt; for improved database loading performance (also a year old &#8211; <a href="http://udidahan.weblogs.us/2007/03/06/better-domain-driven-design-implementation/">better DDD implementation</a> and the <a href="http://udidahan.weblogs.us/2007/09/16/fetching-strategy-nhibernate-implementation-available/">NHibernate implementation</a>). </p>
<p>It&#8217;s also how nServiceBus does message handling &#8211; IMessage, IMessageHandler&lt;T&gt; where T: IMessage, ISaga&lt;T&gt; where T : IMessage.</p>
<h3>San Francisco?</h3>
<p>Just a quick shout to my readers in the San Francisco area, if you&#8217;d be interested in hearing these talks/tutorials, give the organizers of QCon a <a href="mailto:qcon@infoq.com">shout</a> and they&#8217;ll bring me out. That&#8217;s actually what got me to London &#8211; one of the attendees of a talk I gave at Oredev in Sweden last November missed my tutorial there so he put in a request and that did it. (Thanks Jan, I appreciate it!)</p>
<p>If you&#8217;re in a different part of the world and you&#8217;d like to have me give one of these talks, or other ones (I have a fair amount of material on Domain Models/DDD and Occasionally Connected Smart Clients), I&#8217;d be happy to make the trip and see you there as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/03/20/qcon-london-2008-recap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[Podcast] REST + Messaging = Enterprise Solutions</title>
		<link>http://www.udidahan.com/2008/03/16/podcast-rest-messaging-enterprise-solutions/</link>
		<comments>http://www.udidahan.com/2008/03/16/podcast-rest-messaging-enterprise-solutions/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 12:40:02 +0000</pubDate>
		<dc:creator>udidahan</dc:creator>
				<category><![CDATA[Ask Udi Podcast]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Messaging]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2008/03/16/podcast-rest-messaging-enterprise-solutions/</guid>
		<description><![CDATA[In this podcast we revisit the topic of REST and how to make it work for process-centric enterprise systems. After describing the basic advantages and pitfalls of plain resource thinking, we&#8217;ll look at how mapping messaging concepts to resources provides solutions for transactional, multi-resource processing.
&#160;
Download

Download via the Dr. Dobb’s site
Or download directly here.

Additional References

Podcast: &#8220;REST [...]]]></description>
			<content:encoded><![CDATA[<p>In this podcast we revisit the topic of REST and how to make it work for process-centric enterprise systems. After describing the basic advantages and pitfalls of plain resource thinking, we&#8217;ll look at how mapping messaging concepts to resources provides solutions for transactional, multi-resource processing.
<p>&nbsp;<br />
<h3>Download</h3>
<blockquote>
<p><a href="http://www.ddj.com/architect/206903485">Download via the Dr. Dobb’s site</a></p></blockquote>
<blockquote><p>Or download directly <a href="http://www.dobbsprojects.com/media/newengine/dynamp.php/080313ud01.mp3?podcast=080313ud01.mp3">here</a>.</p>
</blockquote>
<h3>Additional References</h3>
<ul>
<li><a href="http://udidahan.weblogs.us/2006/07/21/podcastthe-rest-vs-web-services-debate/">Podcast: &#8220;REST vs Web Services Debate&#8221; </a>
<li><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST Definition</a>
<li><a href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/top.htm">Roy Fielding&#8217;s Thesis: &#8220;Architectural Styles and the Design ofNetwork-based Software Architectures&#8221;</a></li>
<li><a href="http://en.wikipedia.org/wiki/HTTP_ETag">ETag Definition</a></li>
</ul>
<h3>Want more?</h3>
<blockquote><p>Check out the <a href="http://udidahan.weblogs.us/ask-udi/">“Ask Udi”</a> archives.</p>
</blockquote>
<h3>Got a question?</h3>
<blockquote><p><a href="mailto:podcast@UdiDahan.com">Send Udi your question to answer on the show.</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2008/03/16/podcast-rest-messaging-enterprise-solutions/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
<enclosure url="http://www.dobbsprojects.com/media/newengine/dynamp.php/080313ud01.mp3?podcast=080313ud01.mp3" length="0" type="audio/mp3" />
		</item>
		<item>
		<title>No such thing as a centralized ESB</title>
		<link>http://www.udidahan.com/2007/06/30/no-such-thing-as-a-centralized-esb/</link>
		<comments>http://www.udidahan.com/2007/06/30/no-such-thing-as-a-centralized-esb/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 13:09:55 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[Availability]]></category>
		<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SCA & SDO]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/06/30/no-such-thing-as-a-centralized-esb/</guid>
		<description><![CDATA[Via David McGhee&#8217;s Q&#038;A with Dr. Don Ferguson, but read the whole thing.

Q: Could you tell you your thoughts or preference for a distributed or centralized ESB? 
DON: there is no such thing as a centralized ESB.

This is the problem with a lot of the products that call themselves ESBs. They are centralized brokers which [...]]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://blogs.msdn.com/davidmcg/archive/2007/06/28/soa-esb-integration-in-the-real-world.aspx">David McGhee&#8217;s Q&#038;A</a> with <a href="http://www.microsoft.com/presspass/exec/techfellow/Ferguson/default.mspx">Dr. Don Ferguson</a>, but read the whole thing.</p>
<blockquote><p>
Q: Could you tell you your thoughts or preference for a distributed or centralized ESB? </p>
<p>DON: there is no such thing as a centralized ESB.
</p></blockquote>
<p>This is the problem with a lot of the products that call themselves ESBs. They are centralized brokers which may be clustered for availability. But they are in no way an implementation of the Bus Architectural Pattern. Please check this before cutting a check to your vendor.</p>
<p>Also, understand that if you do security related things in your ESB, possibly as a part of your routing rules, that if the security infrastructure is centralized that means your ESB is too. Even if it really was distributed to begin with.</p>
<p>Buyer beware.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/06/30/no-such-thing-as-a-centralized-esb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DevHawk not thrilled about Astoria either</title>
		<link>http://www.udidahan.com/2007/05/25/devhawk-not-trilled-about-astoria-either/</link>
		<comments>http://www.udidahan.com/2007/05/25/devhawk-not-trilled-about-astoria-either/#comments</comments>
		<pubDate>Fri, 25 May 2007 07:56:28 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/05/25/devhawk-not-trilled-about-astoria-either/</guid>
		<description><![CDATA[It appears that more people are coming to the same conclusions that I have about Astoria (Astoria, SDO, and Irrelevance), Microsoft&#8217;s new &#8220;Data Services for the Web&#8221; initiative.
DevHawk (aka Harry Pierson) writes:

As you might guess then, I’m not a fan of Astoria. I believe the sweet spot for so called “data services” will be read [...]]]></description>
			<content:encoded><![CDATA[<p>It appears that more people are coming to the same conclusions that I have about Astoria (<a href="http://udidahan.weblogs.us/2007/05/01/astoria-sdo-and-irrelevance/">Astoria, SDO, and Irrelevance</a>), Microsoft&#8217;s new &#8220;Data Services for the Web&#8221; initiative.</p>
<p>DevHawk (aka Harry Pierson) <a href="http://devhawk.net/2007/05/24/REST+Is+Neither+CRUD+Nor+CRAP.aspx">writes</a>:</p>
<blockquote><p>
As you might guess then, I’m not a fan of Astoria. I believe the sweet spot for so called “data services” will be read only (because they don&#8217;t need transactions, natch). I&#8217;m sure there are some read/write scenarios Astoria will be useful for, but I think they will be limited &#8211; at least within the enterprise.
</p></blockquote>
<p>After catching up to <a href="http://blogs.msdn.com/pablo/">Pablo Castro</a> (the man behind Astoria) at <a href="http://www.DevTeach.com">DevTeach</a>, and chatting with him and <a href="http://blogs.msdn.com/timmall/">Tim Mall</a> about Astoria, I heard something interesting. In order to provide business context for updates, you will be able to use something like a WS-Action header.</p>
<p>So, it&#8217;s based on REST, but for updates, it&#8217;s like WS-*. Hmm&#8230; Best of both worlds, or worst? What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/05/25/devhawk-not-trilled-about-astoria-either/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Database Level Conflict Resolution with Astoria</title>
		<link>http://www.udidahan.com/2007/05/10/db-level-conflict-resolution-with-astoria/</link>
		<comments>http://www.udidahan.com/2007/05/10/db-level-conflict-resolution-with-astoria/#comments</comments>
		<pubDate>Thu, 10 May 2007 14:09:06 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/05/10/db-level-conflict-resolution-with-astoria/</guid>
		<description><![CDATA[Following up on my recent post about the concurrency problems that we&#8217;re heading for with Astoria, and the way to avoid it by using business-level update semantics, I wanted to round out the picture. 
If we were to let clients handle transaction management, we would end up in a situation where database server resources would [...]]]></description>
			<content:encoded><![CDATA[<p>Following up on my <a href="http://udidahan.weblogs.us/2007/05/01/astoria-sdo-and-irrelevance/">recent post about the concurrency problems that we&rsquo;re heading for with Astoria</a>, and <a href="http://udidahan.weblogs.us/2007/01/22/realistic-concurrency/">the way to avoid it by using business-level update semantics</a>, I wanted to round out the picture. </p>
<p>If we were to let clients handle transaction management, we would end up in a situation where database server resources would be tied up by clients over slow connections, or transactions timing out when those clients had some connectivity issues or just crashed themselves. It will be practically impossible to <a href="http://udidahan.weblogs.us/category/scalability/">build a scalable system this way</a>.</p>
<p>The problem is that we&rsquo;re left with no way to tie multiple reads, inserts, updates, and deletes together. Once again, there will be cases where clients will be unable to complete their unit of work because of failures. The unfortunate result is that our database may get into an inconsistent state.</p>
<p>Luckily, I ran into a <a href="http://blogs.msdn.com/synchronizer/archive/2007/05/08/avoiding-false-conflicts-resulting-from-interrupted-sync.aspx">post on the MSDN blogs showing that it is possible to fix these conflicts</a>. It just requires that you write your most complex logic in SQL, a language designed for set manipulation. Apparently, even though the logic runs in the database, it doesn&rsquo;t perform that well either. I hope you&rsquo;re either really good at this kind of coding, don&rsquo;t need to scale, or can have an inconsistent database if you&rsquo;re planning on using Astoria for any kind of transactional work.</p>
<p>This is not to say that using Astoria for <a href="http://udidahan.weblogs.us/category/rest/">REST style</a> GET actions is bad. On the contrary, I love the scalability of GET, well, over HTTP anyway. I just don&rsquo;t think that we need a new technology for it &ndash; HTTP GET works just fine, both as an API and an imp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/05/10/db-level-conflict-resolution-with-astoria/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Does REST simplify communication more than SOA?</title>
		<link>http://www.udidahan.com/2007/05/01/does-rest-simplify-communication-more-than-soa/</link>
		<comments>http://www.udidahan.com/2007/05/01/does-rest-simplify-communication-more-than-soa/#comments</comments>
		<pubDate>Tue, 01 May 2007 06:43:08 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/05/01/does-rest-simplify-communication-more-than-soa/</guid>
		<description><![CDATA[From a somewhat old email discussion I had with Benjamin Carlyle:
> A while ago I tried to explain the difference between SOA and REST is
> that SOA is based on &#8220;MEST&#8221; &#8211; MESsage Transfer. The main thing is the
> message &#8211; which is a statement of intent, and includes the relevant
> data for that intent. [...]]]></description>
			<content:encoded><![CDATA[<p>From a somewhat old email discussion I had with <a href="http://soundadvice.id.au/blog/">Benjamin Carlyle</a>:</p>
<p>> A while ago I tried to explain the difference between SOA and REST is<br />
> that SOA is based on &#8220;MEST&#8221; &#8211; MESsage Transfer. The main thing is the<br />
> message &#8211; which is a statement of intent, and includes the relevant<br />
> data for that intent. For instance, a message like<br />
> ChangeCustomerAddressMessage is itself the intent; the data it<br />
> carries, the customer ID and the new address completes the picture.</p>
<p>Ahh. This puts your name in context for me. I did some reading on MEST some time ago. I think that there are probably a few misunderstandings on both sides of the fence still about what the other is all about. I have recently been reading &#8220;Software Factories&#8221;, ISBN 0-471-20284-3. It takes the view of a service being a software component. Code usable in different software environments that has enough self-description to be accessed from multiple languages and runtimes. This sets up services as platform-independent objects.</p>
<p>I think I understand this evolution and the corresponding object patters that are encoded into WS standards. Essentially, SOA attempts to make objects more accessible. REST is quite a different beast. Its primary function is to allow communication to evolve.</p>
<p>> The main difference between this style and REST is that where REST is<br />
> focusing on one resource, SOA/MEST style accept that fact that as a<br />
> result in the change of address, the customer may now be in a &#8220;rich<br />
> neighbourhood&#8221;, and his customer rep now has over X people in rich<br />
> neighborhoods, so the customer rep&#8217;s status changes. This cascading of<br />
> changes I believe is done in orchestration/choreography type code outside of the resource in REST.<br />
> Such complex business logic is best implemented using OO models which<br />
> span objects/entities/resources.</p>
<p>I think this is a common misunderstanding. Each resource demarcates a subset of an application&#8217;s state. Resources are likely to overlap. When one resource is updated, it is likely that other resources will also change. This is not well ennunciated by REST proponents who are far more focused on the other side of the exchange, that between client and server. In REST, your ChangeCustomerAddressMessage sent to object A would be a PUT of a customer address record over the top of the old one, at resource http://example.com/customer1.</p>
<p>I see REST as a tweak to the object model. Instead of having a base-class that defines methods and data to be transferred, REST decouples the definition of methods and data. The intention is that the set of methods, the set of data definitions, and the set of objects<br />
(resources) can evolve independently of each other. This tweak does not change existing capabilities of the object model. Objects work pretty-much as before, but their interface to clients and the definition of their interface is modified.</p>
<p>The effect of the decoupling is that methods can be understood separately to data and to objects. For example, I can determine what a GET or PUT request is going to do to a resource regardless of the object the method is applied to. As an intermediatary I can operate as a caching proxy, or apply security policy appropriately. I see this like the jump to java beans. Some programmers were downright offended that they had to name their methods with &#8220;get&#8221; and &#8220;set&#8221; in order to get the architecture working, however the advantages are now so clear that the issue simply doesn&#8217;t come up anymore.</p>
<p>REST is about building a communicatons infrastructure that scales to a large number of participants who want different things from their architecture over time. At a technical level there are significant performance advantages to be gained by caching and other features, but at a social level it makes the definition of new interfaces simpler and allows them to change over time without disrupting the architecture as a whole. New methods can be introduced over time. New content types can be introduced over time. Old features can be supported simultaneously to new.</p>
<p>> It is this model of message/document based communication that isn&#8217;t<br />
> very well supported by WSDL. Support for publish/subscribe semantics<br />
> is also vary light in the WS world. This is the main reason why I see<br />
> SOA as something outside of WS. I don&#8217;t see this as a &#8220;nod&#8221; to REST<br />
> but a coherent architectural style that been employed long before the web.</p>
<p>Support for pub/sub is also pretty light in the REST world, something I have mind to do something about <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>> As for scalability, it&#8217;s very easy to scale the publishing of static<br />
> html pages, it is an entire other thing to scale complex business<br />
> logic that may have huge working sets of data. To tell you the truth,<br />
> I&#8217;d be interested in seeing the design of such a system in terms of<br />
> REST, specifically in how transactions are handled.</p>
<p>Transactions in REST are usually handled by demarcating all of the state that will be updated in a single resource, and PUTting a representation of that state to the resource. REST is usually applied at a chunky enough level that this makes sense. There is always the expectation in REST that objects or RDBMS or some other back-end technology does the work of making the updates.</p>
<p>There are other ways to handle transactions in REST, but they usually don&#8217;t come up. Again, it is a matter of scale and the level of abstraction. REST is a client-facing communications model. It isn&#8217;t necessarily useful for communication between services within the same tier. It may also be that the tier that presents a REST world view hides further tiers that use distributed object technologies.</p>
<p>> Anyway, that&#8217;s where I&#8217;m coming from. I think that the communications<br />
> semantics of SOA &#8211; send a message, are just about as simple as it<br />
> gets. It is, if anything, more minimalistic than REST.</p>
<p>I think that you are right about minimalism, at least after a fashion.<br />
With WS-* or even corba, it is easy enough to make two programs work like one in an enclosed environment. REST is really about a larger-scale communications system where not all of the participants are part of the same organisation. It is about forging agreement on the larger scale, not an easy thing to do. However, I think that REST scales down better than SOA scales up. It is no harder to define special-purpose XML formats than it is to define a base-class, although defining all appropriate resources is probably starting to make life too difficult.</p>
<p>My organisation integrates disparate systems. It is about 50% of the work we do on a job. In this environment REST is a valuable tool in making things work with each other over long periods of time, and exposing the data of one system to another for viewing and update.</p>
<p>Orignal message:<br />
> I&#8217;m quite interested in expanding my knowledge of SOA best practices.<br />
> As I noted in the entry you refer to that my list is derived from a<br />
> presentation by Sun Microsystems, the slides of which may be found <a<br />
> href=&#8221;http://au.sun.com/events/developer/downloads/download.html?s_dLi<br />
> nk=SOA _JBI_BPEL.pdf&#8221;>here</a>. I often hear that SOA is an<br />
> architectural style rather than a name for the WS-* stack, however it<br />
> is hard to come to terms with what those principles are given the<br />
> variety of views on the subject.<br />
><br />
> It seems that many SOA proponents who are familiar with REST take a<br />
> number of their particular constraints from REST itself. If those<br />
> individuals are to be taken as the litmus test, SOA is generally a<br />
> superset of REST that allows for less uniformity. In other words it<br />
> looks like a version of REST that doesn&#8217;t scale up to such big network<br />
> sizes. Vendors seem to see SOA differently, the message-bus focus I<br />
> referred to in my entry.<br />
><br />
> I would also like to note that the main focus of the title was on the<br />
> principle difference that I percieve there to be between SOA and REST:<br />
> the nature of the uniform interface. Even if you take your web<br />
> services and try to construct a uniform interface, you do so as a<br />
> base-class that encapsulates both verbs and content types. REST<br />
> decouples these. I think the same is possible as document-oriented<br />
> processing under web servcies, however this again seems to be a nod to<br />
> REST rather than an alternative to REST practice.<br />
><br />
> Do you have a specific list of constrains you yourself like to point<br />
> to as the meaning of SOA?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/05/01/does-rest-simplify-communication-more-than-soa/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Astoria, SDO, and irrelevance</title>
		<link>http://www.udidahan.com/2007/05/01/astoria-sdo-and-irrelevance/</link>
		<comments>http://www.udidahan.com/2007/05/01/astoria-sdo-and-irrelevance/#comments</comments>
		<pubDate>Tue, 01 May 2007 06:26:24 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Data Access]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SCA & SDO]]></category>

		<guid isPermaLink="false">http://udidahan.weblogs.us/2007/05/01/astoria-sdo-and-irrelevance/</guid>
		<description><![CDATA[At MIX, Microsoft announced the coming of a new &#8220;technology&#8221; code-named &#8220;Astoria&#8221; with the following purpose in mind:

The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the internet. The data service is reachable over [...]]]></description>
			<content:encoded><![CDATA[<p>At MIX, Microsoft announced the coming of a new &#8220;technology&#8221; code-named <a href="http://astoria.mslivelabs.com/">&#8220;Astoria&#8221;</a> with the following purpose in mind:</p>
<blockquote><p>
The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs such as GET, POST, PUT and DELETE, and the data exchanged in those interactions is represented in simple formats such as XML and JSON.
</p></blockquote>
<p>To me, this sounds like an unarchitected mashup of <a href="http://udidahan.weblogs.us/category/rest/">REST</a> and the irrelevant part of <a href="http://udidahan.weblogs.us/category/sca-sdo/">SDO</a>.</p>
<p>Please, Microsoft, just stop. You&#8217;re going the wrong way. We really don&#8217;t need yet another <a href="http://udidahan.weblogs.us/category/data-access/">data access</a> strategy from you.</p>
<p><a href="http://patricklogan.blogspot.com/2007/04/maybe-knot.html">Patrick Logan</a> is still waiting to see anything concrete come out before weighing in. While <a href="http://codebetter.com/blogs/sam.gentile/archive/2007/04/30/new-and-notable-163-special-mix-07-edition.aspx">Sam Gentile</a> has given it the &#8220;New and Notable&#8221; stamp. <a href="http://weblogs.asp.net/fmarguerie/archive/2007/04/30/jasper-and-astoria-projects-to-keep-an-eye-on.aspx">Fabrice Marguerie</a> will be investigating as well. And <a href="http://weblogs.asp.net/pgielens/archive/2007/04/30/restful-data-services.aspx">Paul Gielens</a> also finds the REST path worthwhile.</p>
<p>But I&#8217;ve got to say, I&#8217;ve been against these &#8220;data services&#8221; from day one. The REST style is most applicable for large, chunky resources &#8211; while this seems to be targeting single tables in the database. Look at <a href="http://udidahan.weblogs.us/2007/05/01/does-rest-simplify-communication-more-than-soa/">this discussion on REST vs SOA</a> for some examples.</p>
<p>I am skeptical but will keep watching. But, what with all these fine bloggers giving me the low-down, I&#8217;m sure we&#8217;ll be finding out the important part soon &#8211; you know, the part Microsoft doesn&#8217;t put online <img src='http://www.udidahan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2007/05/01/astoria-sdo-and-irrelevance/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>[Podcast]The REST vs. Web Services Debate</title>
		<link>http://www.udidahan.com/2006/07/21/podcastthe-rest-vs-web-services-debate/</link>
		<comments>http://www.udidahan.com/2006/07/21/podcastthe-rest-vs-web-services-debate/#comments</comments>
		<pubDate>Sat, 22 Jul 2006 03:13:21 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Ask Udi Podcast]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://wp_630.weblogs.us/archives/303</guid>
		<description><![CDATA[<a href="http://www.ddj.com/dept/webservices/190500484">Get it here</a>.
<br/><br/>
This week we brave the flames of the ongoing REST vs. Web Services debate. REST, or REpresentational State Transfer, is an architectural style founded on the simplicity of HTTP, while Web Services are, in essence, a set of specifications supported by several vendors in various phases of standardization. Join us for an examination of the benefits REST-ful thinking can bring to service oriented architectures.
<br/><br/>
Resources:
<br/><br/>
<a href="http://en.wikipedia.org/wiki/REST">Wikipedia definition of REST</a> <br/>
<a href="mailto:podcast@UdiDahan.com">Ask Udi a question on SOA</a><br/>
<a href="http://syndication.sdmediagroup.com/feeds/public/cmp_podcast_udi.xml">Subscribe to the Ask Udi podcast </a>
<br/><br/>
Enjoy.]]></description>
			<content:encoded><![CDATA[<p>This week we brave the flames of the ongoing REST vs. Web Services debate. REST, or REpresentational State Transfer, is an architectural style founded on the simplicity of HTTP, while Web Services are, in essence, a set of specifications supported by several vendors in various phases of standardization. Join us for an examination of the benefits REST-ful thinking can bring to service oriented architectures.</p>
<p><u>Resources:</u></p>
<p><a href="http://en.wikipedia.org/wiki/REST">Wikipedia definition of REST</a><br />
<a href="mailto:podcast@UdiDahan.com">Ask Udi a question on SOA</a><br />
<a href="http://syndication.sdmediagroup.com/feeds/public/cmp_podcast_udi.xml">Subscribe to the Ask Udi podcast </a></p>
<p>Get it via the Dr. Dobb&#8217;s site <a href="http://www.ddj.com/dept/webservices/190500484">here</a>.</p>
<p>Or download directly <a href="http://www.dobbsprojects.com/media/newengine/dynamp.php/060717ud01.mp3?site=sdmg&#038;affiliate=ddj&#038;target=%2Fdept%2Fwebservices%2F&#038;title=REST+vs.+Web+Service&#038;artist=Ask+Udi+Podcast&#038;album=Dr.+Dobb%27s+Portal&#038;year=2006&#038;podcast=060717ud01.mp3">here</a>.</p>
<p>Want more? Go to the <a href="/ask-udi/">&#8220;Ask Udi&#8221; archives</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2006/07/21/podcastthe-rest-vs-web-services-debate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.dobbsprojects.com/media/newengine/dynamp.php/060717ud01.mp3?site=sdmg&amp;affiliate=ddj&amp;target=%2Fdept%2Fwebservices%2F&amp;title=REST+vs.+Web+Service&amp;artist=Ask+Udi+Podcast&amp;album=Dr.+Dobb%27s+Portal&amp;year=2006&amp;podcast=060717ud01.mp3" length="3724399" type="audio/mp3" />
		</item>
		<item>
		<title>Autonomous Services &#8211; a step beyond Service Orientation</title>
		<link>http://www.udidahan.com/2006/01/08/autonomous-services-a-step-beyond-service-orientation/</link>
		<comments>http://www.udidahan.com/2006/01/08/autonomous-services-a-step-beyond-service-orientation/#comments</comments>
		<pubDate>Mon, 09 Jan 2006 05:09:31 +0000</pubDate>
		<dc:creator>thesoftwaresimplist</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Autonomous Services]]></category>
		<category><![CDATA[Availability]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[ESB]]></category>
		<category><![CDATA[Pub/Sub]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SCA & SDO]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://wp_630.weblogs.us/archives/245</guid>
		<description><![CDATA[After starting to write a whitepaper on Workflow in Service Oriented Architectures, I wanted to reference some prior work published on autonomous services (so that the whitepaper wouldn&#8217;t turn into a book). Anyway, after some futile googling, I&#8217;ve decided to give in and write it up myself.
The tenets of Service Orientation as put forth by [...]]]></description>
			<content:encoded><![CDATA[<p>After starting to write a whitepaper on Workflow in Service Oriented Architectures, I wanted to reference some prior work published on autonomous services (so that the whitepaper wouldn&#8217;t turn into a book). Anyway, after some futile googling, I&#8217;ve decided to give in and write it up myself.</p>
<p>The tenets of Service Orientation as put forth by Microsoft include one about “autonomy”. The tenet states that “Services should be autonomous”. After some digging, I found out that the intent of the authors was “The teams that develop different services should not be dependent on each other”, or in shortened form “Autonomous Teams”. This revelation was surprising to me since the real meaning of the tenet was less profound than what I had imagined – autonomous computing.</p>
<p>The idea of autonomous computing has been around for some time and presents a view of the world in which computing units cooperate to achieve global goals yet are not dependent even on the existence of other computing units to function. (If you’re envisioning tiny robots playing soccer, you’re not far off.)</p>
<p>So when I first saw the autonomy tenet, I was thinking of autonomous services: services so loosely coupled that the correct functioning of a service would not be dependent on the correct functioning of other cooperating services. Services loosely coupled in time as well as in code. Obviously this would mean that if Service A needed to cooperate with Service B, and Service B was not even available, Service A would continue to function, and live up to its service-level-agreement. But before we start drifting off into the outer reaches of business-IT alignment, let’s bring this down to earth.</p>
<p>Before we get into a detailed analysis of the how, let’s first agree on the why. Despite being a historical trend, architectures these days tend to be more loosely coupled than before. Loose coupling being a good thing that enables us to better manage the complexity inherent in large software projects. The practical test of loose coupling in a system is changing the public interface of a class and seeing how much of the system doesn’t compile any more (dynamic languages aside). Service Orientation brings us tenets that, when followed, lead to more loosely coupled architectures than if we actively did not follow them. I think that we can agree then that if we could somehow achieve the loose coupling in time mentioned above, without paying an arm and a leg, that would move our architectures another step forward.</p>
<p>Looking back on the evolution of the field of distributed computing, we can see that, over time, less and less things are being assumed. It is now well understood that anything that goes over the network takes much longer than those calls that stay on the same machine, yet once systems were built that abstracted the network communication into looking just like local calls. The performance of those systems was matched only by their lifetime. With the advent of autonomous computing, the assumption that the called service is available and will respond in a timely fashion is called into question. In the real world, servers crash and network equipment goes up in smoke – we can no longer take for granted that communication will always be available, and that its quality will be good enough. In essence, this marks the end of synchronous RPC/RMI. The following code just won’t cut it in this brave new world:</p>
<p>localhost.service1 s1 = new localhost.service1();<br />
orderReply = s1.HandleOrder(orderRequest);</p>
<p>If the service is unavailable, what will happen to our order request? Will it just get lost?<br />
If the service takes a long time to respond, will our server tie up resources for the same amount of time? If this happens under peak load, might it cause our server to crash?</p>
<p>Performing the above code on a different thread won’t make any difference, autonomous services means the end of Request/Response as we know it.</p>
<p>“No Request/Response between services?!”, you ask incredulously.</p>
<p>The simple answer is “yes”, but there is another level of meaning to it. If you have two software entities that between them you just HAVE to have request/response communication, then they should be in the same service. This is where the real architectural guidance comes in. </p>
<p>In component-orientation and object-orientation, the division of the solution into the right number of parts, with each part having the right amount of responsibility was a kind of black magic passed from master to apprentice. Getting the boundaries right was paramount, but difficult. A number of litmus tests are used to catch the gross errors, and the rest is just gut. So too, the request/response test helps us catch gross errors in service boundary demarcation.</p>
<p>The interesting thing that happens after separating our services out this way is that we often end up with services that mirror the way the business side is structured. Voila, business-IT alignment with your hands closed and one eye tied behind your back! Well, it’s one step in the right direction anyway.</p>
<p>This leaves us with the original types of one-way communication (fire-and-forget, pub-sub, etc) and with one kind of two-way communication: duplex. Duplex is really just two one-way communications (A to B, then B to A) that are correlated. First, I send a message to you, mark it with an id number, and save that number. At some future point in time, you get the message, process it, and send a message back with its own id number. But, you’ll have to put my original id number on the message too, so that I’ll know that your message is a response to mine. At some even more distant point in the future, I get a message from you, look at it, and see that it is the long-awaited response to the request I sent way back when.</p>
<p>If I had to sum up the difference autonomous services bring to the styles of  communication used between services, I’d say this: You get a message, look at it, and figure out what it means and what you should do. This isn’t an infrastructure issue. There application level timeouts to deal with (If I don’t get a response back in 3 days, then notify the supervisor), and long-running workflows to manage (next whitepaper ).</p>
<p>If there is one thing to pay attention to in this whole “autonomous services paradigm” it is that the focus has shifted from between services to within a single service. In parting, I want to let you know that systems can be, and are being, built this way. It works. It better than works. Systems created this way are more robust to failures (seeing as they’re designed for failures makes it less impressive) and easier to manage. Give it a try. You didn’t really think that SOA would fizzle away into a bunch of WS specs, did you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.udidahan.com/2006/01/08/autonomous-services-a-step-beyond-service-orientation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

