<?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 &#187; design</title>
	<atom:link href="http://brettdargan.com/blog/tag/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettdargan.com/blog</link>
	<description>Thoughts and rants</description>
	<lastBuildDate>Fri, 28 May 2010 01:35:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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%E2%80%9Dcanonical%E2%80%9D+and+rev%3D%E2%80%9Dcanonical%E2%80%9D+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" /></a> <a class="tt" href="http://twitter.com/home/?status=link+and+self%3B+rel%3D%E2%80%9Dcanonical%E2%80%9D+and+rev%3D%E2%80%9Dcanonical%E2%80%9D+http://zresm.th8.us" title="Post to Twitter">Tweet This Post</a></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+%E2%80%93+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" /></a> <a class="tt" href="http://twitter.com/home/?status=URI+Design+%E2%80%93+Matrix+Params+for+cross-cutting+concerns+http://sisb5.th8.us" title="Post to Twitter">Tweet This Post</a></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>
		<item>
		<title>Query vs. Matrix Params or Path Params</title>
		<link>http://brettdargan.com/blog/2009/01/16/query-vs-matrix-params/</link>
		<comments>http://brettdargan.com/blog/2009/01/16/query-vs-matrix-params/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 14:09:30 +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=211</guid>
		<description><![CDATA[




I've come across a few posts about Matrix Parameters recently and there is a lot of misunderstanding.
There are several old posts that discuss and describe these things:

Query Strings Considered Harmful
w3c MatrixURIs


I've summarised what I think is important:

urls with query params won't have their response cached by intermediaries/proxies (at present)
matrix parameters may appear anywhere in path
calculating [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>I've come across a few posts about Matrix Parameters recently and there is a lot of misunderstanding.</p>
<p>There are several old posts that discuss and describe these things:</p>
<ul class="simple">
<li><a class="reference external" href="http://rest.blueoxen.net/cgi-bin/wiki.pl?QueryStringsConsideredHarmful">Query Strings Considered Harmful</a></li>
<li><a class="reference external" href="http://www.w3.org/DesignIssues/MatrixURIs.html">w3c MatrixURIs</a></li>
</ul>
<dl class="docutils">
<dt>I've summarised what I think is important:</dt>
<dd><ul class="first last simple">
<li>urls with query params <a class="reference internal" href="#won-t-have-their-response-cached-by-intermediaries-proxies-at-present">won't have their response cached by intermediaries/proxies (at present)</a></li>
<li>matrix parameters may appear anywhere in path</li>
<li><a class="reference internal" href="#calculating-the-relative-uri">calculating the relative uri</a> is different</li>
<li>much more than uri convention</li>
<li>query params are generally abused to add new verbs instead of using existing methods on resources</li>
<li>matrix parameters are not resources, they are aspects that help reference a resource in an information space that is difficult to represent within a hierarchy</li>
</ul>
</dd>
</dl>
<p><strong>Tip: If you're not sure if you should use them then don't.</strong></p>
<dl class="docutils">
<dt>Matrix parameters are used with</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href="http://developer.yahoo.com/yui">YUI paging widgets</a></li>
<li><a class="reference external" href="http://rails.org">RoR</a> /some/resource/id;edit</li>
<li>J2ee fallsback to ;jsessionid=xxx when no cookies can be set.</li>
<li><a class="reference external" href="http://jersey.dev.java.net">Jersey (JAX-RS RefImpl) has good support</a></li>
</ul>
</dd>
</dl>
<div class="section" id="caching-issues">
<span id="won-t-have-their-response-cached-by-intermediaries-proxies-at-present"></span><h3>Caching Issues</h3>
<dl class="docutils">
<dt>Intermediaries (proxies) won't cache any url with a query parameter in the url</dt>
<dd><ul class="first last simple">
<li>this is because in the early days of the web, they didn't trust the Cache control information from dynamically generated pages.</li>
<li>Freshness and Validation information are very important pieces of information and the proxy admins took a cautious stance and didn't cache any of it.</li>
</ul>
</dd>
</dl>
<p>As the web has matured the views of devs/admins are changing, the new versions of Squid will default to cache any urls with query parameters</p>
<p>Obviously this could have a very large impact, I've heard google maps image tiles had this issue with some proxies at one time.</p>
</div>
<div class="section" id="relative-uri-calculations">
<span id="calculating-the-relative-uri"></span><h3>Relative URI calculations</h3>
<p>Relative URIs have different affects, as relatives URLs are determined by appending to the Base URI. For Query Parameter requests they are stripped from the Base.</p>
<p>For those still interested I would recommend checking out the following in addition to the <a class="reference external" href="http://tools.ietf.org/html/rfc2616">RFC-2616</a> of course.</p>
<blockquote>
<ul class="simple">
<li><a class="reference external" href="http://www.oreillynet.com/xml/blog/2006/12/the_matrix_revisited.html">the matrix revisited</a></li>
<li><a class="reference external" href="http://rest.blueoxen.net/cgi-bin/wiki.pl?PathsAndQueryStrings">PathsAndQueryStrings</a></li>
<li><a class="reference external" href="http://doriantaylor.com/policy/http-url-path-parameter-syntax">http url path parameter syntax</a></li>
<li><a class="reference external" href="http://blogs.sun.com/sandoz/entry/building_uris">Building URIs</a></li>
</ul>
</blockquote>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Query+vs.+Matrix+Params+or+Path+Params+http://xba34.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" /></a> <a class="tt" href="http://twitter.com/home/?status=Query+vs.+Matrix+Params+or+Path+Params+http://xba34.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/01/16/query-vs-matrix-params/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Considerations in Communicating the Intent of Software Design</title>
		<link>http://brettdargan.com/blog/2009/01/08/considerations-in-communicating-the-intent-of-software-design/</link>
		<comments>http://brettdargan.com/blog/2009/01/08/considerations-in-communicating-the-intent-of-software-design/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:17:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[intent]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[sdec]]></category>

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




I finished reading Neal Fords book &#34;The Productive Programmer&#34; [Ford2008]
It wasn't quite what I expected, but none the less it was well worth the purchase.
While there are a few topics I agree with but not to the same extent as him, the topic I strongly disagree with is on the generation of large amounts of [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>I finished reading Neal Fords book &quot;The Productive Programmer&quot; <a class="citation-reference" href="#ford2008" id="id1">[Ford2008]</a>
It wasn't quite what I expected, but none the less it was well worth the purchase.</p>
<p>While there are a few topics I agree with but not to the same extent as him, the topic I strongly disagree with is on the generation of large amounts of documentation.</p>
<p>Documentation in this form merely serves as another one of those checklist items on a project plan.</p>
<p><strong>&quot;Conveying understanding&quot;</strong> should be the underlying purpose for which usually wiki pages or documentation is produced in order to communicate with others through time and space. Documentation is <strong>not just about information</strong>.</p>
<p>Consider your own experience when it comes to picking up documentation produced by others no longer working on the systems.</p>
<p>Most documentation is brain dumped with little thought given to the actual writing or conveying of information.
Anyone can describe the complicated in a complex manner, it takes <strong>more skill</strong> to take a complicated details and make them <strong>simple to understand</strong>.</p>
<p>Large volumes of javadoc, don't help me, it is another layer of indirection and as Robert C. Martin says regarding code, <strong>&quot;all comments are lies&quot;</strong>. Deep down everyone knows this, even though many people are still in denial.</p>
<dl class="docutils">
<dt>Rarely did I get documentation that was:</dt>
<dd><ul class="first last simple">
<li><em>reasonably accurate</em> in terms of what it was meant to do</li>
<li>mostly it differed significantly in how it was actually implemented</li>
<li>usually had typos in crucial lines that didn't aid understanding at all</li>
<li>large <em>gotchas</em> aka time-bombs are not mentioned</li>
<li>building and configuration where slightly covered</li>
<li>the best you usually wish for is some clues for which you can pull out your best Dr. Holmes hat and get to work with</li>
</ul>
</dd>
</dl>
<p>The choice of <strong>conveying understanding</strong> via documentation is one of the least effective mediums for communication. Refresh your memory of Alistair Cockburn's <a class="citation-reference" href="#cockburnambler" id="id2">[CockburnAmbler]</a>; analysis of various communication mediums and it's effectiveness.</p>
<div class="section" id="so-it-begs-the-question-why-are-comments-in-code-not-helping">
<h3>So it begs the question, why are comments in code not helping?</h3>
<p>With current tools and technologies there are so many layers that the <strong>code</strong> is scattered all around the place, in xml files, in os scripts, in java, stored procedures.</p>
<p>Fundamentally the <strong>Intention of Design</strong> being conveyed comments, or even as class diagrams are insufficient, therefore wasteful.</p>
<dl class="docutils">
<dt>There are a number of actors and forces at play</dt>
<dd><ul class="first last simple">
<li>The <strong>wrong</strong> things are asked by management to be documented. Things that are most likely to change are given prime focus in the documentation. Unstable or fast changing parts of the code base, things that are easily inspected directly in code and tests (<em>you have tests right?</em>).</li>
<li>Developers don't know any better, they are documenting, what they have produced, in the easiest way that they can, because
- they know <strong>no one will read it</strong>
- or if it is read the readers won't pay much attention to it anyway ie. <strong>they don't trust it</strong></li>
</ul>
</dd>
</dl>
<p>One approach to improve this situation could be learn from other fields of study, ones that rely a lot on <strong>communication of intent</strong> rather than <strong>ticking off items on the project plan</strong></p>
<p>Last year, I spent a little time thinking about this problem, as we had the problem of improving inter team communication with as little overhead as possible. They already had a typical template for the usual type of things, general design, building, testing, technical details, including implemenation details.</p>
<p>But as a reviewer, what really struck me was the fragility of this documentation, a lot of things that were most likely to change, composed a reasonable chunk of the document.</p>
<p>Lucky for me, I had recently read a book &quot;Sources of Power&quot; <a class="citation-reference" href="#klein1998" id="id3">[Klein1998]</a>.
It so happens that the armed forces represent a very large organisation with large communication issues. Orders need to be carried out and passed down the chain of command.</p>
</div>
<div class="section" id="considerations-in-communicating-intent">
<h3>Considerations in Communicating Intent</h3>
<p>(From pg. 225, ever so slightly modified)</p>
<ol class="arabic">
<li><dl class="first docutils">
<dt>Purpose.</dt>
<dd><ul class="first last simple">
<li>What are the High Level goals and within what context.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Objective of task.</dt>
<dd><ul class="first last simple">
<li>What is the desired outcome.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Plan.</dt>
<dd><ul class="first last simple">
<li>Sequence of Steps in the Plan.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Rationale.</dt>
<dd><ul class="first last simple">
<li>Why is this plan good, what makes this approach a better one over other approaches.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Key Decisions.</dt>
<dd><ul class="first last simple">
<li>Explicit expectation that there is uncertainty in the plan. Some anticipated key decisions will need to be made at more appropriate and beneficial times as progress.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Unwanted Outcomes.</dt>
<dd><ul class="first last simple">
<li>Anti Goals. There are many unwanted outcomes, often these may be things that immediately spring to mind. ie. that doing <strong>the simplest thing possible</strong> would be bad as it will attribute to an unwanted outcome. But in fact developers may unknowingly compromise the design of the system.</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Constraints and other considerations.</p>
</li>
</ol>
<p>Things I like about these considerations:</p>
<blockquote>
<ul>
<li><dl class="first docutils">
<dt>Things that are most likely to change less frequently are documented.</dt>
<dd><ul class="first last simple">
<li>Purpose, goals within a business context, can last 12-18mths.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Ample opportunity to highlight &quot;tradeoffs&quot; that occurred.</dt>
<dd><ul class="first last simple">
<li>Things that &quot;come back to <em>haunt</em> you&quot; should be mentioned in something with a longer memory than your brain. Perhaps when the next team get it they don't become <em>&quot;Angry Monkeys&quot;</em>. Eg. Due to &quot;abc&quot; constraint we took &quot;sdf&quot; workaround OR  <em>when you touch this next make sure you fix &quot;xyz&quot;</em>.</li>
<li>That sort of information can take <strong>hours or days to re-learn next time</strong>, not to mention the fact that someone may learn it after planning has occurred. Yet all it takes is a one or two lines to actually make documenting deliver some value.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Plan.</dt>
<dd><ul class="first last simple">
<li>must not be a duplication of some other list, it needs to convey meaning and include the important bits for discussion, it is not a replacement for story or task cards or gantt charts.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Developers will often get focused on a small item.</dt>
<dd><ul class="first last simple">
<li>In a broader context that small item may have very little relevance.</li>
<li>Context and purpose get considered and documented to help <strong>keep it real</strong>.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>When circumstances change.</dt>
<dd><ul class="first last simple">
<li>as they often do, developers have some contextual information to make <strong>informed decisions</strong>.</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">As the project progresses and we learn more about the project, tools and users, we will discover better ways of achieving goals or ways of eliminating steps in the plan.</p>
</li>
<li><p class="first">There is a larger &quot;surface area&quot; for less experienced developers to gain some insight into factors that are discussed and decided upon during design and to raise questions.</p>
</li>
</ul>
</blockquote>
<p>As I work <em>amongst</em> several project teams, I strive to get the leads to write about these considerations. Even if they don't make it for prosperity we are sure to have the conversations.</p>
<p>These considerations fit in with the primary aim of that book, which is Decision Making, but I'll leave that for another time.</p>
<p>The thing to remember is with your documentation is, what are you trying to achieve. Follow the DRY principle and don't reiterate stuff that people should already know.</p>
<table class="docutils citation" frame="void" id="ford2008" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[Ford2008]</td><td>Neal Ford, <em>The Productive Programmer</em>, O'Reily Media, Sebastopol, 2008</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="schwartz2004" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[Schwartz2004]</td><td>. Barry Schwartz, <em>Paradox of Choice</em>. HarperCollins, New York, 2004.</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="cockburnambler" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[CockburnAmbler]</td><td>Scott Ambler sourced from Alistair Cockburn</td></tr>
</tbody>
</table>
<!-- Amblers Essay: http://www.agilemodeling.com/essays/communication.htm#HowDoWeCommunicate -->
<table class="docutils citation" frame="void" id="klein1998" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[Klein1998]</td><td>Gary Klein, <em>Sources of Power</em>, Massachusetts Institute of Technology, 1998</td></tr>
</tbody>
</table>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Considerations+in+Communicating+the+Intent+of+Software+Design+http://mee4q.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" /></a> <a class="tt" href="http://twitter.com/home/?status=Considerations+in+Communicating+the+Intent+of+Software+Design+http://mee4q.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/01/08/considerations-in-communicating-the-intent-of-software-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimental Java Circuit Breaker Pattern Implementation</title>
		<link>http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/</link>
		<comments>http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 15:24:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Stability, Performance and Monitoring]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/</guid>
		<description><![CDATA[I read "Release It" recently, not a bad book, some good stories, I wish more people would pay attention to things like Stability and Capacity.
Anyway I liked the Circuit Breaker pattern, as I've seen a number of apps with highly coupled systems that barf once latency increases in the back ends then you get "Cascading [...]]]></description>
			<content:encoded><![CDATA[<p>I read <a href="http://www.pragprog.com/titles/mnee" title="Release It">"Release It"</a> recently, not a bad book, some good stories, I wish more people would pay attention to things like Stability and Capacity.</p>
<p>Anyway I liked the Circuit Breaker pattern, as I've seen a number of apps with highly coupled systems that barf once latency increases in the back ends then you get "Cascading Failures" and the webapp's request handler thread pool is exhausted and they all wait their mandatory 30 seconds for a response. Eventually the app either dies, or gets taken out of a load balance farm causing a "Chain Reaction".</p>
<p>Here is an <a href="http://brettdargan.com/blog/wp-content/uploads/2007/12/circuit_breaker.tgz" title="Experimental Circuit Breaker Implementation (circuit_breaker.tgz)">Experimental Circuit Breaker Implementation (circuit_breaker.tgz)</a> , <strong>NOT built or tested FOR PRODUCTION use in anyway</strong>. There is explicity no thread safety no the actual CircuitBreakerSimple class.</p>
<p>download, extract and run ant.</p>
<p>Play around with the parameters to see the affect. Generally it seems to thrash more with increased concurrent threads and interestingly in jdk1.6 sometimes reverts to the default timeout instead of the instance value.</p>
<p>Based roughly on the following logic:<br />
When Circuit is Closed:<br />
on call = pass through<br />
call succeeds = reset count<br />
call fails = count failure<br />
threshold reached = trip breaker. Open State</p>
<p>when Circuit is Half-Open<br />
on call = pass through<br />
call succeeds = reset go. Close State<br />
call fails = trip breaker. Open State</p>
<p>when Circuit is Open<br />
on call = return/fail<br />
on timeout = attempt reset. Half-Open State</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Experimental+Java+Circuit+Breaker+Pattern+Implementation+http://si2ri.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" /></a> <a class="tt" href="http://twitter.com/home/?status=Experimental+Java+Circuit+Breaker+Pattern+Implementation+http://si2ri.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Keeping layers decoupled</title>
		<link>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/</link>
		<comments>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 16:02:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=56</guid>
		<description><![CDATA[A while ago I wrote a unit test that used JDepend to help keep developers using a layered approach when using packages. Unfortunately devs worked out that by creating new packages they could work around that limitation instead of using IOC and avoiding circular dependencies.
So Tom mentioned the ant-contrib tasks, Compile With Walls and VerifyDesign. [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I wrote a unit test that used JDepend to help keep developers using a layered approach when using packages. Unfortunately devs worked out that by creating new packages they could work around that limitation instead of using IOC and avoiding circular dependencies.</p>
<p>So Tom mentioned the <a href="http://sourceforge.net/projects/ant-contrib">ant-contrib</a> tasks, Compile With Walls and VerifyDesign. </p>
<p>Compile with Walls is great, packages won't compile if layers are broken. It is marked as deprecated with Verify Design to replace it. </p>
<p>Verify Design works after compilation and can't detect the source code violations of constants imported from other packages.</p>
<p>Compile With Walls requires dependant packages to declare all dependencies and the dependencies of dependencies, which could get unwieldly, but still potentially useful. An option to not have to do that would be nice.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Keeping+layers+decoupled+http://kdhb7.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" /></a> <a class="tt" href="http://twitter.com/home/?status=Keeping+layers+decoupled+http://kdhb7.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>System Management Patterns</title>
		<link>http://brettdargan.com/blog/2005/07/01/system-management-patterns/</link>
		<comments>http://brettdargan.com/blog/2005/07/01/system-management-patterns/#comments</comments>
		<pubDate>Thu, 30 Jun 2005 21:13:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Stability, Performance and Monitoring]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=49</guid>
		<description><![CDATA[Recently the client I've been working towards using webservices with third parties and this has partly prompted me to articulate a couple of potential System Management Patterns. I've asked google and not found any related articles, so here goes.
System Management Patterns Overview

Collect Correlated System Metrics
Gather and store correlated system metrics.
The essence of this pattern is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the client I've been working towards using webservices with third parties and this has partly prompted me to articulate a couple of potential System Management Patterns. I've asked google and not found any related articles, so here goes.</p>
<p>System Management Patterns Overview<br />
<a href="http://brettdargan.com/blog/wp-content/uploads/2007/08/patterns-overiew.png" title="System Management Patterns Overview"><img src="http://brettdargan.com/blog/wp-content/uploads/2007/08/patterns-overiew.png" alt="System Management Patterns Overview" border="0" height="412" width="686" /></a></p>
<h3><a title="CollectCorrelatedSystemMetrics" name="CollectCorrelatedSystemMetrics"></a>Collect Correlated System Metrics</h3>
<p>Gather and store correlated system metrics.</p>
<p>The essence of this pattern is enable collection of multiple correlated data points over time to provide a picture of the system components that can be analysed at all interesting layers. Enabling better informed business, architectural and design decisions about the system or it's components.</p>
<p>The necessity of this pattern grows as we handle the web's bursty traffic nature and rely on more distributed services. I cannot over state the significant value this provides that will flow through the organisation and it's partners.</p>
<h4>How it Works</h4>
<p>Identify what components make up your system, what dependencies there are and start from the bottom of the pyramid.<br />
<a href="http://brettdargan.com/blog/wp-content/uploads/2007/08/pattern-ccsm.png" title="Correlated System Metrics"><img src="http://brettdargan.com/blog/wp-content/uploads/2007/08/pattern-ccsm.png" alt="Correlated System Metrics" border="0" height="259" width="364" /></a></p>
<p>There are many mature tools and protocols that already provide monitoring at the  Operating System level.</p>
<p>Depending on what container or virtual machine you have they may support the defacto industry standard for monitoring.</p>
<p>Track major data points within your application. For a Web based retailer there are particular areas that would be important, such as Inventory Searches, Purchasing, third party dependencies, like Payment System Providers.</p>
<h4>Using It</h4>
<ul>
<li>Collect correlated system metrics in real-time. Log file analysis has a longer feedback loop, can introduce correlation issues, easily lost or overwritten and doesn't scale well as more system components are added.</li>
<li>Use it often, resolve problems with collection as a high priority, the value it provides decrease as reliability of results or collection.</li>
<li>Prefer the collection of raw data points over aggregated data where possible as you need to make arbitrary choice of aggregation which may prevent the use of the metric with other metrics.  If you were measuring response time for a service serving many concurrent clients, you could track, hitcount and total response time or you may track hitcount and avg. response time over what: period of time, or last x hits?&gt;</li>
<li>Think about coverage, do you have too much? Do you have too little? Don't get too much information, avoid paralysis by analysis.</li>
<li>Think about your system, it is alive, it constantly changes, whether that is code, hardware, os or business usage, everyday is unique!</li>
<li>Don't blindly trust the statistics you have, occasionally, independently verify important statistics, does not have to be exact, could use back of the envelope calculations.</li>
<li>Serious usage may warrant a separate network.</li>
</ul>
<h4>Example</h4>
<p>The technology to support the implementation of this has been around for years<br />
and is mature in the infrastructure layer of a system. There are several network management applications that build upon <a href="http://www.ietf.org/rfc/rfc1157.txt" title="Simple Network Management Protocol">SNMP</a> and <a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/">Round Robin Database Tool</a> to collect real time data and specify a suitable granularity of aggregation to limit archive size, yet still allow queries to be performed.</p>
<p>SNMP monitoring has recently been added to the Java JVM itself. At the application level there are several snmp implementations that could be used to enable a poller, or statistics collector to query your app for certain metrics.</p>
<p>So it is possible to create a system view that spans the Operating System (cpu, disk, network adaptors), Virtual Machine, Container and your application.</p>
<h4>Reap the Benefits</h4>
<p>Knowledge of your approximate workload is the first step.</p>
<p>The benefits flow from the day to day operational aspects to the CIO assuming sufficient coverage has been implemented. Operations/Production Support have an increased ability to diagnose issues, they can identify cause and affect immediately after a change instead of guessing, to the strategic end of town. Better diagnosis of issues, may only be to the extent that significant time is not wasted looking in an area that is not causing the problem. In many cases it will highlight what component is or is not causing a problem and further analysis of the <a href="#CorrelatedComponentSnapshot">Correlated Component Snapshot</a> needs to be investigated.</p>
<p>Developers can use those numbers to <a href="ScalingApproximateWorkload">approximate workload and test large scale changes to the system</a>, like changing operating systems, changing databases, doubling inventory etc.</p>
<ul>
<li>CIO, can get more confident answers to:<br />
What is the <a href="#Fowler" title="see [Fowler] for performance terms">load sensitivity</a> to the system, if we double inventory? What happens if we introduce a promotion that is likely to increase traffic 10 times for the length of the promotion? How much hardware do we need to purchase to support these loads?</li>
<li>Technical Operations Manager, are my servers up? What happened at 13:00, to spike cpu usage by 20%? Is load within reasonable? limits? Are there errors on any devices? We changed disk arrays and performance has decreased?</li>
<li>Production Support, should have a dashboard of important points usually spanning all layers. They can ask questions like: Hey we requested a that package xyz be upgraded and response time of service abc has doubled?</li>
<li>Development Team, the real workload is alot different to what everyone anticipated. Do we need to focus on a different area? Do we need to add or tune caches?</li>
</ul>
<h3><a title="CorrelatedComponentSnapshot" name="CorrelatedComponentSnapshot"></a>Correlated Component Snapshot</h3>
<p>Collect correlated detailed information of a System Component.</p>
<h4>How it Works</h4>
<p>Periodically collect detailed correlated information about your System Component . Let you travel back in time to see what happened to a component, maybe even to see the cause of the resulting affect. It is useful for diagnosing system problems in both production as well as determining and removing bottlenecks when <a href="#ScalingApproximateWorkload">Scaling Approximate Workload</a>.</p>
<h4>Using It</h4>
<ul>
<li>Gather and store detailed correlated information of a System Component.<br />
Collected periodically based on a balance of component usage, gathering cost. 20 minute i is a good rule of thumb</li>
<li>A listing of top running processes at that point in time.</li>
<li>A database server, may have information such as locking transactions, long running transactions, database specific internal statistic reports.</li>
<li>Typically recent data would be stored. Older data to be archived or removed.</li>
</ul>
<h3><a href="ScalingApproximateWorkload">Scaling Approximate Workload</a></h3>
<p>Build tests that can approximate the real workload or your system.</p>
<h4>How it Works</h4>
<p>Having the ability to scale an approximate workload of your system that is monitored via <a href="CollectCorrelatedSystemMetrics">Collect Correlated SystemMetrics</a> provides the ability to really see what is happening to the system when changes occur. It provides the final metrics by which changes to components or workload can analysed and simulated.</p>
<p>This enables developers to simulate and answer "What If?" type of questions.</p>
<h4>Using It</h4>
<ul>
<li>Build read only tests and read-write tests of vital functions. Read-only tests will provide a further level of approximation without the extent of data management imposed by the read-write test.</li>
<li>The tests must be written in a loosely coupled way, to enable simple scaling up of workload. They are intended to be used by a tool that allows simple manipulation of scaling parameters, such as number of clients, number of hits per hour etc.</li>
<li>Approximate data usage as well as functionality usage. While randomness of data is important, significant data distribution should reflected in you most important tests. Don't randomly choose products if a product category represents significant proportions of browsing or searching. If 50% of products browsed are from 1 product category then weight it accordingly.</li>
</ul>
<h3><a title="Ping" name="Ping"></a>Ping</h3>
<p>Is your service platform alive and what is the upper bound performance limit [Bulka] I could potentially achieve from a service on your platform at this time.  This gives meaning to the efficiency of system components under real or approximate workloads when monitored via <a href="#CollectCorrelatedSystemMetrics">Collect Correlated System Metrics</a></p>
<h4>How it Works</h4>
<p>A simple service of your service platform that does nothing, but returns immediately with a suitable response. Requires that a Ping service on the service platform be implemented.</p>
<p>In the case of a Servlet this may be an empty html form with a 200 response code. In the case of a webservice it responds in a similar way, perhaps with application specific response codes as well. In the case of a virtual machine you may be pinging a synchronized resource, to check it's liveness [Lea].</p>
<h4>Using It</h4>
<ul>
<li>This can be used for internal components and more beneficially for external third party components.</li>
<li>Very effective in helping to determine where limiting factors lay; virutal machines, operating systems, design or architecture of a system</li>
<li>Dynamically adjust your system to reduce workload on third parties. As webservices adoption grows businesses will become even more reliant on responsiveness of third party partners. In an ideal world any third party systems will be able to handle any load your system can throw at it. But in site that is growing exponentially, partners may not have the inclination, contractual obligation or capabilities to scale as fast as your organisation. It is most likely the case that some messages are more important than others and that changing the workload you place on their system, or altering practices to accomodate cyclic degradation in their system could be very beneficial.</li>
</ul>
<h4>References</h4>
<p>[Bulka] <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0201704293/qid=1120167799/sr=8-2/ref=sr_8_xs_ap_i2_xgl14/104-7932080-7784733?v=glance&amp;s=books&amp;n=507846">Java Performance and Scalability, Volume 1</a></p>
<p><a title="Fowler" name="Fowler"></a>[Fowler] <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321127420/104-3299664-3518357?v=glance">Patterns of Enterprise Architecture</a></p>
<p>[Lea]<br />
<a href="http://www.amazon.com/exec/obidos/tg/detail/-/0201310090/qid=1120188315/sr=8-1/ref=pd_bbs_ur_1/104-3299664-3518357?v=glance&amp;s=books&amp;n=507846">Concurrent Programming in Java(TM): Design Principles and Pattern (2nd Edition)</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=System+Management+Patterns+http://h9nnf.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" /></a> <a class="tt" href="http://twitter.com/home/?status=System+Management+Patterns+http://h9nnf.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2005/07/01/system-management-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
