<?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>brettdargan.com</title>
	<atom:link href="http://brettdargan.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettdargan.com/blog</link>
	<description>Thoughts and rants</description>
	<lastBuildDate>Fri, 17 Jul 2009 05:44:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why is Performance Monitoring so hard?</title>
		<link>http://brettdargan.com/blog/2009/07/17/why-is-performance-and-monitoring-so-hard/</link>
		<comments>http://brettdargan.com/blog/2009/07/17/why-is-performance-and-monitoring-so-hard/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 04:43:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stability, Performance and Monitoring]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=470</guid>
		<description><![CDATA[





The Challenge
I was questioned recently about why we have so many tools to do monitoring.
Ultimately I think there is not one tool but there is one approach that will improve your people and your systems.
While it is true that different groups in the organisation need to ask different questions about the system at different times.
With [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<div class="section" id="the-challenge">
<h3>The Challenge</h3>
<p>I was questioned recently about why we have so many tools to do monitoring.</p>
<p>Ultimately I think there is not one tool but there is one approach that will improve your people and your systems.</p>
<p>While it is true that different groups in the organisation need to ask different questions about the system at different times.</p>
<p>With the system constantly changing, individuals will need different tools to improve their <a class="reference external" href="http://www.slideshare.net/ThoughtWorks/lean-times-require-lean-thinking">&quot;Learning Efficiency&quot;</a>, and their general understanding of the system.</p>
<p>This must be balanced with the need for 1-n tools over the needs of the people's ability to react to system failures.
Increasing their Learning Efficiency will improve their awareness of the system and should spread knowledge and reduce the Minimum Time to Repair(MTTR).</p>
<p>Also everyone should read <a class="reference external" href="http://www.pragprog.com/titles/mnee/release-it">Release It!</a></p>
</div>
<div class="section" id="overview">
<h3>Overview</h3>
<p>There are a lot of aspects to performance and monitoring and frequently concepts are mixed.</p>
<p>To keep it simple lets categorize them like this:</p>
<ul class="simple">
<li>Current State - Instantaneous State based</li>
<li>Alerting</li>
<li>Historical Stats</li>
<li>Trace (System &gt; Component &gt; Request) ~ Vertical Profiling through technologies</li>
<li>Profiling - usually technology focused, like Java Profiling</li>
<li>Vital Signs</li>
</ul>
<p>These have varying levels of intrusiveness; stickiness and probability of working when needed.
They also have varying stakeholders, users, requirements, permissions that = red tape that slows you down when you most need the information.</p>
<p>There are lots of stakeholders that are usually focused on particular aspects at these times:</p>
<ul class="simple">
<li>Production - Good Times</li>
<li>Production - Under Load Times (batch or interactive)</li>
<li>Production - Under Load and component Failures</li>
<li>Dev - Design/Architecture</li>
<li>Dev - Impl time</li>
<li>Test - Environment Issues - ala. Troubleshooting the Integration</li>
<li>Load Test Time</li>
<li>Soak Test Time</li>
</ul>
</div>
<div class="section" id="complications">
<h3>Complications</h3>
<ul class="simple">
<li>Heterogeneous Systems</li>
<li>Complex Async Interactions</li>
<li>Degradation of Monitored Metrics after installation</li>
<li>non use of metrics in good times = metrics may be misleading or untrusted in bad times</li>
<li>Either Not Enough or Too Many Metrics</li>
<li>When things start to fail, they do so in a non-linear fashion</li>
</ul>
<p>I'm quite greedy when it comes to <em>&quot;Learning Efficiency&quot;</em>, so I have many desired features of monitoring.</p>
</div>
<div class="section" id="my-desirable-features-of-monitoring">
<h3>My Desirable Features of monitoring</h3>
<ul class="simple">
<li>Simple</li>
<li>Non-intrusive for standard operation</li>
<li>Minimal &quot;observer effect&quot;</li>
<li>Provide &quot;Just Enough&quot; Early Warning Alerts</li>
<li>Maximal use of current tools - don't hang your hopes on a <em>new silver bullet</em></li>
<li>Choice in when to Increase accuracy by trading off intrusiveness</li>
<li>Tracing aspects</li>
<li>Decentralized - centralized lock down access inversely decreases the value and usefulness</li>
<li>Alerting and Notifications</li>
<li>Visual Trends</li>
</ul>
<p>Simple is number one and because some information is better than none, I can frequently get by with simple command line tools.</p>
</div>
<div class="section" id="which-metrics-to-choose">
<h3>Which Metrics to choose?</h3>
<p>How do you reduce the signal/noise ratio. When there are 10000s of metrics to choose from.</p>
<p>For this I think we just have to go back to basics.</p>
<p>Your site exists for a reason, to serve traffic, to process some type of request.</p>
<p>Sites don't have a reason to exist if they are not involved in input/output.</p>
<p>Consider your system as a &quot;small world&quot; network. Concentrate on the Hubs and Connectors.</p>
<p>Start with your key flows:</p>
<ul class="simple">
<li>end to end - human to human</li>
</ul>
<p>Measure Requests/traffic:</p>
<ul class="simple">
<li>Requests (bytes/counts/response types ok/fail) between servers (os, then app/jvm)</li>
<li>elapsed response times</li>
<li>resource utilisation - cpu/mem/io</li>
<li>queues/pools/quotas - finite resources and potential bottlenecks - more difficult, sensitive to changes.</li>
<li>effectiveness - seo analytics etc.</li>
</ul>
<p>Add:</p>
<ul class="simple">
<li>Alerts for outside boundaries</li>
</ul>
<p>as well as having the extra info that affects the collected data and it's interpretation:</p>
<ul class="simple">
<li>Influences on metric collection/recording, bug in metric sensor</li>
<li>Influences on interpretation and events - released xyz at this time...</li>
</ul>
</div>
<div class="section" id="why-is-system-wide-monitoring-so-hard">
<h3>Why is System wide monitoring so hard?</h3>
<p>Suffers from lots of things: <a class="reference external" href="http://en.wikipedia.org/wiki/Conways_Law">Conways Law</a>, <a class="reference external" href="http://en.wikipedia.org/wiki/Tragedy_of_commons">Tragedy of the Commons</a>.</p>
<p>Too many stakeholders wanting different things from <em>monitoring</em> and not valuing the effort put into it.</p>
<p>The value of information is usually interpreted differently by many. Accuracy or correctness is not usually as important as age/timeliness and verifiability. Veterans usually place more importance on metrics, many juniors would not even consider of any interest.</p>
<p>Value is usually only seen by juniors when there are problems and the metrics can be directly/indirectly used go gain insight into a situation.</p>
<p>It is a very &quot;hard sell&quot; to setup an automated historical metrics monitoring system.</p>
<p>Centralised Management or tools are just too fragile, they suffer from bugs in too many places, too sensitive to change. Monitoring gets setup and people turn it off when it stops working etc.
Spam generated from alerts get disabled...</p>
<p>When metrics fail or are erroneous, it requires discipline to prioritize and fix ahead of other seemingly more important issues.</p>
</div>
<div class="section" id="active-vs-passive-monitoring">
<h3>Active vs. Passive Monitoring</h3>
<p>Select metrics that will survive changes of software updates; source code releases, os updates; etc.</p>
<p>Select a process that will survive team changes and carry forward the underlying values and benefits of daily checklists.</p>
<p>Use distributed not centralized management, first.
Forget trying to get a single tool etc. up and running with beautifully maintained stats.
Difficult to maintain, untrusted, not resilient to change. Sometimes causes its own resource leaks.</p>
<p>The issue is more of a social problem, the technical problem is simple. Implement a daily checklist.</p>
<p>Ppl have this amazing property of responding to change, computers less so. Ppl attempting to program responding to changes often over complicate the situation, achieving the opposite effect, over the course of the project. As the brilliant mind of the original author is replaced by those less</p>
</div>
<div class="section" id="make-learning-about-your-system-a-cultural-trend">
<h3>Make Learning about your System a Cultural Trend</h3>
<p>When <a class="reference external" href="http://rtpscrolls.blogspot.com/2006/11/angry-monkeys-and-cargo-cults.html">Angry Monkeys are used for Good and not Evil</a>.
When used for good, it is usually referred to as following process or procedure.</p>
<p>When I was a young whipper snapper, bright eyed, enthused etc...</p>
<p>One of the best team leads, I've ever had, brought great discipline and process to our work.</p>
<p>It was the discipline of a <em>daily checklist</em>.</p>
<p>At first it was enforced by the Team lead, then as ppl rotated throughout the team, either of us would enforce that discipline.</p>
<p>Unfortunately others, do not always recognise the value.</p>
<p>Sometimes they may recognise the value when things go wrong.
But then it is quickly forgotten.</p>
<p>When there are differences in the checklist or significant variations of some metrics, you need to be disciplined enough to  track down the diffs.</p>
<p>Sometimes it may take weeks or months, but nonetheless, that level of knowledge is important for the team to learn.</p>
<p>Instill discipline into the culture, ppl can change faster than the technology.</p>
</div>
<div class="section" id="the-way-forward">
<h3>The Way Forward</h3>
<p>In our heterogenous environment, drop back to the simplest thing possible.
Each app/node will have text logs.
Generate events based on those logs.</p>
<p>That is the intent there are other tools as well, like splunk.com.</p>
<ul class="simple">
<li><a class="reference external" href="http://kodu.neti.ee/~risto/sec/">Simple Event Based Correlation - sec.pl</a></li>
<li>Provide &quot;Just Enough&quot; Early Warning Alerts</li>
<li>Maximise use of current tools</li>
<li>Monitor Rate of Change of metrics as well as State Based as dramatic rates of change of pending doom.</li>
<li>Ease comparison of metrics - Order of Magnitude trend differences, side by side comparisons, annotation of events of interest etc.</li>
<li>Interconnecting this monitoring data with your domain. Multipliers.</li>
<li>Cheap, adhoc and non-destructive tools should never get replaced by <em>one centralized monitor</em></li>
</ul>
<p>The <em>&quot;All singing all dancing Monitoring and Management System&quot;</em>, may be possible in some companies, but for most I think it better to stop chasing your tails and put <em>&quot;people and processes&quot; over &quot;tools and technologies&quot;</em>.</p>
</div>
<div class="section" id="things-will-go-wrong">
<h3>Things will go wrong</h3>
<p>So make sure learning about your system is a priority.</p>
<p>Besides Preventative Maintenance or Daily/Weekly Checklists, make time to Learn your Fragile components or synchronous call chaings; your Rhythms and Multipliers.</p>
<p>See Release It for <a class="reference external" href="http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/">&quot;Circuit Breaker pattern&quot;</a> and alike.</p>
<p>Multipliers within systems, always crop up, especially as a balance between reaction time and cost to develop properly.
Key Entities or Seasonal Customer Traffic flow.</p>
<p>All this will help reduce your Minimum Time To Learn and your Minimum Time to Repair (MTTR) your System.</p>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Why+is+Performance+Monitoring+so+hard%3F+http://fatnk.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Why+is+Performance+Monitoring+so+hard%3F+http://fatnk.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/07/17/why-is-performance-and-monitoring-so-hard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RESTful Architecture Style Distilled: Joe goes Jeans Shopping &#8211; Part Two (Realworld Experiences)</title>
		<link>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/</link>
		<comments>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:27:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=463</guid>
		<description><![CDATA[





Desperate Times, call for desperate measures
Maybe it's time to just go to a real shop, the online ones were going to charge delivery anyway.
Well he has find one close by, lucky google maps has a convenient local search with a google maps directly in the search results.
It's a tough call, Joe is pretty lazy, but [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<div class="section" id="desperate-times-call-for-desperate-measures">
<h3>Desperate Times, call for desperate measures</h3>
<p>Maybe it's time to just go to a real shop, the online ones were going to charge delivery anyway.</p>
<p>Well he has find one close by, lucky google maps has a convenient local search with a google maps directly in the search results.</p>
<p>It's a tough call, <strong>Joe is pretty lazy</strong>, but they are two blocks away and there are time pressures.</p>
<div class="line-block">
<div class="line">The nearest shop to him is <strong>&quot;Le Small Fry Jeans&quot;</strong>.</div>
<div class="line">Would have been good if they had a map on their lousy web page, he would have noticed how close they were earlier, like the embedded google maps mashup on <strong>&quot;JeanStop&quot;</strong>.</div>
<div class="line">They were difficult to find, even with a map.</div>
<div class="line">Joe: enters the shop</div>
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: parle-vous francais?</div>
<div class="line">Joe: (Thinking) Crap, well this is going to be difficult, if we can't communicate.</div>
<div class="line">Joe: parle-vous anglais?</div>
<div class="line">Joe: I can't even use a simpler and common communication mechanism (like pointing), because all their stuff is hidden away,if only there were a universal way I could tell her what I'm after.</div>
<div class="line">Joe: discovers a printed catalog and gestures</div>
<div class="line">ShopAssistant #1: ?? Puzzled look - shows him the front cover, only seems to be for <strong>female jeans</strong>.</div>
</div>
<p>Joe, finally gives up at this stage, reaches for his iphone and checks for nearast jean shops to his current location...</p>
</div>
<div class="section" id="a-chance-discovery-slickjeanservice">
<h3>A chance discovery: &quot;SlickJeanService&quot;</h3>
<p>Well today might be his lucky day after all. Just around the corner is another shop he didn't even see on his search results.</p>
<p>They must have been further down the page.</p>
<p>He enters.</p>
<p>Apparently in order <strong>to streamline their business process they have instituted a new protocol</strong>.</p>
<p>This will make the shopping experience faster, apparently...</p>
<p>Except <strong>Joe has to learn</strong> and memorise the new protocol/commands to GET what he is after.</p>
<p>It looks kind of like a Noodle Bar setup, you know there are 3 steps, first step is to pick your noodle type, second step is soup/laksa...</p>
<p>Well that is different thinks Joe, I don't really know what I want yet, I'd like it to be like my last pair, I don't even really know how to describe them, I just know what I like.</p>
<p>He'll give it ago. Inside there are more signs about how you can not deviate from this one path of conversation, any attempt to discuss with a Shop Assistant, results in redirection back to the beginning of the path.</p>
<div class="line-block">
<div class="line">He takes a step closer to the start line, it is a very busy store...</div>
<div class="line">Oh Oh, trouble, there is a new set of instructions that don't match the large menu set of instructions, more reading.</div>
<div class="line">They are in a process of further streamlining.</div>
<div class="line">Joe looks like a deer in the headlights.</div>
<div class="line">These instructions don't make a lot of sense...</div>
<div class="line">Initially, Your Date of Birth to determine your Chinese Zodiac Animal is required and a combination of some secret formula will place you at some position in a queue</div>
</div>
<p>Joe is getting mad, he has to learn a different way of just getting into a queue, let alone work out how to ask for jeans when he can barely describe what he is looking for.</p>
<p>Too much thinking, must leave...
Lucky every shop doesn't work like this, that is way too much work for lazy joe, on to the next shop...</p>
</div>
<div class="section" id="be-careful-what-you-ask-for">
<h3>Be careful what you ask for</h3>
<p>The next nearest shop to him is <strong>&quot;JeanStop&quot;</strong>.</p>
<div class="line-block">
<div class="line">There are three shop assistants serving the same number of customers.</div>
<div class="line">Joe has to queue until one completes a sale</div>
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: Yes, you have come to the right place, we sell jeans</div>
<div class="line">Joe: Great, Can you show me what have you've got?</div>
<div class="line">ShopAssistant #1: That will take too long, give me some more information</div>
<div class="line">Joe: Ok, I want some jeans, I'm a size 87cm, with a straight cut, I haven't decided about the wash or colour yet?</div>
<div class="line">ShopAssistant #1: Wait right here, let me see if we have some....</div>
<div class="line">ShopAssistant #1: Yes we have too many for me to bring out, can you refine your search</div>
<div class="line">Joe: is thinking how should he phrase his question when the clock strikes 10:15. The shop assistant without a word, disappears out the back... Did he just go a coffee break?</div>
<div class="line">Joe: Spins around to one of the other free shop assistants</div>
<div class="line">Joe: I was looking for some jeans, I told that other guy what I was after</div>
<div class="line">ShopAssistant #2: Sorry, I wasn't listening to your conversation, I don't know what you want, you'll have to start again</div>
<div class="line">Joe: AAAAAAAAAAAAAAAAHHHHHHHHHHHHHH!!</div>
<div class="line">Joe: starts again, but notices ShopAssistant#2 has a training badge on...</div>
<div class="line">ShopAssistant #2: I understand all of your requests from prior conversations, except for that last one.</div>
<div class="line">ShopAssistant #2: I will have to ask someone else, can you wait for ShopAssistant #1 to return from his break?</div>
<div class="line">Joe: This guy is a dumb version of the real thing. He can only relay questions that he has found out from ShopAssistant #1.</div>
<div class="line">Joe: Right now he wishes he had a url (/jeans/levis/501?style=stonewash&amp;#038;cut=straight&amp;#038;length=short) or even a picture in a catalog to point out to the guy what he was looking for.</div>
</div>
<p>He is tired of wasting his time and heads to the next shop...</p>
</div>
<div class="section" id="all-i-want-is-a-pair-of-jeans">
<h3>All I want is a pair of jeans</h3>
<p>Location: <strong>&quot;HowMuchAreThoseJeansinTheWindow&quot;</strong></p>
<p>It is really busy in here there are about 4 to 1 customers to shop assistants.</p>
<p>At this shop however they are quickly flitting about between customers taking new requests and it isn't long before Joe gets some attention.</p>
<div class="line-block">
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: Yes, you have come to the right place, we sell jeans, let me help you choose what you are looking for.</div>
<div class="line">ShopAssistant #1: Here is our latest catalog, in it you will find -- starts to rattle off a list of stock...</div>
<div class="line">Joe: Great, Well I need something in size 33inches</div>
<div class="line">ShopAssistant #1: Yes, this way, tell me more. Do you like prefer any of these cuts; styles or lengths...</div>
<div class="line">Joe: A few more back and forth conversations later...</div>
<div class="line">ShopAssistant #1: Excuse me Joe, I must attend to another customer request, just flip open your catalog so you can let me know where we were up to when I get back.</div>
<div class="line">Joe: Wow, the shop assistant started <strong>speaking Dutch</strong> and talking to another customer, they to have a catalog in hand, looks like it is in their language as well.</div>
<div class="line">Joe: He looks around and sees another Shop Assistant using sign language. Those guys really know how to communicate</div>
<div class="line">Joe: Does some more browsing by himself</div>
<div class="line">ShopAssistant #3: Hi Joe, so what were you looking for?</div>
<div class="line">Joe: Armed with the trusty catalog, points where he was last at so he can continue his conversation, but with a different ShopAssistant.</div>
<div class="line">Joe: After a few more suggested options from ShopAssistant #3 and Joe finds what he is after.</div>
<div class="line">Joe: <strong>GET</strong> those jeans.</div>
<div class="line"><br /></div>
</div>
</div>
<div class="section" id="so-what-does-this-have-to-do-with-rest-anyway">
<h3>So what does this have to do with REST anyway</h3>
<p>Did Joe finally get his pair of jeans?</p>
<p>Well that doesn't matter too much, when we are here to talk about REST.</p>
<p>If you stuck to the script, you've already seen a lot of evidence that REST describes and some that it doesn't.</p>
<p>By far the best experience Joe had was at the last Location <strong>&quot;HowMuchAreThoseJeansinTheWindow&quot;</strong>.</p>
<p>This shop embodied most of the important constraints of REST and it was this shop that seemed the most scalable, just like the architecture of the Web.
Only a few Shop Assistants serving many customers.</p>
<p>The first enablers for this ability is for clients to be able to <strong>identify what they want (Universal Addressability)</strong>, eg. Joe pointing his finger in the catalog will be understood by any of the Shop Assistants. Secondly our Shop Assistants are <strong>Stateless</strong>, that is they can suspend conversations with one client and switch to servicing another, without the need of them to remember anything specific to a particular client or conversation.</p>
<p>Stateful components make integration a complex and expensive proposition, see: <strong>&quot;JeansRUS&quot;</strong>.</p>
<p>The other great thing about that shop, was the way the assistants <strong>guided the client</strong>, they always answered <strong>questions and gave a choice of other available options</strong>.</p>
<p>They also talked in a standard manner <strong>(Uniform Interface)</strong>, unlike  <strong>&quot;SlickJeanService&quot;</strong> that tried to force new ways of doing things for the sake of their one store.</p>
<p>If we combine these features we make it really easy for a client like Joe to talk to our Shop Assistants.</p>
<dl class="docutils">
<dt>So all Joe needs to know is:</dt>
<dd><ul class="first last simple">
<li>where the front door is</li>
<li>negotiate preferred content</li>
<li>how to ask questions</li>
<li>how to follow options</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="stay-tuned">
<h3>Stay Tuned</h3>
<p>We leave Joe, with a new pair of Jeans.</p>
<p>See part one for <a class="reference external" href="http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/">RESTful Architecture Style Distilled: Joe goes Jeans Shopping- Part One (Online Experiences)</a>
.</p>
<p>Join us next time for Part Three when we dissect the story further.</p>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+--+Part+Two+%28Realworld+Experiences%29+http://3ximm.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+--+Part+Two+%28Realworld+Experiences%29+http://3ximm.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RESTful Architecture Style Distilled: Joe goes Jeans Shopping &#8211; Part One (Online Experiences)</title>
		<link>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/</link>
		<comments>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 03:27:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=451</guid>
		<description><![CDATA[




For SEOers; developers; testers;  web developers; BA's and CIO's.
REST has some tremendous benefits, but it's message is clouded.
It's a message that I feel needs to be partly understood, by more than just developers.
Narrative, seemed a good enough form (I would have preferred comics).
I was inspired by Dan North and friends(Simon Stewart) story about a [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>For SEOers; developers; testers;  web developers; BA's and CIO's.</p>
<p>REST has some tremendous benefits, but it's message is clouded.
It's a message that I feel needs to be partly understood, by more than just developers.</p>
<p>Narrative, seemed a good enough form (I would have preferred comics).
I was inspired by <a class="reference external" href="http://dannorth.net">Dan North and friends(Simon Stewart)</a> story about a guy buying pants from a WS-* like shop vs. a RESTful shop and <a class="reference external" href="http://tomayko.com/articles/2004/12/12/rest-to-my-wife">How I explained REST to my wife</a>.</p>
<p>In this Four part series, I'll attempt to simplify the ideas behind presented by Roy and others from his dissertation for a wider audience.</p>
<blockquote>
<ul class="simple">
<li>Part 1 - Online Experiences</li>
<li>Part 2 - Physical (Offline) Experiences</li>
<li>Part 3 - Summary</li>
<li>Part 4 - Further Technical Detail</li>
</ul>
<p>This is tough, I will necessarily loose details, but the intent is not to mislead, only to introduce some examples and benefits of adopting a RESTful style.</p>
</blockquote>
<p>If you are an SEOer; developer; tester;  web developer; BA or CIO who wants to know more about REST and what the benefits and pitfalls are, then Read On.</p>
<div class="section" id="the-problem-joe-needs-some-new-jeans">
<h3>The Problem - Joe needs some new jeans</h3>
<p>So there was this guy called Joe, he really needed some new pants, to go with his Jacket.
He was pretty tired from the night before, so checked online for some jeans shops.</p>
</div>
<div class="section" id="following-a-friends-recommendation">
<h3>Following a Friends Recommendation</h3>
<p>He finds a url in an email, someone sent him about jeans.</p>
<p>The link is to the home page of <strong>&quot;Jeans R Us&quot;</strong></p>
<p>The link isn't to a particular type and style of jeans.</p>
<p>There was this this other large box, promising stylish new jeans experience, but he needed to <strong>install some new plugin called Adobe Flash</strong>.</p>
<p>Well what's a few more minutes..................</p>
<p>Once that was running eventually a cool flash movie with animation that let him change all those options and get a 3D view of the jeans.</p>
<p>But as he uses the system <strong>he can't use the browser back button</strong>, the application seems to have it's <strong>own back button</strong>.</p>
<p>He tries another tab, that also isn't working like normal web sites.</p>
<p><strong>It really doesn't work the same way as most web sites, it all happens on the one page.</strong></p>
<p>The url never changes and that's why he <strong>can't even bookmark</strong> his favourite jeans choice.</p>
<p>Although they have their own custom way of doing favourite jeans, but you have to create a profile.</p>
<p>The site is just frustrating, time to checkout Google instead.</p>
</div>
<div class="section" id="once-more-with-purpose">
<h3>Once more, with purpose</h3>
<p>So after giving up on that site.</p>
<p>Google had a few results for him to check out.</p>
<p>The 1st organic search result for the <strong>&quot;Le Small Fry Jeans&quot;</strong> store, had a link to a business directory web site.</p>
<p>It had stylish, well designed page with a street address and an email address.</p>
<p><strong>BUT THAT WAS ALL!!!</strong></p>
<p>Hmmm, the trading hours given on the website were different to the trading hours on the directory web site.</p>
<p>I wonder which one is actually updated regularly?</p>
</div>
<div class="section" id="second-times-a-treat">
<h3>Second times a treat</h3>
<p>Back to Google search results.</p>
<p>One of the sponsored links, <strong>&quot;Jeans Mega Store&quot;</strong> had a fantastic website.</p>
<p>This site <strong>seems really responsive, only parts of the page are updated</strong> when he made a selection.</p>
<p>He could enter in his size; select a cut and style; while seeing what is currently popular; there were also promotions for new customers.</p>
<p>There was <strong>a lot of a attention to detail</strong>, including:
- a simple page with Trading Hours
- store locations in a google map embedded on their own page.</p>
<div class="line-block">
<div class="line">The deals were pretty good, he browses.</div>
<div class="line">Oops, made a mistake, tries to use <strong>the Back Button, it seems broken</strong>.</div>
<div class="line">He is forced to work out how to undo what he did in <strong>their specialised interface</strong>.</div>
<div class="line">Adds some things to his cart.</div>
</div>
<div class="line-block">
<div class="line">Now he is ready to checkout, this action switches him to a a secure site, with his previous selected products.</div>
<div class="line">He enters in his credit card details.</div>
<div class="line">He hits the &quot;Proceed&quot; button...</div>
</div>
<p>ARRGGGH!!</p>
<p>No Go - they have no stock, they only check after his credit card has been entered.</p>
<p>Well, screw that he says. He abandons the order.</p>
<p>This clearly won't do, Joe must have some new pants for tomorrow, or he may have to do some washing himself...</p>
</div>
<div class="section" id="rd-times-a-charm">
<h3>3rd times a charm</h3>
<p>Back to Google search results.</p>
<p>The 2nd organic search result is for the <strong>&quot;How Much Are Those Jeans in the Window&quot;</strong> store, this one is styled purple, he has been there before.
Well this store has been around for a while, it has a clean but simple interface, it is pretty fast.</p>
<p>The <strong>online html catalog</strong> has basic jean pictures, with a small number of options.</p>
<p>The online catalog in html also has <strong>links to a pdf catalog</strong>. That is great for offline viewing and formats nicely on the printer.</p>
<p>Hmm, he seems to remember going to this store once before, <strong>he bookmarked a link</strong> for a particular type of jeans.</p>
<p>He searches through his old bookmarks.</p>
<p>Hmm, <strong>&quot;404 Page Not Found Error&quot;</strong>.</p>
<p>Well what does that mean, are the out of stock, is it no longer available or did they just revamp their website?</p>
<p>He only bought the last pair 3 months ago on the last washing day, they've probably just updated their website and now his old links don't work anymore.</p>
<p>Lets use the old faithful <strong>Back Button</strong> and continue.</p>
<p>After product selection and styles...</p>
<p>He clicks &quot;Proceed with Order&quot;;  enters in all his customer details;</p>
<p>He is having doubts, will that be a good look?....</p>
<p>Just then the phone rings...</p>
<p><strong>Distracted, he has a bit of breakfast</strong>, feeds the dog, gets back to his computer.</p>
<p>Has finally decided these are the right jeans for me.</p>
<p>He <strong>hits the &quot;Buy&quot; button</strong>....</p>
<p>The url looks like this:
/order/1234?action=process&amp;#038;....</p>
</div>
<div class="section" id="foiled-again">
<h3>Foiled Again</h3>
<p>He is rewarded with another <strong>Error Page</strong>. His <strong>session has expired</strong>, whatever that means. He hits refresh a few times, now it is asking him more questions, click ok; then give up.</p>
<p><strong>Restarts his browser</strong> and goes back to the site.</p>
<p>Luckily the <strong>browser has history</strong>, they had a pretty long domain name, even if it was fairly easy to remember.</p>
<p>Ohh, something else is wrong. Part of the site is working, but every time he goes to do a search he gets some sort of <strong>&quot;503 Server Error&quot;</strong> now.</p>
<p>This online ordering, can be a real pain.</p>
</div>
<div class="section" id="stay-tuned">
<h3>Stay Tuned</h3>
<p>We leave Joe, staring at his terminal, pulling his hair out.</p>
<p>Join us next time for Joe goes Jean Shopping Part Two - In the Real World.</p>
<p>Confused: We haven't discussed REST at all yet, stay tuned for Part Two and Three, when we finally discuss how some of Joes experiences relate to a RESTful Architectural Style.</p>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+--+Part+One+%28Online+Experiences%29+http://68ke8.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+--+Part+One+%28Online+Experiences%29+http://68ke8.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ode of an Architect &#8211; The Journey</title>
		<link>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/</link>
		<comments>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/#comments</comments>
		<pubDate>Wed, 27 May 2009 03:22:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=440</guid>
		<description><![CDATA[It starts with self
while (alive == TRUE) mind.get(random(thoughts))
Thy subconscious is a fiesty, unpredictable partner
There are no original thoughts
Designs of economy and elegance
Are reluctantly released
Complexity will be contained
Clarity will come in time
I imbue visions and ideas
One team or one deliverable at a time
The journey is long and difficult
The rewards are many
Success made possible
By conveying understanding
Persistence and [...]]]></description>
			<content:encoded><![CDATA[<p>It starts with self<br />
while (alive == TRUE) mind.get(random(thoughts))<br />
Thy subconscious is a fiesty, unpredictable partner<br />
There are no original thoughts<br />
Designs of economy and elegance<br />
Are reluctantly released<br />
Complexity will be contained<br />
Clarity will come in time</p>
<p>I imbue visions and ideas<br />
One team or one deliverable at a time<br />
The journey is long and difficult<br />
The rewards are many</p>
<p>Success made possible<br />
By conveying understanding<br />
Persistence and boldness<br />
My allies include Clarity; reason and spikes</p>
<p>Reality intervenes<br />
Tradeoffs will be forged<br />
Intentional not accidental<br />
The team understand the goal<br />
Where we can take things next time</p>
<p>Helping others learn<br />
Challenge and stimulate me<br />
Together we light paths forward<br />
Casting aside<br />
Perceived constraints of the mind</p>
<p>Continuous improvements we make<br />
Eliminating waste as we go<br />
Alien to the unenlightened<br />
Liberating to the energetic few</p>
<p>Mistakes and conflicts will occur<br />
Choose battles and timing<br />
Many opportunities to learn<br />
Sometimes the master<br />
Always a student<br />
My appetite for learning<br />
Grows with time</p>
<p>Custodians of the future<br />
Expand your mind<br />
Use many lenses<br />
Choose your journey<br />
Evolve your systems<br />
Deliver value with vigour<br />
Take action now</p>
<p> - Brett Dargan</p>
<p>Not sure where this came from, I had a slighly poetic moment, not in the rhyming sense <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Ode+of+an+Architect+--+The+Journey+http://d4xe3.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Ode+of+an+Architect+--+The+Journey+http://d4xe3.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAOO 2009 &#8211; Brisbane</title>
		<link>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/</link>
		<comments>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/#comments</comments>
		<pubDate>Mon, 18 May 2009 14:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Stability, Performance and Monitoring]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=380</guid>
		<description><![CDATA[




Another good event, great speakers, lots of language talks, agile, architecture, scalability, databases ala megastore.
highlights for me, in no particular order.


Avi Bryant's new project, great eye candy had the crowd go &#34;ooooooooohhh&#34;.  When will an api be open to plug other data in???

Also nice talk on VM history, how we are working on VMs [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>Another good event, great speakers, lots of language talks, agile, architecture, scalability, databases ala megastore.
highlights for me, in no particular order.</p>
<ul>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Avi+Bryant">Avi Bryant's</a> new project, great eye candy had the crowd go &quot;ooooooooohhh&quot;.  When will an api be open to plug other data in???</dt>
<dd><ul class="first last simple">
<li>Also nice talk on VM history, how we are working on VMs from algo's designed in the 80's. And the features or standard of VMs aren't available for all our favourite languages.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Jon+Tirsen">Tiersen</a> , good intro to sharding and google approach to scaling out</dt>
<dd><ul class="first last simple">
<li>liked the probability graphs</li>
<li>read chubby, logserve paper</li>
<li>higher level of jonas discussion, but jonas did refer to tiersen counter example</li>
<li>When the web came along, our apps were read mostly.</li>
<li>These days, social sites, are moving away from this scheme, to one of shared data. Some of that shared data is written to a lot. but it is updated, the majority of it is always inserts only.</li>
<li>write fan outs.</li>
<li>combine the two operations in one, so write + read all counters at same time</li>
<li>counter example too simple, can bypass optimistic locking as counter should be monotonically increasing</li>
<li>combine websites with fragments of data/entities with different shards and shard policies.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Jonas+S+Karlsson">Jonas</a> - great talk re Megastore</dt>
<dd><ul class="first last simple">
<li>Treat everything as an insert, duplicates will occur make sure they are idempotent</li>
<li>Updates are a little harder, but what is an update really, when can you say it is actually done?</li>
<li>Confirmed for me that a current strategy i'm implementing is right and will work (well for two, maybe three nodes anyway).</li>
<li>To get to more will need a decent <a class="reference external" href="http://en.wikipedia.org/wiki/Paxos_algorithm">Paxos implementation</a>, which takes smart ppl and time.</li>
<li>consistency, availability, entity groups and big table</li>
<li>web apps more read/write than before, lots of shared data, but mostly additions</li>
<li>consistency, reliability, storage, scalability and megastore scale, entity groups, transactionality, avoiding joins</li>
<li>consistency: user trust, none, eventual, entity group, global</li>
<li><strong>consistency: &quot;a harmonious uniformity of agreement among things or parts&quot;</strong></li>
<li>Sharding by entity groups.</li>
<li>storage vs. cost of loss</li>
<li>paxos vs. 2pc</li>
<li>papers jonas recommended: pat helland paper; jinquan dai, intel, james hamilton, MS</li>
<li>I have a lot more to say about this topic, as I cut my teeth on Oracle Performance Tuning and it's architecture, always providing a READ CONSISTENT transaction at a minimum, I use to think was a great idea, until I wanted to scale it further.</li>
<li>Disk Reads are about 10,000 slower than memory access, but not if you have to manage a lot of versions of different blocks in memroy. The overheads reduce the read in memory to <strong>ONLY 10 to 100 times faster than a disk read</strong>. That just isn't enough. See <a class="reference external" href="http://www.hotsos.com/e-library/abstract.php?id=7">Milsap papers on Oracle scaling</a>  there are a number of them and <a class="reference external" href="http://www.scaleabilities.co.uk/book/scalingOracle8i.pdf">James Morle's book on Scaling Oracle 8i which is a great book, the older print version can still be picked up as well</a></li>
<li>The approach of one single db instance creates new problems, now we need transaction logs and a hot standby and a DR data centre...</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Michael+T.+Nygard">Nygard</a> (<a class="reference external" href="http://www.amazon.com/Release-Production-Ready-Software-Pragmatic-Programmers/dp/0978739213/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652387&amp;#038;sr=1-1">Release It!</a> )- i missed the first one due to a conflict &lt;img src='<a class="reference external" href="http://brettdargan.com/blog/wp-includes/images/smilies/icon_sad.gif">http://brettdargan.com/blog/wp-includes/images/smilies/icon_sad.gif</a>' alt=':(' class='wp-smiley' /&gt; .</dt>
<dd><ul class="first last simple">
<li>Great stuff from what i hear, I've been pushing for some time implementation of his patterns.</li>
<li>motivated a number of devs at my company. Hopefully I'll see some badly behaving webservices and stability pattern implementations.</li>
<li>Here is a <a class="reference external" href="http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/">simple Java Circuit Breaker Pattern Implementation from a ways back</a>.</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">mike cannon-brookes - had to fill a tough set of constraints, but interesting story about atlassian.</p>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Clemens+Szyperski">Clemens</a></dt>
<dd><ul class="first last simple">
<li>ms unified component thingy. simliar to osgi. Nice talk about issues with design,  component composition and how all of IT boils down to composition of things at varying levels.</li>
<li>Discussion about component composition and how <strong>state is always a problem</strong>, yes.</li>
<li>Advocate of service use, <strong>not reuse</strong> as it should be used <strong>&quot;as is&quot;</strong></li>
<li>I prefer service use over code/component, especially with a services developed with RESTful intentions</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first"><a class="reference external" href="http://dannorth.net">Dan North</a>, telling project war stories based on experience and
* observations of good architects
* soa gone bad, wsdl</p>
<ul class="simple">
<li>Listen, Listen, Listen</li>
<li>technical problems aren't the biggest issue, silo communication</li>
<li>replacement of tools sqlserver to oracle, not solving the real problem</li>
<li>the nameless quality</li>
<li>vision, inspiration, enabler</li>
<li>project shaman</li>
<li>empathise</li>
<li>self belief, a sense of conviction and humility</li>
</ul>
</li>
<li><dl class="first docutils">
<dt>Joshua Bloch - great stuff</dt>
<dd><ul class="first last simple">
<li>checkout <a class="reference external" href="http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html">MapMaker</a></li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Eastman - apache mahut. Dirichlet clustering, hmm, that algorithm wasn't in <a class="reference external" href="http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242654567&amp;#038;sr=1-1">Collective Intelligence</a></p>
</li>
<li><dl class="first docutils">
<dt>Douglas Crockford</dt>
<dd><ul class="first last simple">
<li>javascript inspired by self, scheme, perl and java</li>
<li>prefer === over == doesn't do type coercion</li>
<li>he no longer uses ++ and -- anymore, implicated in buffer overflow exploits</li>
<li>lambda, dyn objs, loose typing and object literals.</li>
<li>refreshing to discuss languages and language features again</li>
<li>the <a class="reference external" href="http://www.nczonline.net/blog/2009/01/27/speed-up-your-javascript-part-3/">memoizer example was good</a>, check the slides for recursion usage</li>
<li>use functions to make objects</li>
<li>functional inheritance</li>
<li>be rigorous and  use jslint</li>
</ul>
</dd>
</dl>
</li>
</ul>
<div class="section" id="other-comments">
<h3>Other Comments;</h3>
<blockquote>
<ul class="simple">
<li>Lots of cloud talks, <strong>very fluffy</strong>, but where was the discussion about <a class="reference external" href="http://kenai.com/projects/suncloudapis/pages/Home">SUN Cloud RESTful API</a></li>
<li>No REST, no erlang.</li>
</ul>
</blockquote>
</div>
<div class="section" id="books-to-checkout">
<h3>Books to checkout:</h3>
<blockquote>
<ul class="simple">
<li>Douglas Crockford, recommends <a class="reference external" href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242693117&amp;#038;sr=8-1">JavascriptTheGoodParts</a></li>
<li>Steve Hayes, recommends <a class="reference external" href="http://www.amazon.com/Brain-Rules-Principles-Surviving-Thriving/dp/0979777747/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652608&amp;#038;sr=1-1">BrainRules</a></li>
<li>Linda Rising, recommends <a class="reference external" href="http://www.amazon.com/Strangers-Ourselves-Discovering-Adaptive-Unconscious/dp/0674013824/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652693&amp;#038;sr=1-1">StrangersToOurselves</a> by Timothy Wilson</li>
<li>Dan North, recommends <a class="reference external" href="http://www.amazon.com/Timeless-Way-Building-Christopher-Alexander/dp/0195024028/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652771&amp;#038;sr=1-1">TimelessWayOfBuilding</a>, yah, i have flicked through it, may borrow from a library or amazon, cause i haven't seen it in oz on a shelf for less than $140.</li>
</ul>
</blockquote>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=JAOO+2009+--+Brisbane+http://7cmwo.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=JAOO+2009+--+Brisbane+http://7cmwo.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIMVR and HATEOAS: MVC+URITemplateAspects, LinkAwareModels and LinkTemplateProcessors</title>
		<link>http://brettdargan.com/blog/2009/04/29/rimvr/</link>
		<comments>http://brettdargan.com/blog/2009/04/29/rimvr/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 12:24:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[RESTful]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=337</guid>
		<description><![CDATA[There has been a discussion titled [Jersey] Putting the RESTful "connectedness" around my existing Domain objects on the jersey mailing list that is starting up again.
I don't think I have confused HATEOAS with "connectedness", I have a reasonable understanding of resource state, application state and HATEOAS.
See http://www.stucharlton.com/blog/archives/000141.html and this discussion, http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497, which I see you [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a discussion titled <a href="https://jersey.dev.java.net/servlets/ReadMsg?list=users&#038;msgNo=5657">[Jersey] Putting the RESTful "connectedness" around my existing Domain objects</a> on the jersey mailing list that is starting up again.</p>
<p>I don't think I have confused HATEOAS with "connectedness", I have a reasonable understanding of resource state, application state and HATEOAS.</p>
<p>See <a href="http://www.stucharlton.com/blog/archives/000141.html">http://www.stucharlton.com/blog/archives/000141.html</a> and this discussion, <a href="http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497">http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497</a>, which I see you have contributed to.</p>
<p>I think this final point made by <a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven">Roy</a> is pretty applicable here:</p>
<blockquote><p>
A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). From that point on, <b>all application state transitions must be driven by client selection of server-provided choices that are present in the received representations or implied by the user’s manipulation of those representations</b>. The transitions may be determined (or limited by) the client’s knowledge of media types and resource communication mechanisms, both of which may be improved on-the-fly (e.g., code-on-demand). [Failure here implies that out-of-band information is driving interaction instead of hypertext.]
</p></blockquote>
<p><b>My point is you can't adhere to the HATEOAS constraint, without providing links between resources</b> so the server can guide the client to other application states.</p>
<p>I agree that forms are a better example for explaining state transitions, especially since resource state is likely to be changed by providing forms (as will the User Agent, as Roy mentions); or equivalent form templates/prototypes for other media types.<br />
But to me providing forms or equivalents for other media types is a different and easier problem to solve.</p>
<p>I'm very interested in <b>how to evolve existing systems</b>; I want to leverage the <b>vast islands of information</b> that already exist. </p>
<p>I just want to do it in an elegant way from a <b>code</b> and a <b>web perspective</b>, including the fact that uri's shouldn't change.<br />
<div id="attachment_338" class="wp-caption alignleft" style="width: 310px"><a href="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy.jpg"><img src="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy-300x225.jpg" alt="RIMVR: MVC + URITemplateAspects; LinkAwareModels and LinkTemplateProcessor" title="hateoas_4_legacy" width="300" height="225" class="size-medium wp-image-338" /></a><p class="wp-caption-text">URITemplateAspects; LinkAwareModels and LinkTemplateProcessor</p></div></p>
<p>In a standard, layered design, you would have these components (see <a href="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy-300x225.jpg">Image</a>):</p>
<p>1. Code-On-Demand<br />
2. View<br />
3. Controller<br />
4-6. Contains the Proposed Abstractions<br />
7. Model<br />
8. Persistent Store - Db; file; jcr; webdav<br />
9. Proxies</p>
<p>Here are some options I have for adding links around some existing system (there are likely more)</p>
<p>Due to the time constraints, the Pros, will be sparse.</p>
<h3>Option 1: Add Links via Code-On-Demand.</h3>
<p>Add links to my html page via javascript.<br />
I could take my existing html representation and use dhtml to add links.</p>
<p>Cons:<br />
* code-on-demand not available for all user agents or may be disabled<br />
* Proxies can't cache the entire representation<br />
* leak of possible application states to clients that don't need to know<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations<br />
* Alternative media types may require alternative languages or structure to perform add the links. ie. use of xsl for xml; javascript with svg.</p>
<h3>Option 2: Add Links via Views</h3>
<p>Cons:<br />
* We all know this is bad<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations<br />
* different views/media types require the same logic and detailed knowledge of the model<br />
* different views/media types may require some application state knowledge. an admin user may have other links than anon.</p>
<h3>Option 3: Add Links via Controllers</h3>
<p>Pros:<br />
* Can handle the inclusion/exclusion of links depending on the current application state, regardless of the media type to respond with </p>
<p>Cons:<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations</p>
<h3>Option 4: Add Links via Models</h3>
<p>Pros:<br />
* Detailed knowledge of the model and related models belong in the Model</p>
<p>Cons:<br />
* Detailed knowledge of resource links aren't the domain of the models<br />
* Not all possible related models are likely to be represented; to balance performance with types of usage, often some relationships are not modelled, so as to not eager load, very large graphs etc.<br />
* Links are very static, The "next available" application state, still needs to be determined in another layer, like Controller</p>
<h3>Option 5: Add Links via Persistent Store</h3>
<p>Store partial links in the db </p>
<p>Pros:<br />
* Db driven, easy to update<br />
* Tables have relationships<br />
* easy adoption path<br />
* easy to link to external resources, or resources outside your db schema<br />
* easy to share links at db level, if several systems integrate at that level<br />
* Good for sparse relationships. </p>
<p>Cons:<br />
* Update to change a link, will not play nice with intermediaries nor "cool uris, that don't change"<br />
* Not great for <b>consistent dense relationships</b>, you probably want to model that differently. So with a Parent Child relationship, you wouldn't want something in addition to existing foreign key relations, to redundantly specify that to get to the children of a parent you have a list of /child/xyz links. but by having that specified in the URITemplateAspect then you are managing that once, close to the data.<br />
* Relationships are not always defined in Foreign Keys<br />
* Links are very static, The "next available" application state, still needs to be determined in another layer, like Controller<br />
* Only a partial solution for more dynamic aspect of determining what application states make sense, still needs to be done in another layer.<br />
* May be invasive, links stored in columns or other tables, no good if you've got a locked down schema.</p>
<h3>Thoughts</h3>
<p>Models shouldn't have relationships to hardcoded resources, like "/resource/50", but they could have a semantic relationship to "/resource/{id}" or "/resource/{id};role={role}" under certain conditions.</p>
<p>There is a place for such LinkAwareModels (Component no. 5), as long as the links are isolated and only contain semantic relationships, they are not urls.</p>
<p>The Links from Models to Resources are isolated and encapsulated within its own abstraction; which gives us component no. 6 URITemplateAspects (maybe just simplify this to LinkTemplateAspect).</p>
<p>Possible "Application States" are dependent on the request, even though a request must be STATELESS, possible "Application States" may still be determined by the security access; restrictions of media-types or client, which should all be part of the request. If you do stuff with user roles, then make sure you encode within your url.</p>
<p>Component no. 4 is our LinkTemplateProcessor(s) and its responsibility is to evaluate URITemplates within the LinkAwareModels/entities and to determine appropriate state transitions based on the request.</p>
<p>This leads us to the final Option ( well, for this post <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<h3>Option 6: Semantic relationships of a "Model to resources" definied via URITemplateAspect and a LinkTemplateProcessor to evaluate the relationships (URITemplates) and sub-entities to determine other "application states"</h3>
<p>Pros:<br />
* Detailed knowledge of the model and related models belong in the Model<br />
* Detailed knowledge of the model to resource of interest is a concern isolated in the URITemplateAspects<br />
* Any possible relationships to other resources can be defined<br />
* Links are very dynamic. The possible state transitions can be determined by the LinkTemplateProcessor, but it can do so decoupled from the detailed relationships of the model to other resources. </p>
<p>The semantic relationships that are defined in the LinkAwareModels, can include uri and other attributes, like rel. The LinkTemplateProcessor can evaluate a lot of the current application state (but not all as the User Agent may have representations from other servers or representations that have been modified by Code-On-Demand) in combination with the semantic relationship to determine the ultimate value of the link to use (relative preferred, of course) and it can determine if that link is a valid state transition. Only if you are an admin do you see this link; or the link retains the current media-type used for this request; so a request for /country/AU.html includes links to cities.html, not just cities. The default negotiation might be something if that is not specified.</p>
<p>* The Processor can operate on objects, prior to rendering to a particular media-type, so if you have a single object model that can render to multiple media-types, you could have less code</p>
<h3>Conclusion</h3>
<p>What do you call, this, maybe Rich Interconnected Model View Resource RIMVR.<br />
Rich in relation to having deep links within a resource representation and from the applicability of those links. That actual uri templates are evaluated late and with some context of the request and application state.</p>
<p>The use of these abstractions, <b>in no way make an application RESTful, that is up to the developers</b>, but hopefully by following some abstractions, like these we will get some clean code and some better understanding of RESTful APIs.</p>
<p><a href="http://brettdargan.com/blog/2009/01/14/hateoas-for-legacy-object-models/">I have some old code, to show this working.</a><br />
One day I'll get a chance to clarify terms and simplify the code <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=RIMVR+and+HATEOAS%3A+MVC%2BURITemplateAspects%2C+LinkAwareModels+and+LinkTemplateProcessors+http://3z75n.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=RIMVR+and+HATEOAS%3A+MVC%2BURITemplateAspects%2C+LinkAwareModels+and+LinkTemplateProcessors+http://3z75n.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/04/29/rimvr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some comments on 101 Things I Learned in Architecture School</title>
		<link>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/</link>
		<comments>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:13:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=302</guid>
		<description><![CDATA[
Some comments about a standard "architecture" book   of one pager pearls of wisdom.

There is not much too this book, then again, "less is more" .

#21 - An Architect knows something about everthing. An engineer knows everything about one thing.
"An architect is a generalist, not a specialist. "
This is consistent with becoming a Generalising [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/101-Things-Learned-Architecture-School/dp/0262062666/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1237372773&#038;sr=8-1"><img src="http://brettdargan.com/blog/wp-content/uploads/2009/03/101thingsilearnedinarchitectureschool1-300x216.jpg" alt="101 Things I Learnedin Architecture School" title="101 Things I Learnedin Architecture School" width="300" height="216" class="alignleft size-medium wp-image-321" /></a></p>
<p>Some comments about a standard <a href="http://www.amazon.com/101-Things-Learned-Architecture-School/dp/0262062666/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1237372773&#038;sr=8-1">"architecture" book </a>  of one pager pearls of wisdom.<br />
<br />
There is not much too this book, then again, "less is more" .
</p>
<h3>#21 - An Architect knows something about everthing. An engineer knows everything about one thing.</h3>
<blockquote><p>"An architect is a generalist, not a specialist. "</p></blockquote>
<p>This is consistent with becoming a <a href="http://www.codinghorror.com/blog/archives/000711.html">Generalising specialist</a>. </p>
<h3>#29 Being process-oriented, not product-driven, is the most important and difficult skill for a designer to develop.</h3>
<p>I take "process-oriented" in this context to mean improving your own processes and not the general interpretation of burdensome processes.</p>
<p>Pragmatically this "process-orientated" statment is about focusing on the process of design and improving those skills, in place of speed of product development. </p>
<p>Another aspect on this is balancing learning efficiency with task efficiency, which <a href="http://jchyip.blogspot.com/">Jason Yip</a> mentioned in a recent presentation.</p>
<p>Tip #29 has nine sub points, here are a few of my favourites:</p>
<ul>
<li>seeking to understand a design problem before chasing after solutions;</li>
<li>making design investigations and <b>decisions holistically</b> </li>
<li>working <b>fluidly between concept-scale and detail-scale</b></li>
<li>making <b>design decisions conditionally</b> - that is, with the awareness that they may or may not work out as you continue toward a final solution; See also <a href="http://brettdargan.com/blog/2009/01/08/considerations-in-communicating-the-intent-of-software-design/">"Considerations in communicating the Intent of Design"</a>.
</li>
<li>Knowing when to change and when to stick with previous decisions</li>
<li>Always asking "What If...?" regardless of how satisfied you are with your solutions.</li>
</ul>
<h3>#45 Three Levels of knowing</h3>
<dl>
<dt><b>Simplicity</b></dt>
<dd>world view of the child or uninformed adult.</dd>
<dt><b>Complexity</b></dt>
<dd>the ordinary adult world view. An <b>awareness of complex systems</b> in nature and society but an <b>inability to discern clarifying patterns</b> and connections.</dd>
<dt><b>Informed Simplicity</b></dt>
<dd>an enlightened view of reality. It is founded upon an <b>ability to discern or create clarifying patterns within complex mixtures</b>. Pattern recognition is a crucial skill for an architect, who must create a highly ordered building <b>amid many competing and frequently nebulous design considerations</b>.</dd>
</dl>
<h3>#16/26 - Parti and Changing Parti</h3>
<blockquote><p>
"Parti derives from understandings that are nonarchitectural and must be cultivated before architectural form can be born."
</p></blockquote>
<p>Parti has been in "architecture" for a long time, it also gets mentioned in <a href="http://http://www.uxlondon.com/programme/2009-06-15/luke/">ux articles</a>.</p>
<p>At its most ambitious, parti derives from matters more transcendent than mere archtiecture. </p>
<p>I like the abstract notions behind it.</p>
<h3>#48 If you can't explain your ideas to your grandmother in terms that she understands, you don't know your subject well enough.</h3>
<blockquote><p>
"Some architects, instructors, and students use overly complex (and often meaningless!) language in an attempt to gain recognition and respect.<br />
Try not to let them get away with it and whatever you do don't imitate them."
</p></blockquote>
<p>When this happens to you, be critical, instead o <a href="http://www.amazon.com/Style-Ten-Lessons-Clarity-Grace/">blind obedience, practice selective observerance</a></p>
<p>When you are accused of this, take the time to try and draw a picture or explain it in whatever form suits you best.</p>
<h3>#51 Beauty is due more to harmonious relationships amount the elements of a composition than to the elements themselves</h3>
<blockquote><p>"Build a car out of the most beautiful features of teh most stunning cars ever made. See if your friends will be seen in it with you."
</p></blockquote>
<h3>#78 "The success of the masterpieces seems to lie not so much in their freedom from faults - indeed we tolerate the grossest errors in them all - but in the immense persuasiveness of a mind which has completely mastered its perspective." </h3>
<p>Virginia Woolf.</p>
<h3>#98 The Chinese symbol for crisis is comprised of two characters: one indicating 'danger', the other 'opportunity.'"</h3>
<p>Whille it sounds good, the interpretation is false, see: <a href="http://www.pinyin.info/chinese/crisis.html">pinyin.info</a> and <a href="http://en.wikipedia.org/wiki/Chinese_translation_of_crisis">wikipedia</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Some+comments+on+101+Things+I+Learned+in+Architecture+School+http://ccipx.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Some+comments+on+101+Things+I+Learned+in+Architecture+School+http://ccipx.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Productive Programming</title>
		<link>http://brettdargan.com/blog/2009/02/05/productive-programming/</link>
		<comments>http://brettdargan.com/blog/2009/02/05/productive-programming/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 03:07:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=294</guid>
		<description><![CDATA[I've had a few questions about the Productive Programming Book, here are a few of the pearls I got from it:

SLAP
all code in a method live at the same level of abstraction. Nice acronym.
Aristotles Essential and Accidental Properties
Notions of Accidental Complexity have been around for a lot longer than I thought.
Dietzlers Law - 80-10-10 (classic) [...]]]></description>
			<content:encoded><![CDATA[<p>I've had a few questions about the Productive Programming Book, here are a few of the pearls I got from it:</p>
<dl>
<dt>SLAP</dt>
<dd>all code in a method live at the same level of abstraction. Nice acronym.</dd>
<dt>Aristotles Essential and Accidental Properties</dt>
<dd>Notions of Accidental Complexity have been around for a lot longer than I thought.</dd>
<dt>Dietzlers Law - 80-10-10 (classic) </dt>
<dd>you can do 80 percent of what the customer wants in a remarkably short time. The next 10 percent is possible, but takes a lot of effort. The last 10 percent is flat out impossible because you can't get "underneath" all the tooling and frameworks. And users want 100 percent of what they want, so 4GLs gave way to general-purpose languages (Visual BASIC, Java, Delphi, and eventually C#). Java and C# in particular were designed to make C++ easier and less error prone, so the developers built-in some fairly serious restrictions in the interest of keeping average developers out of trouble. They created their own versions of the "80-10-10 Rule," only this time the stuff you couldn't do was much more subtle.
</dd>
</dl>
<ul>
<li><a href="http://oreilly.com/catalog/9780596519780/">Productive Programmer</a></li>
</ul>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Productive+Programming+http://5tf5n.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Productive+Programming+http://5tf5n.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/02/05/productive-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>link and self; rel=&#8221;canonical&#8221; and rev=&#8221;canonical&#8221;</title>
		<link>http://brettdargan.com/blog/2009/01/22/link-and-self/</link>
		<comments>http://brettdargan.com/blog/2009/01/22/link-and-self/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 23:26:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RESTful]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=285</guid>
		<description><![CDATA[




This is based on a cross post from http://www.innoq.com/blog/st/2009/01/link_and_self.html.
Subbu and &#60;Stefan Tilkov have been discussing URI  Equivalence, linking to self and Resource Identities, so here is my view.
Subbu's last remark asks the question

&#62;&#62;&#62;
On January 18, 2009 4:32 AM, Subbu Allamaraju said:
Here is a longer response that is longer than a comment &#60;img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>This is based on a cross post from <a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html">http://www.innoq.com/blog/st/2009/01/link_and_self.html</a>.</p>
<p><a class="reference external" href="http://www.subbu.org/blog/2008/12/resource-identity-and-cool-uris">Subbu</a> and <a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html">&lt;Stefan Tilkov</a> have been discussing URI  Equivalence, linking to self and Resource Identities, so here is my view.</p>
<p><a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html#comment-1926">Subbu's last remark asks the question</a></p>
<pre class="doctest-block">
&gt;&gt;&gt;
On January 18, 2009 4:32 AM, Subbu Allamaraju said:
Here is a longer response that is longer than a comment &lt;img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /&gt;
</pre>
<p><a class="reference external" href="http://www.subbu.org/blog/2009/01/uris-vs-identifiers-take-two">http://www.subbu.org/blog/2009/01/uris-vs-identifiers-take-two</a></p>
<p>IMHO URI non-equivalence does not imply resource non-equivalence.
And if that is really important to your application there SHOULD be ways to handle it.</p>
<p>I agree with Stefan on providing a canonical resource.</p>
<p>You can argue both ways that person and person with address book are either two representations of a person resource, or two different resources, that is the great thing about the Web.</p>
<p>For this case in the atom self link what about using the &lt;b&gt;rev tag&lt;/b&gt; to identify the canonical resource that makes sense for your application.</p>
<p>Since rev also accepts space separated list of link-types you could mark it with both the type and the uri of the canonical resource.</p>
<!-- code-block: html -->
<p>&lt;link href=&quot;<a class="reference external" href="http://www.example.org/person/abc?include=addressBook">http://www.example.org/person/abc?include=addressBook</a>&quot; rel=&quot;self&quot; rev=&quot;canonical <a class="reference external" href="http://www.example.org/person/abc">http://www.example.org/person/abc</a>&quot;/&gt;</p>
<p>As to whether or not <strong>two different entities that returned from different URI</strong> are based on the <strong>same version of the canonical resource or not</strong>:</p>
<p>I would use an EntityTag that encoded some value of resource state and some value of the representation.
Eg. template for xhtml representation may change without resource state and the ETag must change in order to reflect that.</p>
<p>To KISS.</p>
<p>If you had an ETag consisted of something like <strong>&quot;resourceVersion=20,reprVersion={date}&quot;</strong>
Then your application could extract out the self links with <strong>identical rev tags</strong> and extract from the ETag the resourceVersion.</p>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=link+and+self%3B+rel%3D%27%27canonical%27%27+and+rev%3D%27%27canonical%27%27+http://zresm.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=link+and+self%3B+rel%3D%27%27canonical%27%27+and+rev%3D%27%27canonical%27%27+http://zresm.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/01/22/link-and-self/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>URI Design &#8211; Matrix Params for cross-cutting concerns</title>
		<link>http://brettdargan.com/blog/2009/01/16/uri-design-matrix-params-for-cross-cutting-concerns/</link>
		<comments>http://brettdargan.com/blog/2009/01/16/uri-design-matrix-params-for-cross-cutting-concerns/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 14:54:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RESTful]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=217</guid>
		<description><![CDATA[




Looking at URI design, there are a lot of cross-cutting concerns across many a resource.
It would be great to come up with some conventions for the most common.
These are some of the ones I've been percolating on.

You can see there are a broad range, including:

different views or representations of a resource, around breadth/depth of it's [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>Looking at URI design, there are a lot of cross-cutting concerns across many a resource.
It would be great to come up with some conventions for the most common.</p>
<p>These are some of the ones I've been percolating on.</p>
<dl class="docutils">
<dt>You can see there are a broad range, including:</dt>
<dd><ul class="first last simple">
<li>different views or representations of a resource, around breadth/depth of it's data and relations</li>
<li>user request based affects on a representation</li>
<li>resource version</li>
<li>application supporting mechanisms, returning fragments and forms or form fragments</li>
<li>temporality</li>
</ul>
</dd>
</dl>
<p>There are a few more, but the trick is having less, right.</p>
<table border="1" class="docutils">
<colgroup>
<col width="6%" />
<col width="94%" />
</colgroup>
<tbody valign="top">
<tr><td>;version</td>
<td>entity version that is</td>
</tr>
<tr><td>;_for_edit ;_for_inline_edit</td>
<td>return html fragment</td>
</tr>
<tr><td>;_at_instant={utc_milliseconds}</td>
<td>get this resource as it would be represented at this point in time</td>
</tr>
<tr><td>;_for_period=iso8601 format</td>
<td>holidays during these periods/durations. die to start and end date ranges. or ;_for_interval</td>
</tr>
<tr><td>;_role=admin</td>
<td>&nbsp;</td>
</tr>
<tr><td>;_repr=code_value</td>
<td>representation of code_value. May also need numcode_value and maybe a triple for code,short name and description</td>
</tr>
<tr><td>;_repr=summary|detail|depth</td>
<td>you get the idea</td>
</tr>
<tr><td>;_repr=no_ambiguity</td>
<td>return a 300 Multiple Choices, if there must be no ambiguity in the request. If the request can not fully determine the intended resource. Often in practice a convention will be followed, like the latest version of the resource. If you support multiple versions do you do what wikipedia does and offers a disambiguity page (as a standard OK response). Although disambiguity pages could cause issues in situations where you expect all particular requests of a resource to return same formatted representation ie. no ambiguity.</td>
</tr>
<tr><td>;additional_param=xyz</td>
<td>#ambiguity resolution</td>
</tr>
<tr><td>;fragment</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>See also <a class="reference external" href="http://wikipedia.com/ISO_8601">ISO8601</a></p>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=URI+Design+--+Matrix+Params+for+cross-cutting+concerns+http://sisb5.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=URI+Design+--+Matrix+Params+for+cross-cutting+concerns+http://sisb5.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/01/16/uri-design-matrix-params-for-cross-cutting-concerns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
