<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Arnon Rotem-Gal-Oz's Cirrus Minor</title>
    <link>http://www.rgoarchitects.com/nblog/</link>
    <description>"Making IT work" - Musings of a Holistict Architect</description>
    <language>en-us</language>
    <copyright>Arnon Rotem-Gal-Oz</copyright>
    <lastBuildDate>Tue, 23 Jun 2009 21:03:16 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>Arnon@RgoArchitects.com</managingEditor>
    <webMaster>Arnon@RgoArchitects.com</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CirrusMinor" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=d6d71d3d-1370-477d-a8c6-2c95c7f41a4e</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,d6d71d3d-1370-477d-a8c6-2c95c7f41a4e.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,d6d71d3d-1370-477d-a8c6-2c95c7f41a4e.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=d6d71d3d-1370-477d-a8c6-2c95c7f41a4e</wfw:commentRss>
      <slash:comments>5</slash:comments>
      
      <title>CRUD is bad for REST</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,d6d71d3d-1370-477d-a8c6-2c95c7f41a4e.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/VbvsQhApYCA/CRUDIsBadForREST.aspx</link>
      <pubDate>Tue, 23 Jun 2009 21:03:16 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
In one of my previous posts (Rest: good, bad and ugly), I made a passing comment,&#xD;
about how I think using CRUD in RESTful service  is a bad practice. I received&#xD;
a few comments / questions asking why do I say that – so what’s wrong with CRUD and&#xD;
REST? &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On the surface, it seems like a very good fit (both technically and architecturally),&#xD;
however scratch that surface, and you’d see  that it isn’t a good fit for either.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
REST over HTTP is the most common (almost only) implementation of the REST architectural&#xD;
style - to the point REST over HTTP is synonymous with REST. I would say most of the&#xD;
people who think of REST in CRUD terms, think about mapping of the HTTP verbs.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
CRUD which stands for Create, Read, Update and Delete, are the four basic database&#xD;
operations. Some of the  HTTP verbs, namely POST, GET, PUT and DELETE (there&#xD;
are others like OPTIONS or HEAD) seem to have a 1-1 mapping to CRUD. As I said earlier&#xD;
they don’t. The table below briefly contrast HTTP verbs and CRUD &#xD;
&lt;br&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;table border="2" cellspacing="0" cellpadding="2" width="820"&gt;&#xD;
          &lt;tbody&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
Verb&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
CRUDdy Candidate&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Actually&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
GET&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
SELECT (Read) &#xD;
&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Get a representation of a resource. While it is very similar to SELECT it also has&#xD;
a few features beyond an out-of-the-box SELECT e.g. by using If-Modified-Since (and&#xD;
similar modifiers) you might get an empty reply.&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
Delete&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
Delete&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Maps well&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
PUT&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
Update &#xD;
&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Put looks like an update but it isn’t since: &#xD;
&lt;br&gt;&#xD;
1. You have to provide a complete replacement for the resource (again similar to update&#xD;
but not quite) &#xD;
&lt;br&gt;&#xD;
2. You can use PUT to create a resource (when the URI is set by the client) &#xD;
&lt;br&gt;&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
POST&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
Insert&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
It can be used to create a   but it should be a child/subordinate &#xD;
one. Furthermore, it can be used to provide partial update to a resource (i.e. not&#xD;
resulting in a new URI) &#xD;
&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
OPTIONS&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
?&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Get the available ways to continue considering the current state or the resource&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
HEAD&lt;/td&gt;&#xD;
              &lt;td valign="top" width="133"&gt;&#xD;
?&lt;/td&gt;&#xD;
              &lt;td valign="top" width="550"&gt;&#xD;
Get the headers or metadata about the resource (which you would otherwise GET) &#xD;
&lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
          &lt;/tbody&gt;&#xD;
        &lt;/table&gt;&#xD;
        &lt;p&gt;&#xD;
The way I see it,  the HTTP verbs are more document oriented than database oriented&#xD;
(which is why document databases like &lt;a href="http://couchdb.apache.org/"&gt;CouchDB&lt;/a&gt; are&#xD;
seamlessly RESTful). In any event, what I tried to show here is that while you can&#xD;
update, delete and create new resources the way you do that is not exactly CRUD in&#xD;
the database sense of the word – at least when it comes to using the HTTP verbs.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
However, the main reason CRUD is wrong for REST is an architectural one. One of the&#xD;
base characteristics(*) of REST is using hypermedia to externalize the statemachine&#xD;
of the protocol (a.k.a. HATEOS– Hypertext as the engine of state). The URI to URI&#xD;
transition is what makes the protocol tick (the &lt;a href="http://www.rgoarchitects.com/nblog/2009/06/15/TransactionsAreBadForREST.aspx"&gt;transaction&#xD;
implementation by Alexandros  discussed in the previous post&lt;/a&gt; shows a good&#xD;
example of following this principle).  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.pluralsight.com/community/blogs/tewald/archive/2007/04/26/46984.aspx"&gt;Tim&#xD;
Ewald explains this&lt;/a&gt;  nicely (in a post from 2007…) :&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
… Here's what I came to understand. Every communication protocol has a state machine.&#xD;
For some protocols they are very simple, for others they are more complex. When you&#xD;
implement a protocol via RPC, you build methods that modify the state of the communication.&#xD;
That state is maintained as a black box at the endpoint. Because the protocol state&#xD;
is hidden, it is easy to get things wrong. For instance, you might call Process before&#xD;
calling Init. People have been looking for ways to avoid these problems by annotating&#xD;
interface type information for a long time, but I'm not aware of any mainstream solutions.&#xD;
The fact that the state of the protocol is encapsulated behind method invocations&#xD;
that modify that state in non-obvious ways also makes versioning interesting.&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
The essence of REST is to make the states of the protocol explicit and addressableg&#xD;
by URIs. The current state of the protocol state machine is represented by the URI&#xD;
you just operated on and the state representation you retrieved. You change state&#xD;
by operating on the URI of the state you're moving to, making that your new state.&#xD;
A state's representation includes the links (arcs in the graph) to the other states&#xD;
that you can move to from the current state. This is exactly how browser based apps&#xD;
work, and there is no reason that your app's protocol can't work that way too. (The &lt;a href="http://www.ietf.org/internet-drafts/draft-ietf-atompub-protocol-14.txt"&gt;ATOM&#xD;
Publishing protocol&lt;/a&gt; is the canonical example, though its easy to think that its&#xD;
about entities, not a state machine.)&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
If you are busy with inserting and updating (CRUDing) resources you are not, in fact,&#xD;
thinking about protocols or externalizing a State machine and, in my opinion, miss&#xD;
the whole point about REST.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
CRUD services leads and promoted to the database as a service kind of thinking (e.g.&#xD;
ADO.NET data services) which as &lt;a href="http://www.rgoarchitects.com/nblog/2008/08/17/WhyTheDatabaseAsAServiceIsABadIdea.aspx"&gt;I&#xD;
explained in another post last year&lt;/a&gt; is a bad idea since:&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
It circumvents the whole idea about "Services" - there's no business logic.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
It is exposing internal database structure or data rather than a thought-out contract.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
It encourages bypassing real services and going straight to their data.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
It creates a blob service (the data source).&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
It encourages minuscule demi-serices (the multiple "interfaces" of said&#xD;
blob) that disregard few of the fallacies of distributed computing.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
It is just client-server in sheep's clothing. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
The main theme of this and the previous post is that if we try to drag REST to the&#xD;
same old, same old stuff we always did we wouldn’t really get that many benefits.&#xD;
In fact, the “old” ways of doing that stuff are probably more suitable for the job&#xD;
anyway since they have been in use for a while now. and they are “tried and tested” &#xD;
(“You can’t win an argument with an idiot, he’ll just drag you down to his level and&#xD;
beat you with experience” …). REST is just  a different paradigm that RPC, ACID&#xD;
transactions and CRUD. &#xD;
&lt;hr&gt;&lt;/hr&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
* I know I sound like a broken record on that but our industry has a history diluting&#xD;
terms to a point they almost stop being useful (SOA comes to mind..). The way I see&#xD;
it you can have 3 levels on your way to REST over HTTP:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
You can be using HTTP and XML/JSON – this is level 1 or “Using standards”. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
You can be using the HTTP verbs properly and/or applying document oriented communications&#xD;
– this is level 2 or “Rest-like” interface &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
You can conform to all REST constraints and be at level 3 or “RESTful”. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
All levels can be useful and bring you merit but only the 3rd is REST&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=d6d71d3d-1370-477d-a8c6-2c95c7f41a4e"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=VbvsQhApYCA:XKFXwZ28e4w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=VbvsQhApYCA:XKFXwZ28e4w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=VbvsQhApYCA:XKFXwZ28e4w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=VbvsQhApYCA:XKFXwZ28e4w:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/VbvsQhApYCA" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,d6d71d3d-1370-477d-a8c6-2c95c7f41a4e.aspx</comments>
      <category>REST</category>
      <category>SOA</category>
      <category>Software Architecture</category>
      <category>Trends</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/06/23/CRUDIsBadForREST.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=f0598f6e-2148-45fb-bd29-02d89439ddc7</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,f0598f6e-2148-45fb-bd29-02d89439ddc7.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,f0598f6e-2148-45fb-bd29-02d89439ddc7.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=f0598f6e-2148-45fb-bd29-02d89439ddc7</wfw:commentRss>
      <slash:comments>4</slash:comments>
      
      <title>Transactions are bad for REST</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,f0598f6e-2148-45fb-bd29-02d89439ddc7.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/J1ySRHwGz4g/TransactionsAreBadForREST.aspx</link>
      <pubDate>Mon, 15 Jun 2009 22:10:11 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Yesterday I read an interesting paper called “&lt;a href="http://docs.google.com/View?id=ddffwdq5_2csz22wfd&amp;amp;pageview=1&amp;amp;hgd=1"&gt;RETRO:&#xD;
A RESTful Transaction Mode&lt;/a&gt;”. On the good side, I have to say, it is one of the&#xD;
best RESTful models I’ve seen thus far. The authors took special care to satisfy the&#xD;
different REST constraints, unlike many “RESTful” services (e.g. &lt;a href="http://www.harukizaemon.com/2009/06/no-sleep-till-bedtime.html"&gt;twitter&#xD;
that returns identifier and not URIs&lt;/a&gt;). On the downside is I think a distributed&#xD;
transaction model is bad for REST or in other words I don’t see a reason for going&#xD;
through this effort and jumping through all these hoops.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Why?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For &lt;a href="http://www.rgoarchitects.com/nblog/PermaLink,guid,f18c4e82-81a8-4f9c-9705-e22e26e81836.aspx"&gt;the&#xD;
same reasons transactions are wrong for SOA and  why WS-AtomicTransactions is&#xD;
wrong for SOAP web services&lt;/a&gt;:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
Service Boundary – RESTful or otherwise is a trust boundary. Atomic transactions require&#xD;
holding locks and holding them on behalf of foreign service is opening a security&#xD;
hole (makes it much easier to do a denial of service attack) &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
You cannot assume atomicity between two different entities or resources. Esp. when&#xD;
these resources belong to different businesses. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Transactions introduce coupling (at least in time) &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Transactions hinder scalability – It isn’t that you can’t scale but it is much harder &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
For rest it is even worse - Since using hypermedia as the engine of state change means&#xD;
that the hypermedia actually  describes the protocol, we clutter the business&#xD;
representations (the representations of real business entities like customer, order&#xD;
etc.) with transactional  nitty-gritty as the authors say:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
“our model explicitly identifies locks, transactions, owners and conditional representations&#xD;
as explicit, linkable resources. In fact, every significant entity in our model is&#xD;
represented as a resource in order to comply with this constraint.”&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
This also means the programming the resources themselves will get much more complicated &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I think that if you want to reap the benefits of REST you should keep the protocol&#xD;
simple and focus on the business and technical merits you can get not bog it all with&#xD;
needless complexity. It seems to me that RETRO is a good mental exercise to show transactions&#xD;
can be RESTful. I think, however that it is an overkill for RESTful implementations. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
RESTful architectures will be better off with BASE (Basically Available, Scalable,&#xD;
Eventually Consistent) and/or ACID2 (Associative, Commutative, Idempotent and Distributed)&#xD;
models –or at least the &lt;a href="http://www.rgoarchitects.com/Files/SOAPatterns/Saga.pdf"&gt;Saga&lt;/a&gt; model&#xD;
(which the authors intend to tackle next) which  is a better candidate (IMHO)&#xD;
for achieving distributed consensus.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=f0598f6e-2148-45fb-bd29-02d89439ddc7"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=J1ySRHwGz4g:cgI2CVLQalw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=J1ySRHwGz4g:cgI2CVLQalw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=J1ySRHwGz4g:cgI2CVLQalw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=J1ySRHwGz4g:cgI2CVLQalw:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/J1ySRHwGz4g" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,f0598f6e-2148-45fb-bd29-02d89439ddc7.aspx</comments>
      <category>REST</category>
      <category>SOA</category>
      <category>Software Architecture</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/06/15/TransactionsAreBadForREST.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=8617b551-e3a5-4ae2-987e-8f580687f4c9</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,8617b551-e3a5-4ae2-987e-8f580687f4c9.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,8617b551-e3a5-4ae2-987e-8f580687f4c9.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=8617b551-e3a5-4ae2-987e-8f580687f4c9</wfw:commentRss>
      <slash:comments>3</slash:comments>
      
      <title>WCF defaults stifles loose coupling</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,8617b551-e3a5-4ae2-987e-8f580687f4c9.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/W6abQZk_g9E/WCFDefaultsStiflesLooseCoupling.aspx</link>
      <pubDate>Sun, 07 Jun 2009 20:59:56 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
This is another post (&amp;lt;Rant&amp;gt;) about WCF default behavior and how it can make&#xD;
the life of developers miserable ( you can also check out “&lt;a href="http://www.rgoarchitects.com/nblog/2008/06/15/RantWCFDefaultsLimitConcurrencyscalability.aspx"&gt;WCF&#xD;
defaults limit scalability&lt;/a&gt;”  and “&lt;a href="http://www.rgoarchitects.com/nblog/2008/09/28/AnotherWCFGotchaCallingAnotherServiceresourceWithinACall.aspx"&gt;Another&#xD;
WCF gotcha - calling another service/resource within a call&lt;/a&gt;”)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Anyway, the trigger for this is a post by Ayende called “&lt;a href="http://ayende.com/Blog/archive/2009/06/04/wcf-works-in-mysterious-ways.aspx"&gt;WCF&#xD;
works in mysterious ways&lt;/a&gt;”.  Ayende posted some code he wrote which was throwing&#xD;
a serialization exception. You can see his post for the full code, but in a nut shell&#xD;
he was defining a large object graph (8192 objects that contain other objects) and&#xD;
was trying to send that over the wire. Here’s a short excerpt from the service definition:&#xD;
&lt;/p&gt;&#xD;
        &lt;div id="codeSnippetWrapper"&gt;&#xD;
          &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; [ServiceBehavior(&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; InstanceContextMode&#xD;
= InstanceContextMode.Single,&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; ConcurrencyMode&#xD;
= ConcurrencyMode.Single,&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; MaxItemsInObjectGraph&#xD;
= Int32.MaxValue&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; )]&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; DistributedHashTableMaster&#xD;
: IDistributedHashTableMaster&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; Segment[]&#xD;
segments;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DistributedHashTableMaster(NodeEndpoint&#xD;
endpoint)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; segments&#xD;
= Enumerable.Range(0, 8192).Select(i =&amp;gt;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Segment&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; AssignedEndpoint&#xD;
= endpoint,&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; Index&#xD;
= i&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; }).ToArray();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Segment[]&#xD;
Join()&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; segments;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum24"&gt; 24:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum25"&gt; 25:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum26"&gt; 26:&lt;/span&gt; [ServiceContract]&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum27"&gt; 27:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IDistributedHashTableMaster&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum28"&gt; 28:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum29"&gt; 29:&lt;/span&gt; [OperationContract]&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum30"&gt; 30:&lt;/span&gt; Segment[]&#xD;
Join();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum31"&gt; 31:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum32"&gt; 32:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum33"&gt; 33:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; NodeEndpoint&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum34"&gt; 34:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum35"&gt; 35:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Sync&#xD;
{ get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum36"&gt; 36:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Async&#xD;
{ get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum37"&gt; 37:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum38"&gt; 38:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum39"&gt; 39:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Segment&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum40"&gt; 40:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum41"&gt; 41:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Guid&#xD;
Version { get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum42"&gt; 42:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum43"&gt; 43:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; Index&#xD;
{ get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum44"&gt; 44:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; NodeEndpoint&#xD;
AssignedEndpoint { get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum45"&gt; 45:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; NodeEndpoint&#xD;
InProcessOfMovingToEndpoint { get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum46"&gt; 46:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum47"&gt; 47:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; WcfHatesMeAndMakeMeSad&#xD;
{ get; set; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum48"&gt; 48:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
          &lt;/div&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
As you can see in line 4 – the service is properly decorated with an attribute to&#xD;
enlarge the number of objects in graph. so looking at the code I initially suggested&#xD;
he add a few ServiceKnowType and DataContract/DataMember attributes on the data classes&#xD;
(as the serialization sometimes needs some guidance. After that didn’t help I actually&#xD;
ran the code and then I noticed that the code was missing setting that same attribute&#xD;
– on the client side. So to fix the problem, the client side code below&#xD;
&lt;/p&gt;&#xD;
        &lt;div id="codeSnippetWrapper"&gt;&#xD;
          &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; var&#xD;
channel =&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ChannelFactory&amp;lt;IDistributedHashTableMaster&amp;gt;(binding, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EndpointAddress(uri))&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; .CreateChannel();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; channel.Join();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
          &lt;/div&gt;&#xD;
Need to change to something like&#xD;
&lt;/div&gt;&#xD;
        &lt;div id="codeSnippetWrapper"&gt;&#xD;
          &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; var&#xD;
channelFactory =&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ChannelFactory(binding, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EndpointAddress(uri));&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var&#xD;
operationDescription &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; channelFactory.Endpoint.Contract.Operations)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; var&#xD;
dataContractBehavior =&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; operationDescription.Behaviors[&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(DataContractSerializerOperationBehavior)]&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; DataContractSerializerOperationBehavior;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (dataContractBehavior&#xD;
!= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; dataContractBehavior.MaxItemsInObjectGraph&#xD;
= &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.MaxValue;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; var&#xD;
channel=channelFactory.CreateChannel();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; channel.Join();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
          &lt;/div&gt;&#xD;
          &lt;p&gt;&#xD;
The main problem I find with this piece of code is the fact that it is needed at all.&#xD;
As the post’s title suggest I find this behavior greatly affects the loose coupling&#xD;
of anything that uses WCF (services or other components). &#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;strong&gt;WCF requires that any change you make to the channel on the server side would&#xD;
be reflected in the channel on each and every client&lt;/strong&gt; (e.g. we have a similar&#xD;
setting where we enlarge message sizes for webHttpBinding and there are many other&#xD;
such examples). &#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
Sure, you say, that is just like adding a new field in the contract isn’t it? – Well&#xD;
no it isn’t since unlike anything else which appears in the (verbose as it is) SOAP&#xD;
contract these changes in default values, which are purely a WCF design choice, are&#xD;
not documented. &lt;strong&gt;Again, the changes in default values are not part of the contract. &lt;/strong&gt;These&#xD;
are things you need to remember to pass on to you service consumer. So not only do&#xD;
I pay the overhead of having an explicit contract (e.g. vs. REST) – it really doesn’t&#xD;
work.  It means that two components who use the same contract may not  be&#xD;
interchangeable if one returns more data (in this case). It means that the two sides&#xD;
are coupled by the need to change these defaults and for what? WCF is smart enough&#xD;
to know how long is the message; WCF is smart enough to handle the message (if I encourage&#xD;
it by setting a behavior) why can’t it add 2 and 2 by itself?&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
Sometimes I just wish WCF had a TrainingWheels or DemosOnly attribute I could just&#xD;
set to false and make all this crap go away…&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
&amp;lt;/Rant&amp;gt;&#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=8617b551-e3a5-4ae2-987e-8f580687f4c9"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=W6abQZk_g9E:0Ng8fKgDzfg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=W6abQZk_g9E:0Ng8fKgDzfg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=W6abQZk_g9E:0Ng8fKgDzfg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=W6abQZk_g9E:0Ng8fKgDzfg:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/W6abQZk_g9E" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,8617b551-e3a5-4ae2-987e-8f580687f4c9.aspx</comments>
      <category>.NET</category>
      <category>SOA</category>
      <category>WCF</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/06/07/WCFDefaultsStiflesLooseCoupling.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9</wfw:commentRss>
      
      <title>The web vs. the fallacies of distributed computing</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/siWrOGisyNg/TheWebVsTheFallaciesOfDistributedComputing.aspx</link>
      <pubDate>Thu, 28 May 2009 18:45:49 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I recently read a post by  Tim Bray where he states that building on web technologies&#xD;
let you get away with believing some of the &lt;a href="http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing"&gt;fallacies&#xD;
of distributed computing&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I personally thinks he is a little optimistic in that claim.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;The network is reliable&lt;/strong&gt;” – Tim says that that the connectionless&#xD;
of HTTP helps (it does) and that GET, PUT and DELETE are idempotent helps as well.&#xD;
I say that GET, PUT and DELETE only if the people implementing the server side make&#xD;
them so – i.e. consider the fallacy. The fact that the HTTP says they should be idempotent&#xD;
doesn’t automatically make each implementation compliant &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “ &lt;strong&gt;Latency is Zero&lt;/strong&gt;” – Tim says the web makes it worse – but, he&#xD;
claims, users got used to that. Even if they did I think that users are just part&#xD;
of the picture since the programmable web is also making strides. Also as Tim says&#xD;
it is actually worse. Not to mention that “&lt;a href="http://www.rgoarchitects.com/nblog/2009/01/25/LatencyIsConstantNot.aspx"&gt;Latency&#xD;
isn’t constant”&lt;/a&gt; either &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;Bandwidth is infinite&lt;/strong&gt;” – Again Tim agrees that it is worse but&#xD;
people learn to note it. Again learning that it is there doesn’t mean the fallacy&#xD;
is gone just that people are less likely to presume it &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;The Network is secure&lt;/strong&gt;” – Tim says its probably the “least-well-addressed&#xD;
by the web” – no argument here&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;Topology doesn’t change&lt;/strong&gt;” – Tim says URIs help mitigate it – Again&#xD;
Tim is assuming people make URIs permanent or will always return a temporary redirect/permanent&#xD;
redirect when a URI change – good luck with that.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;There is one administrator&lt;/strong&gt;” – Tim says that yes that’s the case&#xD;
but who cares. Well, an example I usually give is that time when I deployed an ASP.NET&#xD;
which worked for a while – until the hosting company decided to change their policy&#xD;
to partial-trust (the app. needed full-trust) – when that happens to you. You care.&#xD;
If you mashup with someone else, you care etc.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;Transport cost is Zero&lt;/strong&gt;” – Tim says it is the same as for Bandwidth&#xD;
– i.e. worse.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
On “&lt;strong&gt;The network is homogeneous&lt;/strong&gt;” – Tim says that that’s this is the&#xD;
“web’s single greatest triumph”. I actually agree to that as long as all of you stick&#xD;
to using the web’s ubiquitous standards (http, XML/JSON ) if you have parts of your&#xD;
application that can’t use that you still need to pay attention &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One thing I am really  puzzled by is Tim’s conclusion :&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
“If you’re building Web technology, you have to worry about these things. But if you’re&#xD;
building applications &lt;em&gt;on&lt;/em&gt; it, mostly you don’t.” &#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Since even according to him only 4 fallacies are covered by the web… (I think only&#xD;
1) &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In any event, I agree that the web standards and REST in particular, do contain guidelines&#xD;
that take into consideration the fallacies. However it is still up to developers to&#xD;
understand the problems they’ll create if they don’t follow these guidelines. Assuming&#xD;
that that is indeed the case, is well, overly optimistic in my experience.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You can also read a paper I published a few years ago which &lt;a href="http://www.rgoarchitects.com/Files/fallacies.pdf"&gt;explains&#xD;
the fallacies&lt;/a&gt;  and why they are still relevant today.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=siWrOGisyNg:LXkfk-eAoaA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=siWrOGisyNg:LXkfk-eAoaA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=siWrOGisyNg:LXkfk-eAoaA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=siWrOGisyNg:LXkfk-eAoaA:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/siWrOGisyNg" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,c7ea6c4b-02cf-4602-a35f-e15d7cc3d1d9.aspx</comments>
      <category>REST</category>
      <category>SOA</category>
      <category>Software Architecture</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/05/28/TheWebVsTheFallaciesOfDistributedComputing.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=7fe163ea-0d81-43ee-a1c2-bf0251504003</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,7fe163ea-0d81-43ee-a1c2-bf0251504003.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,7fe163ea-0d81-43ee-a1c2-bf0251504003.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=7fe163ea-0d81-43ee-a1c2-bf0251504003</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Do we have an Active SOA Service?</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,7fe163ea-0d81-43ee-a1c2-bf0251504003.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/Hk_qYN0sxXY/DoWeHaveAnActiveSOAService.aspx</link>
      <pubDate>Thu, 28 May 2009 07:39:17 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.ebizq.net/blogs/service_oriented/2009/05/.php"&gt;Michael Poulin&#xD;
@ ebizq doesn’t like the Active Service pattern&lt;/a&gt; I suggest you read his post first&#xD;
but in a nutshell Michael sees two possible ways to understand the term Active Service:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
“a) service view - a service that actively looking for companions to complete its&#xD;
own task &#xD;
&lt;br&gt;&#xD;
b) consumer view – a service which triggers its own execution by itself”&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
…and he doesn’t like both…&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I think that both of these definitions aren’t that far… and I like both :)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The way I see it there are two concern here&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
1. &lt;strong&gt;Are services only reactive (“passive”)  ?&lt;/strong&gt; - i.e. The service&#xD;
only “works” when it gets a request from a service consumer (user/another service/an&#xD;
orchestration engine) ? If the service also has at least one thread working to do&#xD;
internal stuff (e.g. scavenging outdated data, pre-fetching data from other service&#xD;
etc.) then that’s what I call an Active Service (option “b” above)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
2.  &lt;strong&gt;How do services get data they need to complete a request when they&#xD;
actually get a request&lt;/strong&gt; – There are many possibilities here: events, pub/sub,&#xD;
an orchestration engine that takes care of that, services that check for a known contract&#xD;
in a registry and then go to that service, even hardcoded. The options where the service&#xD;
looks for other services (e.g. using a registry) is option "a” above.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So basically all the options are valid a service can be a+b just a or just b or none&#xD;
and, in my eyes, these are orthogonal concerns.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Regarding pre-fetching – I think this can be beneficial as a way to achieve caching.&#xD;
Note that if you control both sides and you’ve got the needed infrastructure then&#xD;
it is probably better to push changes (eventing or pub/sub) but that’s not always&#xD;
the case.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In the comment I left on Michael’s blog I talked about different strategies for services&#xD;
“There are several strategies for that - one is to take that knowledge out of the&#xD;
service (e.g. using choreography or orchestration), providing a subscription and/or&#xD;
wiring infrastructure i.e. something that will tell you where to find certain contracts,&#xD;
hard coding , registry , using uniform interfaces (e.g. REST) etc.”&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
lets take a concrete (albeit very very simplistic) scenario to illustrate some of&#xD;
the approaches&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Business scenario: When a customer makes an order we want to give a 5% discount for&#xD;
preferred customers. A customer get’s a proffered status upon a business decision&#xD;
(annual orders of 1M$ or knowing the CEO or whatever) and the status lasts for a year&#xD;
from the date it was introduced. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For the sake of this discussion say we have two services (again this is overly simplified)&#xD;
an Ordering service and a Customer service.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Here are a few technical options&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 1.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Customer places and order, the ordering service talks to “the” customer service to&#xD;
check if the customer deserves a discount if she does. the ordering service then updates&#xD;
the order with the discount and present it to the customer to finalize the order.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 2. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Same as 1, with the ordering looking for a service that matches the customer contract&#xD;
it knows about&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 3&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The ordering service asks “the” Customer service twice a day for a list of discounts&#xD;
and caches the result. When the user sends her order. it calculates the price and&#xD;
present it to her&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 4&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Same as 3, with the ordering looking for a customer service (not using a known service) &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 5&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The customer service sends a message to known subscribers whenever a new customer&#xD;
status occurs. The ordering service listens on that and update its internal cache.&#xD;
When the customer places her order, the ordering hits the cache for the discount&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 6&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
same as 5 but publishing an event to unknown subscribers&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 7&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The customer service publish an event with the discounts (or changes in discounts)&#xD;
twice a day. The ordering service listens on that and update its internal cache. When&#xD;
the customer places her order, the ordering hits the cache for the discount&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Technical Scenario 8&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The customer order is passed to an orchestrating service, which hits a customer service&#xD;
for a discount and then passes all the data to an ordering service&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
…&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There are quite a few more options and variants on the options listed but which one&#xD;
is best?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Yeah, you’ve guessed it -  it depends.It depends since each option has its own&#xD;
strength and weaknesses which can work best in different circumstances . It also &#xD;
depends on the available infrastructure, on the structure of other services, on the&#xD;
services being internal or external etc. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
for instance scenario 1 is less flexible than most others but it is simple to implement.&#xD;
There is coupling in time between ordering and customer (both have to be up for the&#xD;
order to complete). Scenario 4 needs to solve the problem of finding other services&#xD;
(e.g. using some kind of registry, or other services “pushing” their existence or&#xD;
whatever) but when a customer makes her request it (most likely) have all the needed&#xD;
info to process that request, making the ordering service more autonomous. As a side&#xD;
note, the fact that different approaches to achieve the same end-goal work in different&#xD;
situations is why I decided  to write patterns in the first place&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Lastly, in case you are wondering the scenarios are: &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
1 – choreography with pre-known (configured or hardcoded) companion services&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
2 – choreography with “active service” of type a (ordering is active)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
3- choreography with “active service” type b (ordering is active)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
4 – Choreography with “active service” type a + b (ordering is active)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
5 – pub/sub (e.g. using an ESB)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
6 – eventing &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
7- eventing with “active service” type b (customer is active)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
8 - orchestration&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=7fe163ea-0d81-43ee-a1c2-bf0251504003"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=Hk_qYN0sxXY:xU_1Ikr9s-w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=Hk_qYN0sxXY:xU_1Ikr9s-w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=Hk_qYN0sxXY:xU_1Ikr9s-w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=Hk_qYN0sxXY:xU_1Ikr9s-w:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/Hk_qYN0sxXY" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,7fe163ea-0d81-43ee-a1c2-bf0251504003.aspx</comments>
      <category>SOA</category>
      <category>SOA Patterns</category>
      <category>Software Architecture</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/05/28/DoWeHaveAnActiveSOAService.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=3200f8e8-167b-452a-af7a-e7702b6dc44a</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,3200f8e8-167b-452a-af7a-e7702b6dc44a.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,3200f8e8-167b-452a-af7a-e7702b6dc44a.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=3200f8e8-167b-452a-af7a-e7702b6dc44a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      
      <title>REST &amp;ndash; Good, Bad and Ugly</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,3200f8e8-167b-452a-af7a-e7702b6dc44a.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/BLWUHwtUjGo/RESTNdashGoodBadAndUgly.aspx</link>
      <pubDate>Tue, 12 May 2009 21:54:09 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I recently got a request from Alik for my opinion on REST. I think  this might&#xD;
be interesting for a wider audience and decided to blog my answer here.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Note: I also have a REST presentation I prepared awhile ago, which is downloadable&#xD;
from &lt;a href="http://www.rgoarchitects.com/Files/REST.ppt"&gt;here&lt;/a&gt; (ppt)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;The good&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As you probably know REST is an architectural style &lt;a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm"&gt;defined&#xD;
by Roy Fielding&lt;/a&gt; for the web which is built on several foundations (client/server,&#xD;
uniform interface etc.) which gives it a lot of strength in affected areas. The top&#xD;
three in my opinion are:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
(relatively) Easy to integrate – a good RESTful API is discoverable from the initial&#xD;
URI onward. This doesn’t suggest that a any application calling on on your service&#xD;
will automagically know what to do. It does mean however that the developer reading&#xD;
your API trying to integrate it has an easier life. Esp. if since hypermedia provides&#xD;
you the roadmap of what to do next. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Another feature for ease of integration which has to do with REST over HTTP (THE most&#xD;
common implementation of REST ) is the use of ubiquitous standards. Speaking HTTP&#xD;
which is the protocol of the web, emitting JSON or ATOMPub means it is much easier&#xD;
to find a library that can connect to you on any language and platform. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Scalability – stateless communication, replicated repository make for a good scalability&#xD;
potential. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
do note that, as with any architecture/technology – a bad implementation can negate&#xD;
all the benefits&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/RESTGoodBadandUgly_149A1/image_2.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/RESTGoodBadandUgly_149A1/image_thumb.png" width="596" height="355"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
other REST goodness are things like the notion of the URI, idempotance of GET in &#xD;
REST over HTTP etc. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;The Bad&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Some of the  problems of REST aren’t inherent problems of the architectural style&#xD;
but rather drawbacks of the REST over HTTP implementation. Most notable of these is&#xD;
what’s known as “&lt;a href="http://www.25hoursaday.com/weblog/2006/03/25/HiRESTLoRESTPushback.aspx"&gt;lo-rest&lt;/a&gt;”&#xD;
(using just GET and POST) – While technically it might still be RESTful, to me a uniform&#xD;
interface with 2 verbs is too small to be really helpful (which indeed makes a lot&#xD;
of the implementation unRESTful see “The Ugly” below)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One problem which isn’t HTTP specific is handling REST- programming languages are&#xD;
not resource oriented so the handling code that maps URIs to tends to get messy. Actually&#xD;
Microsoft did a &lt;a href="http://msdn.microsoft.com/en-us/library/bb675245.aspx"&gt;relatively&#xD;
good work&lt;/a&gt; with implementing &lt;a href="http://bitworking.org/projects/URI-Templates/"&gt;Joe&#xD;
Gregorio’s idea of URI mapping&lt;/a&gt; which helps alleviate  some of the problem.&#xD;
On the other hand it is relatively hard to make the REST API hyper-text driven (Which&#xD;
is a &lt;a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven"&gt;constraints&#xD;
of REST&lt;/a&gt;)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Lastly and most importantly REST is not the answer to everything (see also another&#xD;
post I made on &lt;a href="http://www.rgoarchitects.com/nblog/2008/08/21/UsingRESTAlongOtherArchitectureStyles.aspx"&gt;using&#xD;
REST along with other architectural styles&lt;/a&gt;) – e.g. most REST implementations I&#xD;
know do not support the notion of pub/sub (Roy did suggest a REST implementation called&#xD;
WAKA that enables this but most people never even heard of it). be weary of the “Hammer”&#xD;
syndrome, REST is a good tool for your toolset but it isn’t the only one.  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;The Ugly&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In my opinion there are 2 main ugly sides for REST. The first is Zealots. That isn’t&#xD;
something unique to REST any good technology/idea (Agile, TDD etc. ) gets its share&#xD;
of followers who think that &amp;lt;insert favorite idea&amp;gt; is the best thing since sliced&#xD;
bread and that everybody should do as they do or else.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The real ugliness comes from the misusers – There’s a lot of mis-understanding. The&#xD;
fact that REST over HTTP has become synonymous with REST leads people to think that&#xD;
HTTP is REST. I recently read &lt;a href="http://colinjack.blogspot.com/2009/05/book-review-restful-net.html"&gt;a&#xD;
REST book review on Colin’s blog&lt;/a&gt; where “the author states that although hypermedia&#xD;
is important in REST it isn't covered in the book because WCF has poor support for&#xD;
it” i.e. a book on REST which ignores one of the important constraints of the style.. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Other mis-uses include building an implementation that is GETsful  (ie. does&#xD;
everything with http GET) or doing plain RPC where the URI is the command, doing CRUD&#xD;
with HTTP verbs etc. etc. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The point is that REST seems simple but it isn’t – it requires a shift in thinking&#xD;
(e.g. identifying resources, externalizing the state transitions etc.). However, as&#xD;
noted above, done right it can be an important and useful tool in your toolset &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=3200f8e8-167b-452a-af7a-e7702b6dc44a"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BLWUHwtUjGo:ePIHoCgvFnw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BLWUHwtUjGo:ePIHoCgvFnw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BLWUHwtUjGo:ePIHoCgvFnw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BLWUHwtUjGo:ePIHoCgvFnw:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/BLWUHwtUjGo" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,3200f8e8-167b-452a-af7a-e7702b6dc44a.aspx</comments>
      <category>REST</category>
      <category>SOA</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/05/12/RESTNdashGoodBadAndUgly.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=fc6052e2-7fd0-48fc-a45e-df4b63cf42a7</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,fc6052e2-7fd0-48fc-a45e-df4b63cf42a7.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,fc6052e2-7fd0-48fc-a45e-df4b63cf42a7.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=fc6052e2-7fd0-48fc-a45e-df4b63cf42a7</wfw:commentRss>
      
      <title>Twitterjecting</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,fc6052e2-7fd0-48fc-a45e-df4b63cf42a7.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/B8m8iFmPNUo/Twitterjecting.aspx</link>
      <pubDate>Fri, 08 May 2009 21:59:51 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Apropos the &lt;a href="http://www.rgoarchitects.com/nblog/2009/04/30/SOAPatternsNdashBlogjectingWatchdog.aspx"&gt;Blogjecting &#xD;
Watchdog pattern&lt;/a&gt;,  In addition to blogging I recently added to our system&#xD;
the ability to twitter. I am using &lt;a href="http://tweetsharp.com/"&gt;Tweet#&lt;/a&gt; from&#xD;
DimeBrain (thanks Mark Nijhof &lt;a href="http://blog.fohjin.com/blog/2009/3/29/Captcha_validation_and_Twitter_Notification"&gt;for&#xD;
the tip&lt;/a&gt; via twitter).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Tweet# makes using tweeter really simple (I included the code below in case you find&#xD;
it useful).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The tweeter sender is part of a PostOffice service (I thought that it would be problematic&#xD;
to present it as SpamServer which was its original name :) ).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/Twitterjecting_91D/image_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/Twitterjecting_91D/image_thumb.png" width="244" height="90"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt; Update&#xD;
11/05 Here it is working on our staging environment :)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
A few points about our design in general that are interesting in this regards are&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
The PostOffice is a “Server” type service – we have 3 types of services: server which&#xD;
has one instance per node, channel which has multiple instances per node and algorithmic&#xD;
which has one instance per core &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
The PostOffice implements a pattern I call “Legacy Bridge” – which is basically an&#xD;
SOA version of an adapter+facade in OO terms. The post office supports the events&#xD;
(over WCF) mechanism we have in our system from one side  and connects to external&#xD;
systems (SMS, coupons and twitter) on the other. The PostOffice, basically contains&#xD;
an Edge Component which accepts the requests and funnels them to *Sender classes that&#xD;
interact with the external systems. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
from contract design perspective – The events I added into the system are StatusEvent&#xD;
and AdminStatusEvent (and not TwitterEvent and DirectMessageEvent). this is better,&#xD;
in my opinion, as it carries the intent of what I want to achieve. It also means that&#xD;
if I choose to change technology or use multiple destinations the events will stay&#xD;
meaningful. For instance, the AdminStatusEvent will be used by our monitoring system&#xD;
to send a notification if the system crashes. I’ll probably want that as an SMS, maybe&#xD;
even a phone call as well as a twit (so the AdminStatusEvent will have a severity&#xD;
to designate how it should be handled) &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;div&gt;&#xD;
          &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Dimebrain.TweetSharp.Fluent;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; xsights.Apps.PostOffice.Server.Twitter&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; TwitterSender&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; account;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; password;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; admin;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; TwitterSender(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; tweetAccount, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; twitterPassword,&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; adminAccount)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; account&#xD;
= tweetAccount;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; password&#xD;
= twitterPassword;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; admin&#xD;
= adminAccount;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Update(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; msg)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var&#xD;
tweet &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; BreakToTwitts(msg))&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum24"&gt; 24:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum25"&gt; 25:&lt;/span&gt; var&#xD;
update =&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum26"&gt; 26:&lt;/span&gt; FluentTwitter.CreateRequest().AuthenticateAs(account,&#xD;
password).Statuses().Update(tweet).AsJson();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum27"&gt; 27:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum28"&gt; 28:&lt;/span&gt; update.Request();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum29"&gt; 29:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum30"&gt; 30:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum31"&gt; 31:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum32"&gt; 32:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SendAdminMessage(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; msg)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum33"&gt; 33:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum34"&gt; 34:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var&#xD;
twit &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; BreakToTwitts(msg))&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum35"&gt; 35:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum36"&gt; 36:&lt;/span&gt; var&#xD;
dm =&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum37"&gt; 37:&lt;/span&gt; FluentTwitter.CreateRequest().AuthenticateAs(account,&#xD;
password).DirectMessages().Send(admin, twit).AsJson();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum38"&gt; 38:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum39"&gt; 39:&lt;/span&gt; Retry(2,dm.Request,&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;);&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum40"&gt; 40:&lt;/span&gt; } &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum41"&gt; 41:&lt;/span&gt;&#xD;
            &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum42"&gt; 42:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum43"&gt; 43:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum44"&gt; 44:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; IList&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;&#xD;
BreakToTwitts(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; originalString)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum45"&gt; 45:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum46"&gt; 46:&lt;/span&gt; var&#xD;
list = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum47"&gt; 47:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i&#xD;
= 0; i &amp;lt; originalString.Length; i += 140)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum48"&gt; 48:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum49"&gt; 49:&lt;/span&gt; var&#xD;
len = 140;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum50"&gt; 50:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (originalString.Length&#xD;
- i &amp;lt; 140) len = originalString.Length - i;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum51"&gt; 51:&lt;/span&gt; list.Add(originalString.Substring(i,&#xD;
len));&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum52"&gt; 52:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum53"&gt; 53:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; list;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum54"&gt; 54:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum55"&gt; 55:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum56"&gt; 56:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;private&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Retry(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; retries,&#xD;
Func&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; call,&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; shouldThrow)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum57"&gt; 57:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum58"&gt; 58:&lt;/span&gt;&#xD;
            &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum59"&gt; 59:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&#xD;
            &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum60"&gt; 60:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum61"&gt; 61:&lt;/span&gt; call();&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum62"&gt; 62:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum63"&gt; 63:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception&#xD;
ex)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum64"&gt; 64:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum65"&gt; 65:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum66"&gt; 66:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (retries&#xD;
&amp;gt; 0)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum67"&gt; 67:&lt;/span&gt; Retry(--retries,&#xD;
call,shouldThrow);&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum68"&gt; 68:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&#xD;
            &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum69"&gt; 69:&lt;/span&gt; {&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum70"&gt; 70:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (shouldThrow)&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum71"&gt; 71:&lt;/span&gt;&#xD;
              &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt;;&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum72"&gt; 72:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum73"&gt; 73:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum74"&gt; 74:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum75"&gt; 75:&lt;/span&gt;&#xD;
            &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum76"&gt; 76:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum77"&gt; 77:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum78"&gt; 78:&lt;/span&gt;  &lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
            &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&#xD;
              &lt;span style="color: #606060" id="lnum79"&gt; 79:&lt;/span&gt; }&lt;/pre&gt;&#xD;
            &lt;!--CRLF--&gt;&#xD;
          &lt;/div&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=fc6052e2-7fd0-48fc-a45e-df4b63cf42a7"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=B8m8iFmPNUo:qvQkpjxxzN4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=B8m8iFmPNUo:qvQkpjxxzN4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=B8m8iFmPNUo:qvQkpjxxzN4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=B8m8iFmPNUo:qvQkpjxxzN4:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/B8m8iFmPNUo" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,fc6052e2-7fd0-48fc-a45e-df4b63cf42a7.aspx</comments>
      <category>.NET</category>
      <category>OO</category>
      <category>SOA</category>
      <category>SOA Patterns</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/05/08/Twitterjecting.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=89f18198-106f-41a3-9590-1690ff17cefe</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,89f18198-106f-41a3-9590-1690ff17cefe.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,89f18198-106f-41a3-9590-1690ff17cefe.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=89f18198-106f-41a3-9590-1690ff17cefe</wfw:commentRss>
      
      <title>SOA Patterns &amp;ndash; Blogjecting Watchdog</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,89f18198-106f-41a3-9590-1690ff17cefe.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/YH7RY4aDP8I/SOAPatternsNdashBlogjectingWatchdog.aspx</link>
      <pubDate>Thu, 30 Apr 2009 19:49:44 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
As I mentioned in the &lt;a href="http://www.rgoarchitects.com/nblog/2009/04/28/UpAndRunning.aspx"&gt;previous&#xD;
post&lt;/a&gt; I got a few interesting questions lately. The first from &lt;a href="http://colinjack.blogspot.com/"&gt;Colin&lt;/a&gt; regarding&#xD;
developing a customized solution for the blogjecting watchdog pattern vs. integrating/developing&#xD;
for a commercial monitoring suite (e.g. Unicenter/OpenView etc.). The second question&#xD;
I received was from &lt;a href="http://codebetter.com/blogs/dru.sellers/"&gt;Dru&lt;/a&gt; on&#xD;
running multiple versions of services (e.g. during upgrade) with active &lt;a href="http://www.rgoarchitects.com/Files/SOAPatterns/Saga.pdf"&gt;Sagas&lt;/a&gt; in&#xD;
the background. I think these questions are interesting enough to be answered as blog&#xD;
posts.Also since both these questions are related to the Blogjecting Watchdog pattern&#xD;
I thought it would be better to explain what it is actually first..&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So here it is :)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a name="_Toc163673245"&gt;Blogjecting Watchdog&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Achieving availability is a multi-layered effort. I’ve already talked about how services&#xD;
should be autonomous (see for example Active Service pattern in chapter 2) , the Blogjecting&#xD;
Watchdog pattern will take a look at another aspect of autonomy. The Blogjecting Watchdog&#xD;
pattern shows how a service can proactively try to identify faults and problems and&#xD;
to try to heal itself when it identifies these problems.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;u&gt;&#xD;
              &lt;i&gt;1.1&lt;/i&gt; The Problem&lt;/u&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The Service Instance pattern (see section 3.4) for example, demonstrates a strategy&#xD;
that a service can implement to be able to cope with failure. The question is – is&#xD;
that enough? Is it enough for the service to try to cope with everything by itself?&#xD;
My answer is no, that is not enough. For one once we dealt with the failure within&#xD;
the service, the service ability to cope with the next failure would probably be diminished.&#xD;
For example if we found a failure in a server and moved to a standby server, the new&#xD;
server does not have another stand-by server to move to if another fault occurs. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Additionally, the failure might be too much for the service to be able to overcome&#xD;
it by itself. Like a switch going down - So we would have something external that&#xD;
looks after the service and could help the service (see Service Monitor pattern in&#xD;
chapter 4). &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To increase the service autonomy and to increase the overall availability of our SOA&#xD;
we need both to try to identify and repair problem and to be able to notify the world&#xD;
about the service’s current status.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The question is then:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
How can we identify and attend to problems and failures in the service and increase&#xD;
service availability?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One option is to try to infer the state of the service from the way it looks to the&#xD;
outside – yes this is as crude as it sound. You try to call the service, it doesn't&#xD;
respond you know it is down; you call the service, you expect to get a reply in 5&#xD;
seconds you get it in 10 seconds, you understand that the service is congested. This&#xD;
is not a very good option as the external behavior only gives us coarse knowledge&#xD;
on the service's state. For example, if the services has a decent fault tolerance&#xD;
solution, we wouldn't know that anything happened – but the truth is that the service&#xD;
ability to handle the next fault might not exist anymore.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Another way is to install agents on the service's servers, this will give you a much&#xD;
better picture of what happens (vs. the option above). For example, you will also&#xD;
be able to get trend information (e.g. You can watch how much disk space is left and&#xD;
alert when it is getting low). There are several problems with this solution. One&#xD;
is that you need to actively install software on the service's servers which both&#xD;
decreases the service autonomy and creates a management hassle in itself. Another&#xD;
problem is that you still only get an external view of the service behavior (you just&#xD;
gain access more information). There are situations (see for example the Mashup pattern&#xD;
in chapter 7) where not all the services are under your control and you cannot access&#xD;
their hardware.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Yet another option is to actively question the service about it state. The has one&#xD;
big advantage over the two previous options since you also get some inside information&#xD;
regarding what the service has to say about its state. This enables the service to&#xD;
communicate trends in problems that will actually make it fail. For example if the&#xD;
service does not write any information into the local disk a low disk space is not&#xD;
a problem at all, if this is the disk where the database is located it is very much&#xD;
a problem. The solution is not perfect since it is the observers responsibility to&#xD;
go after the information. If the rate at which the observer samples the service is&#xD;
not fast enough it can miss on vital information.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As I mentioned earlier we want something that will help increase the service’s autonomy&#xD;
so a better approach in this regard would be for the service to watch over itself &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;u&gt;1.2 The Solution&lt;/u&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Watching over itself is also not enough as we also said we need the “world” to know&#xD;
what happening with the service, thus a combines solution is to :&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Implement the Blogjecting Watchdog pattern and have the service actively monitor its&#xD;
internal state, try to heal itself and continuously publish its state and other important&#xD;
indicators.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/SOAPatternsBlogjectingWatchdog_13F42/clip_image002_2.jpg"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/SOAPatternsBlogjectingWatchdog_13F42/clip_image002_thumb.jpg" width="584" height="467"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Figure 3.14 The blogjecting watchdog pattern. The blogjecting. The blogjecting component&#xD;
that send the reports out and and listens for requests. The watchdog component monitor&#xD;
the status of the business service, tries to heal stray components and log any failure. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The pattern revolves around a single idea – to increase the service responsibility&#xD;
by using two complementary concepts reporting and self healing. The first is the Blogjecting&#xD;
concept where the service implements the Active Service pattern (see chapter 2 for&#xD;
more details) and a component which is in charge of monitoring the service's state.&#xD;
The component publish (see the publish/Subscribe interaction pattern in chapter 6)&#xD;
also the service's state on a cyclic basis or when something meaningful occurs. It&#xD;
is important to note that the fact that the service actively publishes its state doesn't&#xD;
have to mean it cannot also respond to inquiries regarding its health (akin to living&#xD;
a comment on a blog and getting a response from the author)&#xD;
&lt;/p&gt;&#xD;
        &lt;table border="2" cellspacing="0" cellpadding="2" width="1001"&gt;&#xD;
          &lt;tbody&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="997"&gt;&#xD;
                &lt;p&gt;&#xD;
What are Blogjects&#xD;
&lt;/p&gt;&#xD;
                &lt;p&gt;&#xD;
The term Blogjects was coined by Julian Bleecker back in 2005 (Bleecker, 2005) to&#xD;
describe "edgy designed objects that report themselves, or expose their experiences&#xD;
in some fashion" or in other words Blogject == Objects that blog. Julian Bleecker's&#xD;
vision for Blogjects is wider than the one suggested here. Jonathan's vision is for&#xD;
things that participate in the Web 2.0 sense of social-web or even further than that&#xD;
– to use Julian’s words :“Forget about the Internet of Things as Web 2.0, refrigerators&#xD;
connected to grocery stores, and networked Barcaloungers. I want to know how to make&#xD;
the Internet of Things into a platform for World 2.0. How can the Internet of Things&#xD;
become a framework for creating more habitable worlds, rather than a technical framework&#xD;
for a television talking to an reading lamp?” . I highly recommend taking a look at&#xD;
the full paper “A Manifesto for Networked Objects – Cohabiting with Pigeons, Arphids&#xD;
and Aibos in the Internet of Things” (Bleecker, 2006) to get the full picture.&#xD;
&lt;/p&gt;&#xD;
              &lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
          &lt;/tbody&gt;&#xD;
        &lt;/table&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The second concept that plays in the Blogjecting Watchdog pattern is the watchdog,&#xD;
The idea here is to have a component that listens in on the information gathered and&#xD;
published by the blogject component and then to acts on that information in a meaningful&#xD;
way to increase the reliability and availability of the service. The possibilities&#xD;
for implementing self-healing are endless, two simple examples for self-healing actions&#xD;
are restating failed components and cleaning temporary files. &#xD;
&lt;/p&gt;&#xD;
        &lt;table border="2" cellspacing="0" cellpadding="2" width="1006"&gt;&#xD;
          &lt;tbody&gt;&#xD;
            &lt;tr&gt;&#xD;
              &lt;td valign="top" width="1002"&gt;&#xD;
                &lt;p&gt;&#xD;
Watchdogs&#xD;
&lt;/p&gt;&#xD;
                &lt;p&gt;&#xD;
Watchdog (actually watchdog timer) is a term borrowed from the embedded systems world.&#xD;
A watchdog is a hardware device that counts down to zero, and when it gets there it&#xD;
reset the device. To prevent this reset the application has to “kick the dog” before&#xD;
the timer runs out. If the application does not reset the counter it means that the&#xD;
application is hanged and the idea is that the reset would fix that. &#xD;
&lt;/p&gt;&#xD;
              &lt;/td&gt;&#xD;
            &lt;/tr&gt;&#xD;
          &lt;/tbody&gt;&#xD;
        &lt;/table&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
How is the Blogjecting Watchdog pattern better than the other options mentioned above? &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Even if we just consider the blogjecting part of the pattern we can see several advantages&#xD;
over the other approaches. The Blogjecting Watchcdog combines the benefits of an agent&#xD;
that actively monitors the service's health with the internal knowledge of what's&#xD;
important for the service continuity and what's not. Unlike the external agents solution,&#xD;
using Blogjects, the service retains its autonomy. The autonomy is increased even&#xD;
further when you combine the self-healing features of the watchdog. Thus the end result&#xD;
is a service which is more resilient (and thus has higher availability), which lets&#xD;
the world know both its current state as well as future trends.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In one project I was working on we inherited a situation where there were interdependencies&#xD;
between executable installed on different servers (within a service) – for example&#xD;
when one process was down on server A the objects running on server B could not function&#xD;
well and other such dependencies (this isn’t the brightest design, but sometimes you&#xD;
have to compromise - in this case there was no time and budget to redesign these applications).&#xD;
What we ended up with, is something like the situation in figure 3.15 below:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/SOAPatternsBlogjectingWatchdog_13F42/clip_image005_2.gif"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="clip_image005" border="0" alt="clip_image005" align="right" src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/SOAPatternsBlogjectingWatchdog_13F42/clip_image005_thumb.gif" width="627" height="554"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Figure 3.15 a sample deployment of a blogjecting watchdog. The daemons on the servers&#xD;
monitor the running components on each server. The Watchdog edge exposes the current&#xD;
the current state both through a web-services API and as SNMP traps&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The watchdog agents on each of the server nodes monitors the components. The agents&#xD;
communicate amongst themselves to examine the dependencies and actions taken. The&#xD;
watchdog Edge component provides a WSDL based endpoint where other services can query&#xD;
it for the service’s health. It also publishes SNMP traps to an external SNMP monitor&#xD;
(e.g. HP-Openview). As an implementation hint, I can suggest keeping the watchdog&#xD;
components in a separate very simple executable (preferably a daemon that runs when&#xD;
the OS loads). The simpler the component, the lower the risk it will fail in itself&#xD;
(you can of course have a backup in the form of a hardware watchdog ..). Let’s take&#xD;
a more thorough look at the technology mapping options&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a name="_Toc163673246"&gt;1.3 Technology Mapping&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Implementing Blogjecting Watchdog in an enterprise will usually pre-determine the&#xD;
protocols you will have to use for your “blog”. The IT team will most likely already&#xD;
standardize on one of the leading monitoring suites (CA-Unicenter, HP-Openview, IBM-Tivoli&#xD;
or if you are an all Microsoft shop Microsoft Operations Manager). In these cases&#xD;
you can use the SDK of the monitoring software (e.g. the Unicenter Agent SDK or MOM&#xD;
management pack developer guides). There are even 3&lt;sup&gt;rd&lt;/sup&gt; party software packages&#xD;
to help you build such agents (for example OC Systems have a Universal Agent that&#xD;
makes it easier to write agents for Unicenter).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Note, that this is not always the case though, and sometimes you do have the freedom&#xD;
to choose you protocols. Few projects I worked on chose to standardize on using web-services&#xD;
with specific messages for monitoring the health of service (so we had a specific&#xD;
endpoint for each service where these messages were supported). With the emergent&#xD;
of SOA specific tools like the ones by Amberpoint and Weblayers you will see more&#xD;
and more WS-* based monitoring.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Other ways for reporting your internal state can be to use standards like SNMP (Simple&#xD;
Network Management Protocol) or plainly the windows Event logs An interesting option,&#xD;
which will let your Blogjecting Watchdog literally blog is to use a product called&#xD;
RSSBus. Whish is an ESB implementation that uses RSS protocol for communications.&#xD;
At the time I am writing this, the product is still in beta, so I haven’t used it&#xD;
for a serious system yet. Nevertheless, it looks like an interesting direction which&#xD;
I’ll consider when it is released. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Regarding the self-healing part (watchdog), self-healing is still more prevalent in&#xD;
hardware then in software (watchdog timers, RAID, IBM , hot spare memories, hot spare&#xD;
drives etc.) in a sense any solution that builds on clustering technology also has&#xD;
some of that built-in. The virtualization trend will also help in this sense (see&#xD;
discussion on utility computing in this chapter’s summary). You can already read papers&#xD;
that talk about self-healing web services (G. Kouadri Mostéfaoui, 2006) or see some&#xD;
projects that tries to look into this problem (e.g. WS-Diamond - DIAgnosability, Monitoring&#xD;
and Diagnosis). Nevertheless, all of them are still in the research phase and if you&#xD;
want something now, you will probably need to implement something by yourself. In&#xD;
my experience, it won’t take you too much time to have a basic watchdog up and running&#xD;
, but it will take you sometime until you will have it predicting and acting as an&#xD;
advanced warning system. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a name="_Toc163673247"&gt;1.4 Quality Attribute Scenarios&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The Blogjecting Watchdog is an interesting pattern (and not just because of its odd&#xD;
name) as it can really help on the way to autonomous computing. The effect of this&#xD;
proactive approach is to increase the overall reliability of the service. A service&#xD;
which is self-healing can overcome (at least) minor problem which results in better&#xD;
availability overall. Additionally the monitoring aspects of the Blogjecting Watchdog&#xD;
also help enhance availability by notifying administrators that something is amiss&#xD;
(which will enable them to fix it). &#xD;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" width="205"&gt;&lt;p&gt;&#xD;
Quality Attribute (level1)&#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="204"&gt;&lt;p&gt;&#xD;
Quality Attribute (level2)&#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="206"&gt;&lt;p&gt;&#xD;
Sample Scenario&#xD;
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="205"&gt;&lt;p&gt;&#xD;
Availability &#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="204"&gt;&lt;p&gt;&#xD;
Failure detection&#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="206"&gt;&lt;p&gt;&#xD;
Upon a failure or degraded performance, The system will alert the system admin (via&#xD;
SMS) within 3 minutes. &#xD;
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" width="205"&gt;&lt;p&gt;&#xD;
Reliability&#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="204"&gt;&lt;p&gt;&#xD;
Increased autonomy &#xD;
&lt;/p&gt;&lt;/td&gt;&lt;td valign="top" width="206"&gt;&lt;p&gt;&#xD;
During normal operations, the system will clear all its temporary resources (e.g.&#xD;
files) continuously &#xD;
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Table 1.1 Blogjecting Watchdog pattern quality attributes scenarios. These are the&#xD;
architectural scenarios that can make us think about using the Blogjecting Watchdog&#xD;
pattern.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Once we introduce a monitor and start to collect data, we can start to find new uses&#xD;
for that data, for  example we can use the information on incoming request to&#xD;
try to locate attacks on the service etc. Saved monitoring data can be used to analyze&#xD;
the service’s behavior over time, predict failures and thus increase its maintainability&#xD;
etc.&#xD;
&lt;/p&gt;&#xD;
        &lt;hr align="left" size="1" width="33%"&gt;&lt;/hr&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a name="_msocom_1"&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=89f18198-106f-41a3-9590-1690ff17cefe"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=YH7RY4aDP8I:axlNcv_CgAo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=YH7RY4aDP8I:axlNcv_CgAo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=YH7RY4aDP8I:axlNcv_CgAo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=YH7RY4aDP8I:axlNcv_CgAo:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/YH7RY4aDP8I" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,89f18198-106f-41a3-9590-1690ff17cefe.aspx</comments>
      <category>Q&amp;A</category>
      <category>SOA</category>
      <category>SOA Patterns</category>
      <category>Software Architecture</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/04/30/SOAPatternsNdashBlogjectingWatchdog.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=fdd4b067-892a-463d-b7df-7f3779540b4b</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,fdd4b067-892a-463d-b7df-7f3779540b4b.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,fdd4b067-892a-463d-b7df-7f3779540b4b.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=fdd4b067-892a-463d-b7df-7f3779540b4b</wfw:commentRss>
      
      <title>Up and running</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,fdd4b067-892a-463d-b7df-7f3779540b4b.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/mjO4Xj5E-l0/UpAndRunning.aspx</link>
      <pubDate>Tue, 28 Apr 2009 21:01:48 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I didn’t blog for the past month – well, I didn’t really had time to breath either&#xD;
:). However as of last week we (&lt;a href="http?//www.xsights.com"&gt;xsights&lt;/a&gt;) moved&#xD;
our system from demos and testing into production with our first client – Maariv,&#xD;
israel’s second largest newspaper. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In case you don’t know what xsights does – we hyperlink the real world using the mobile&#xD;
as your mouse (sort of like barcodes e.g. microsoft tag – but without the barcode;)&#xD;
)&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b1dd4cb3-3df1-4a22-971f-329b6b47b3e9" class="wlWriterEditableSmartContent"&gt;&#xD;
          &lt;div id="06d6e727-e6f0-41c0-a98a-a548f7a7f30d" style="margin: 0px; padding: 0px; display: inline;"&gt;&#xD;
            &lt;div&gt;&#xD;
              &lt;a href="http://www.youtube.com/watch?v=7XvNHx5lyHc&amp;amp;eurl=http://www.xsights.com/xsights//demo_files/widget1_markup.html&amp;amp;feature=player_embedded" target="_new"&gt;&#xD;
                &lt;img src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/Upandrunning_1502E/video85d0aeee3219.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('06d6e727-e6f0-41c0-a98a-a548f7a7f30d'); downlevelDiv.innerHTML = &amp;quot;&amp;lt;div&amp;gt;&amp;lt;object width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;param name=\&amp;quot;movie\&amp;quot; value=\&amp;quot;http://www.youtube.com/v/7XvNHx5lyHc&amp;amp;hl=en\&amp;quot;&amp;gt;&amp;lt;\/param&amp;gt;&amp;lt;embed src=\&amp;quot;http://www.youtube.com/v/7XvNHx5lyHc&amp;amp;hl=en\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;\/embed&amp;gt;&amp;lt;\/object&amp;gt;&amp;lt;\/div&amp;gt;&amp;quot;;" alt=""&gt;&lt;/img&gt;&#xD;
              &lt;/a&gt;&#xD;
            &lt;/div&gt;&#xD;
          &lt;/div&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
Anyway, our first product (actually service) is for printed newspapers/magazines (see&#xD;
video above) and we are now in the dry-run phase were we make sure all the interfaces&#xD;
(specifying content, links etc.) work ( With the official launch planned in a few&#xD;
weeks) – but already each newspaper coming out has a few links which are marked by&#xD;
a small “mem” : &lt;a href="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/Upandrunning_1502E/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.rgoarchitects.com/nblog/content/binary/WindowsLiveWriter/Upandrunning_1502E/image_thumb.png" width="31" height="30"&gt;&lt;/img&gt;&lt;/a&gt;for&#xD;
instance, Today’s (independence day) paper has 6 different links (in the Sports, signon&#xD;
and Asakim). Currently only us and Maariv’s employees use the system but we thought&#xD;
it would be nice to start getting some more feedback from more objective parties so&#xD;
if you are interested in trying new technologies before others, live in Israel, read&#xD;
Maariv and have a video call  capable 3G phone drop me an email (arnon at xsights&#xD;
dot com). Note that there is no software to install, we use the video call capabilities&#xD;
of the phone (we are working on a client for phones that don’t support video calls&#xD;
like the iPhone etc. but that’s another story)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Other related good news  (I hope that’s how you’d see that anyway) is that I&#xD;
feel I can go back to my regular blogging schedule. Some of the posts in queue include&#xD;
nano-services anti-pattern, aggregated reporting pattern, blogjecting watchdog pattern&#xD;
and two interesting questions I received which are related to it, post on twitter&#xD;
integration for reporting  etc.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=fdd4b067-892a-463d-b7df-7f3779540b4b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=mjO4Xj5E-l0:5eVRc3jg9AY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=mjO4Xj5E-l0:5eVRc3jg9AY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=mjO4Xj5E-l0:5eVRc3jg9AY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=mjO4Xj5E-l0:5eVRc3jg9AY:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/mjO4Xj5E-l0" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,fdd4b067-892a-463d-b7df-7f3779540b4b.aspx</comments>
      <category>General</category>
      <category>xsights</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/04/28/UpAndRunning.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=a422864f-4f88-4a04-a6c7-ab0ded9a1d42</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,a422864f-4f88-4a04-a6c7-ab0ded9a1d42.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,a422864f-4f88-4a04-a6c7-ab0ded9a1d42.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=a422864f-4f88-4a04-a6c7-ab0ded9a1d42</wfw:commentRss>
      
      <title>8 must read papers for project managers</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,a422864f-4f88-4a04-a6c7-ab0ded9a1d42.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/7AL0IlgVnX0/8MustReadPapersForProjectManagers.aspx</link>
      <pubDate>Tue, 31 Mar 2009 21:16:18 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I decided to do another article collection post. As I mentioned in the &lt;a href="http://www.rgoarchitects.com/nblog/2009/03/18/ContinuousDeployment.aspx"&gt;last&#xD;
post &lt;/a&gt;that I am extremely busy these days  as we're preparing to launch the&#xD;
first public pilot of our service. On top of that I cannot disregard the ROI (views&#xD;
vs. hours invested) in previous collection post I made on "&lt;a href="http://www.rgoarchitects.com/nblog/2009/02/27/10PapersEverySoftwareArchitectShouldReadAtLeastTwice.aspx"&gt;10&#xD;
papers architect should read&lt;/a&gt;". It isn't that I don't have other articles&#xD;
and papers with 40K+ reads but compiling a list takes much less time than, say, writing&#xD;
an article on &lt;a href="http://www.rgoarchitects.com/Files/SOADefined.pdf"&gt;what is&#xD;
SOA&lt;/a&gt;,&lt;a href="http://www.rgoarchitects.com/Files/fallacies.pdf"&gt; explaining the&#xD;
fallacies of distributed computing&lt;/a&gt;, &lt;a href="http://www.rgoarchitects.com/blog/content/binary/uc.pdf"&gt;a&#xD;
mini-book on Use cases&lt;/a&gt; - not to mention the effort that goes into writing  &lt;a href="http://www.soapatternsbook.com/"&gt;SOA&#xD;
patterns/anti patterns book&lt;/a&gt; (&lt;a href="http://www.rgoarchitects.com/Files/SOAPatterns/Saga.pdf"&gt;Saga&lt;/a&gt;, &lt;a href="http://www.rgoarchitects.com/Files/SOAPatterns/EdgeComponent.pdf"&gt;Edge&#xD;
Component&lt;/a&gt;, &lt;a href="http://www.rgoarchitects.com/Files/SOAPatterns/TheKnot.pdf"&gt;The&#xD;
Knot&lt;/a&gt; etc.). &#xD;
&lt;br&gt;&#xD;
But enough about me...&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://www.cs.tau.ac.il/~ohadbr/systems/spring2007/misc/mmm.pdf"&gt;The mythical&#xD;
man-month&lt;/a&gt; (1975) Fred Brooks - it is the second chapter of &lt;a href="http://www.amazon.com/dp/0201835959/"&gt;a&#xD;
book with the same name&lt;/a&gt;. A classic paper where, I think, for the first time, the&#xD;
ideas that some tasks need to be done sequentially and can not be solved by adding&#xD;
more man-power or in Fred’s words “The bearing of a child takes nine months, no matter&#xD;
how many women are assigned”. It is also famous for stating that adding more people&#xD;
to a late project will only delay it further. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://ieeexplore.ieee.org/Xplore/login.jsp?url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F52%2F26575%2F01184161.pdf%3Farnumber%3D1184161&amp;amp;authDecision=-203"&gt;Why&#xD;
the Vasa Sank: 10 problems and some antidotes for software project&lt;/a&gt;s (2003) by&#xD;
Richard E. Fairley and Mary J. Wilshire -it isn't free but worth it (though you can&#xD;
read the gist of it for free in "&lt;a href="http://faculty.up.edu/lulay/failure/vasacasestudy.pdf"&gt;Why&#xD;
the Vasa Sank: 10 Lessons learned&lt;/a&gt;" by Richard E. Fairley) – The tale of the&#xD;
Vasa ship is a very nice analogy for developing software project. I first heard it&#xD;
from Ivar Jacobson several years ago. This article presents it very well.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://www.catb.org/%7Eesr/writings/cathedral-bazaar/cathedral-bazaar/"&gt;The&#xD;
Cathedral and the Bazaar&lt;/a&gt; (1997) Eric S. Raymond - the classic essay on open source&#xD;
vs. closed source models for developing software&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://www.developerdotstar.com/mag/articles/maintenance_solution.html"&gt;Software&#xD;
Maintenance is a Solution, Not a Problem&lt;/a&gt; - Robert L. Glass – it really is when&#xD;
you think about it.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://www.roughtype.com/archives/2007/01/it_doesnt_matte.php"&gt;IT doesn't&#xD;
Matter&lt;/a&gt; (2003) - Nicolas Carr – A thought provoking article on the place and importance &#xD;
of IT – Carr basically states that software is getting to a point where it will become&#xD;
a utility like electricity and in that will loose it strategic place. In a sense we’re&#xD;
seeing more of this direction today with all the hype and move to cloud computing.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Chapter 3 of the "&lt;a href="http://www.acq.osd.mil/dsb/reports/defensesoftware.pdf"&gt;Report&#xD;
of the Defense Science Board Task Form on Defense Software&lt;/a&gt;" (2000) – various&#xD;
– An extensive analysis of software intensive projects. Besides revealing interesting&#xD;
facts on the ever growing importance of software (eg. 80% of the functions of F-22&#xD;
are performed in software vs. 8% in the 1960’s F-4) it also acknowledge the advantages&#xD;
of iterative lifecycle over waterfall even in large, safety critical,complex &#xD;
projects.  &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://agile2003.agilealliance.org/files/P4Paper.pdf"&gt;Observations on Balancing&#xD;
Discipline and Agility&lt;/a&gt; (2003) Barry Boehm and Richard Turner – provide a few rules&#xD;
of thumb for assessing a project’s suitability for agile methods (e.g. team’s level,&#xD;
criticality etc.) &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Succeeding with "Agile Fixed Price" &lt;a href="http://www.nayima.be/html/fixedpriceprojects.pdf"&gt;part&#xD;
I&lt;/a&gt; &amp;amp; &lt;a href="http://www.nayima.be/html/agilefixedprice.pdf"&gt;part II&lt;/a&gt; Pascal&#xD;
Van Cauwenberghe  - a two part paper with practical advice to employing/injecting&#xD;
agile methods into fixed price contracts.&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;a href="http://11011.net/software/vspaste"&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=a422864f-4f88-4a04-a6c7-ab0ded9a1d42"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=7AL0IlgVnX0:3d7qogCAa6Q:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=7AL0IlgVnX0:3d7qogCAa6Q:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=7AL0IlgVnX0:3d7qogCAa6Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=7AL0IlgVnX0:3d7qogCAa6Q:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/7AL0IlgVnX0" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,a422864f-4f88-4a04-a6c7-ab0ded9a1d42.aspx</comments>
      <category>General</category>
      <category>Papers</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/03/31/8MustReadPapersForProjectManagers.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.rgoarchitects.com/nblog/Trackback.aspx?guid=63218d3a-d00a-4592-a094-e84c9eaf1c49</trackback:ping>
      <pingback:server>http://www.rgoarchitects.com/nblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.rgoarchitects.com/nblog/PermaLink,guid,63218d3a-d00a-4592-a094-e84c9eaf1c49.aspx</pingback:target>
      <dc:creator>Arnon Rotem-Gal-Oz</dc:creator>
      <wfw:comment>http://www.rgoarchitects.com/nblog/CommentView,guid,63218d3a-d00a-4592-a094-e84c9eaf1c49.aspx</wfw:comment>
      <wfw:commentRss>http://www.rgoarchitects.com/nblog/SyndicationService.asmx/GetEntryCommentsRss?guid=63218d3a-d00a-4592-a094-e84c9eaf1c49</wfw:commentRss>
      
      <title>Continuous Deployment</title>
      <guid isPermaLink="false">http://www.rgoarchitects.com/nblog/PermaLink,guid,63218d3a-d00a-4592-a094-e84c9eaf1c49.aspx</guid>
      <link>http://feedproxy.google.com/~r/CirrusMinor/~3/BgyPcGlV6AI/ContinuousDeployment.aspx</link>
      <pubDate>Wed, 18 Mar 2009 19:35:26 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;div style="FLOAT: right" class="zemanta-image"&gt;&#xD;
          &lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Butchers_creek_-_omeo13.jpg/202px-Butchers_creek_-_omeo13.jpg"&gt;&lt;/img&gt;&#xD;
          &lt;br&gt;&#xD;
          &lt;small&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Butchers_creek_-_omeo13.jpg"&gt;Wikipedia&lt;/a&gt;&lt;/small&gt;&#xD;
        &lt;/div&gt;&#xD;
You might have noticed my blogging is slowing down a little,  in case you're&#xD;
wondering the culprit is xsights - As we're getting closer to&lt;br&gt;&#xD;
production (2-3 weeks if all goes well) everything else slows down... &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
We all know about continuous integration (CI). We (xsights) are seeing a lot of ROI&#xD;
on the investments we made into signing up to CI esp. when we augmented by automated&#xD;
testing. Everyday we can and do actually release several versions and run load tests&#xD;
on them on different server seeking the best release to  "freeze". Where "freezing"&#xD;
means the  system that will be used in production.  That's the way it is&#xD;
done, right? You work on a release for x months (sometimes years..) and after an integration&#xD;
period at the client's site you go live and forget about them (save for show-stopping&#xD;
bugs) until the next major update several months later. For instance, setting up our&#xD;
"methodology" I figured a 6 months release cycles for major versions plus 1 month&#xD;
releases of minor version would suffice.&lt;br&gt;&lt;br&gt;&#xD;
These days, however the more I think about it, The more I believe this approach is&#xD;
not the right one for our situation. We are going to go with Continous Deployment.&#xD;
There are many reasons for that  primarily:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&#xD;
The requirements stream (new reqs and changes) is still pouring in - and in increased&#xD;
rate. &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
We are building a service platform not an installable product -  This means we&#xD;
get to control where how it is run so there's less overhead in&lt;br&gt;&#xD;
streamlining updates &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
It would be our first public installation - were going to roll out bug fixes anyway&#xD;
(I personally never write bugs... but you know ;) ). We'll need a proper procedure&#xD;
for updates anyway &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
We are doing this anyway - every new demo/internal run we have is using the "stablest"&#xD;
latest and greatest :)&lt;/li&gt;&lt;/ul&gt;&#xD;
What does  Continuous Deployment means? It means we'll be rolling out new production&#xD;
versions on a daily basis (or even more frequently!)&lt;br&gt;&#xD;
How that's going to work? Well, First there are the prerequisites: &#xD;
&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;&#xD;
Version control - something that can track and tag versions...&lt;br&gt;&lt;/li&gt;&lt;li&gt;&#xD;
Continous integration which is set up and running. You cannot release continously&#xD;
if every new development offer breaks the system. An automated smoke test is &#xD;
&lt;br&gt;&lt;/li&gt;&lt;li&gt;&#xD;
Automates tests that provide a good approximation of real usage&lt;br&gt;&#xD;
(.e.g. usage patterns, loads etc.) - You need to be able to have a high&lt;br&gt;&#xD;
confidence level that whatever you have.&lt;br&gt;&lt;/li&gt;&lt;li&gt;&#xD;
Staging environment - An environment as close as possible to the production system&#xD;
(just like you'd have for a web-site) &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
Monitoring and alert system - You need to be able to identify problems quickly - the&#xD;
running &#xD;
&lt;br&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
Then there's the process:&lt;br&gt;&lt;ol&gt;&lt;li&gt;&#xD;
identify a baseline Stable release -The "fallback". &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
pick the most promising build of the day &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
run it through more extensive tests (at least burn-down and load - which means a release&#xD;
maybe 1-2 days old by the time it hits the production system)&lt;br&gt;&lt;/li&gt;&lt;li&gt;&#xD;
if everyhting is cool deploy to staging - else fix bugs and repeat from 2 &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
repeat tests in staging environment &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
Update system (This is a point that still needs work so we can support a version hot-swap&#xD;
i.e. without a shutdown).. &#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
If the monitoring system alerts unforeseen bugs (i.e. problems with the release) -&#xD;
roll back to stable release, try to add test for the problematic behavior and repeat&#xD;
from 2&lt;br&gt;&lt;/li&gt;&lt;li&gt;&#xD;
if the release worked good enough - mark it as the next Stable release&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&#xD;
That's the plan. However as we all know, talk is cheap so be sure to check in here&#xD;
in 2-3 months to hear how did we fare :)&lt;br&gt;&lt;br&gt;&lt;div class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/5cf72484-f08f-422f-9f63-03c477bbbe36/"&gt;&lt;img class="zemanta-pixie-img" alt="Reblog this post [with Zemanta]" src="http://img.zemanta.com/reblog_e.png?x-id=5cf72484-f08f-422f-9f63-03c477bbbe36"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;p class="scribefire-powered"&gt;&lt;br&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://www.rgoarchitects.com/nblog/aggbug.ashx?id=63218d3a-d00a-4592-a094-e84c9eaf1c49"&gt;&lt;/img&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BgyPcGlV6AI:dnIq_AQH79o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BgyPcGlV6AI:dnIq_AQH79o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?i=BgyPcGlV6AI:dnIq_AQH79o:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/CirrusMinor?a=BgyPcGlV6AI:dnIq_AQH79o:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CirrusMinor?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CirrusMinor/~4/BgyPcGlV6AI" height="1" width="1"/&gt;</description>
      <comments>http://www.rgoarchitects.com/nblog/CommentView,guid,63218d3a-d00a-4592-a094-e84c9eaf1c49.aspx</comments>
      <category>Agile</category>
      <category>Project Management</category>
      <category>xsights</category>
    <feedburner:origLink>http://www.rgoarchitects.com/nblog/2009/03/18/ContinuousDeployment.aspx</feedburner:origLink></item>
  </channel>
</rss>
