<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>Matevž Gačnik's Weblog - Architecture</title>
    <link>https://www.request-response.com/blog/</link>
    <description>Technology Philanthropy</description>
    <image>
      <url>http://www.request-response.com/blog/images/favicon.jpg</url>
      <title>Matevž Gačnik's Weblog - Architecture</title>
      <link>https://www.request-response.com/blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Matevz Gacnik</copyright>
    <lastBuildDate>Sat, 04 May 2019 20:02:27 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>matevz.gacnik@gmail.com</managingEditor>
    <webMaster>matevz.gacnik@gmail.com</webMaster>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=1223a8d2-9408-4bcd-929a-283eecd0b1a4</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,1223a8d2-9408-4bcd-929a-283eecd0b1a4.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,1223a8d2-9408-4bcd-929a-283eecd0b1a4.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1223a8d2-9408-4bcd-929a-283eecd0b1a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a slightly less technical post, covering my experiences and thoughts on <strong>cloud
computing</strong> as a viable business processing platform.
</p>
        <p>
Recent <a href="http://aws.amazon.com/ec2">Amazon EC2</a> failure was gathering a
considerable amount of press and discussion coverage. Mostly discussions revolve around
the <strong>failure</strong> of cloud computing as a promise to <em>never</em> go
down, <em>never</em> lose a bit of information.
</p>
        <p>
This is wrong and has been wrong for a couple of years. Marketing people should <strong>not
be making promises</strong> their technical engineers can't deliver. Actually, marketing
should really step down from highly technical features and services, in general. I
find it funny that there is no serious marketing involved in selling <a href="http://en.wikipedia.org/wiki/Boiling_water_reactor">BWR
reactors</a> (which fail too), but they probably serve the same amount of people as
do cloud services, nowadays.
</p>
        <p>
Getting back to the topic, as you may know EC2 failed miserably a couple of weeks
ago. It was something that should not happen - at least in many techie minds. The
fault at AWS EC2 cloud was with their EBS storage system, which failed across multiple <em>AWS
availability zones</em> within the same <em>AWS region</em> in North Virginia. Think
of availability zones as server racks within the same data center and regions as different
datacenters.
</p>
        <p>
Companies like Twitter, Reddit, Foursquare, Tekpub, Quora and others all deployed
their solutions to the same Amazon region - for example - North Virginia and were
thus susceptive to problems within <strong>that specific datacenter</strong>. They
could have replicated across different AWS regions, but did not.
</p>
        <p>
Thus, clouds <strong>will fail</strong>. It's only a matter of time. They will go
down. The main thing clouds deliver is a lower probability of failure, not its elimination.
Thinking that cloud computing will solve the industry's fears on losing data or deliver
100% uptime is downright imaginary.
</p>
        <p>
Take a look at <a href="http://aws.amazon.com/ec2-sla">EC2's SLA</a>. It says 99.95%
availability. Microsoft's <a href="http://www.microsoft.com/windowsazure/sla">Azure
SLA</a>? 99.9%. That's approximately +- 7 hours of downtime built in! And we didn't
even start to discuss how much junk marketing people will sell.
</p>
        <p>
We are still in <strong>IaaS</strong> world, although companies are really pushing <strong>PaaS</strong> and <strong>SaaS</strong> hard.
Having said that, <a href="http://www.microsoft.com/windowsazure">Windows Azure</a>'s
goal of 'forget about it, we will save you anyway' currently has a lot more merit
that other offerings. It is indeed trying to go the PaaS and SaaS route while abstracting
the physical machines, racks and local/private datacenters.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=1223a8d2-9408-4bcd-929a-283eecd0b1a4" />
      </body>
      <title>Clouds Will Fail</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,1223a8d2-9408-4bcd-929a-283eecd0b1a4.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,1223a8d2-9408-4bcd-929a-283eecd0b1a4.aspx</link>
      <pubDate>Sat, 04 May 2019 20:02:27 GMT</pubDate>
      <description>&lt;p&gt;
This is a slightly less technical post, covering my experiences and thoughts on &lt;strong&gt;cloud
computing&lt;/strong&gt; as a viable business processing platform.
&lt;/p&gt;
&lt;p&gt;
Recent &lt;a href="http://aws.amazon.com/ec2"&gt;Amazon EC2&lt;/a&gt; failure was gathering a
considerable amount of press and discussion coverage. Mostly discussions revolve around
the &lt;strong&gt;failure&lt;/strong&gt; of cloud computing as a promise to &lt;em&gt;never&lt;/em&gt; go
down, &lt;em&gt;never&lt;/em&gt; lose a bit of information.
&lt;/p&gt;
&lt;p&gt;
This is wrong and has been wrong for a couple of years. Marketing people should &lt;strong&gt;not
be making promises&lt;/strong&gt; their technical engineers can't deliver. Actually, marketing
should really step down from highly technical features and services, in general. I
find it funny that there is no serious marketing involved in selling &lt;a href="http://en.wikipedia.org/wiki/Boiling_water_reactor"&gt;BWR
reactors&lt;/a&gt; (which fail too), but they probably serve the same amount of people as
do cloud services, nowadays.
&lt;/p&gt;
&lt;p&gt;
Getting back to the topic, as you may know EC2 failed miserably a couple of weeks
ago. It was something that should not happen - at least in many techie minds. The
fault at AWS EC2 cloud was with their EBS storage system, which failed across multiple &lt;em&gt;AWS
availability zones&lt;/em&gt; within the same &lt;em&gt;AWS region&lt;/em&gt; in North Virginia. Think
of availability zones as server racks within the same data center and regions as different
datacenters.
&lt;/p&gt;
&lt;p&gt;
Companies like Twitter, Reddit, Foursquare, Tekpub, Quora and others all deployed
their solutions to the same Amazon region - for example - North Virginia and were
thus susceptive to problems within &lt;strong&gt;that specific datacenter&lt;/strong&gt;. They
could have replicated across different AWS regions, but did not.
&lt;/p&gt;
&lt;p&gt;
Thus, clouds &lt;strong&gt;will fail&lt;/strong&gt;. It's only a matter of time. They will go
down. The main thing clouds deliver is a lower probability of failure, not its elimination.
Thinking that cloud computing will solve the industry's fears on losing data or deliver
100% uptime is downright imaginary.
&lt;/p&gt;
&lt;p&gt;
Take a look at &lt;a href="http://aws.amazon.com/ec2-sla"&gt;EC2's SLA&lt;/a&gt;. It says 99.95%
availability. Microsoft's &lt;a href="http://www.microsoft.com/windowsazure/sla"&gt;Azure
SLA&lt;/a&gt;? 99.9%. That's approximately +- 7 hours of downtime built in! And we didn't
even start to discuss how much junk marketing people will sell.
&lt;/p&gt;
&lt;p&gt;
We are still in &lt;strong&gt;IaaS&lt;/strong&gt; world, although companies are really pushing &lt;strong&gt;PaaS&lt;/strong&gt; and &lt;strong&gt;SaaS&lt;/strong&gt; hard.
Having said that, &lt;a href="http://www.microsoft.com/windowsazure"&gt;Windows Azure&lt;/a&gt;'s
goal of 'forget about it, we will save you anyway' currently has a lot more merit
that other offerings. It is indeed trying to go the PaaS and SaaS route while abstracting
the physical machines, racks and local/private datacenters.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=1223a8d2-9408-4bcd-929a-283eecd0b1a4" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,1223a8d2-9408-4bcd-929a-283eecd0b1a4.aspx</comments>
      <category>Architecture</category>
      <category>Other</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
During exploration of <a href="http://msdn.microsoft.com/en-us/library/ee790974.aspx">high
availability</a> (HA) features of Windows Server AppFabric <a href="http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx">Distributed
Cache</a> I needed to generate enough load in a short timeframe. You know, to kill
a couple of servers.
</p>
        <p>
This is what came out of it.
</p>
        <p>
          <img src="http://www.request-response.com/blog/images/velocitytool.png" />
        </p>
        <p>
It's a simple command line tool, allowing you to:
</p>
        <ul>
          <li>
Add millions of objects of arbitrary size to the cache cluster (using <font face="Courier New">cache.Add()</font>) 
</li>
          <li>
Put objects of arbitraty size to cache cluster 
</li>
          <li>
Get objects back 
</li>
          <li>
Remove objects from cache 
</li>
          <li>
Has cluster support 
</li>
          <li>
Has local cache support 
</li>
          <li>
Will list configuration 
</li>
          <li>
Will max out you local processors (using .NET 4 <font face="Courier New">Parallel.For()</font>) 
</li>
          <li>
Will perform graceously, even in times of trouble</li>
        </ul>
        <p>
I talked about this at a recent <a href="http://slodug.si/blogs/system/archive/2010/12/03/zadnje-leto-nje-sre-anje-slodug-v-sredo-8-12.aspx">Users
Group</a> meeting, doing a live demo of cache clusters under load.
</p>
        <p>
Typical usage scenario is:
</p>
        <ol>
          <li>
Configure a HA cluster<br />
Remember, 3 nodes minimum, Windows Server 2008 (R2) Enterprise or DataCenter 
</li>
          <li>
Configure a HA cache 
</li>
          <li>
Edit <font face="Courier New">App.config</font>, list all available servers 
</li>
          <li>
Connect to cluster 
</li>
          <li>
Put a bunch of large objects (generate load)<br />
Since AppFabric currently supports only partitioned cache type, this will distribute
load among all cluster hosts. Thus, all hosts will store 1/N percent of objects. 
</li>
          <li>
Stop one node 
</li>
          <li>
Get all objects back<br />
Since cache is in HA mode, you will get all your objects back, even though a host
is down - cluster will redistribute all the missing cache regions to running nodes.</li>
        </ol>
        <p>
You can download the tool <a href="http://www.request-response.com/blog/content/binary/appfabriccachetool.zip">here</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81" />
      </body>
      <title>Load Test Tool for Windows Server AppFabric Distributed Cache</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81.aspx</link>
      <pubDate>Thu, 09 Dec 2010 13:07:25 GMT</pubDate>
      <description>&lt;p&gt;
During exploration of &lt;a href="http://msdn.microsoft.com/en-us/library/ee790974.aspx"&gt;high
availability&lt;/a&gt; (HA) features of Windows Server AppFabric &lt;a href="http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx"&gt;Distributed
Cache&lt;/a&gt; I needed to generate enough load in a short timeframe. You know, to kill
a couple of servers.
&lt;/p&gt;
&lt;p&gt;
This is what came out of it.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/images/velocitytool.png"&gt;
&lt;/p&gt;
&lt;p&gt;
It's a simple command line tool, allowing you to:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Add millions of objects of arbitrary size to the cache cluster (using &lt;font face="Courier New"&gt;cache.Add()&lt;/font&gt;) 
&lt;li&gt;
Put objects of arbitraty size to cache cluster 
&lt;li&gt;
Get objects back 
&lt;li&gt;
Remove objects from cache 
&lt;li&gt;
Has cluster support 
&lt;li&gt;
Has local cache support 
&lt;li&gt;
Will list configuration 
&lt;li&gt;
Will max out you local processors (using .NET 4 &lt;font face="Courier New"&gt;Parallel.For()&lt;/font&gt;) 
&lt;li&gt;
Will perform graceously, even in times of trouble&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I talked about this at a recent &lt;a href="http://slodug.si/blogs/system/archive/2010/12/03/zadnje-leto-nje-sre-anje-slodug-v-sredo-8-12.aspx"&gt;Users
Group&lt;/a&gt; meeting, doing a live demo of cache clusters under load.
&lt;/p&gt;
&lt;p&gt;
Typical usage scenario is:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Configure a HA cluster&lt;br&gt;
Remember, 3 nodes minimum, Windows Server 2008 (R2) Enterprise or DataCenter 
&lt;li&gt;
Configure a HA cache 
&lt;li&gt;
Edit &lt;font face="Courier New"&gt;App.config&lt;/font&gt;, list all available servers 
&lt;li&gt;
Connect to cluster 
&lt;li&gt;
Put a bunch of large objects (generate load)&lt;br&gt;
Since AppFabric currently supports only partitioned cache type, this will distribute
load among all cluster hosts. Thus, all hosts will store 1/N percent of objects. 
&lt;li&gt;
Stop one node 
&lt;li&gt;
Get all objects back&lt;br&gt;
Since cache is in HA mode, you will get all your objects back, even though a host
is down - cluster will redistribute all the missing cache regions to running nodes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
You can download the tool &lt;a href="http://www.request-response.com/blog/content/binary/appfabriccachetool.zip"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ba7b66b1-e6c6-4f49-acc0-3a3f7c32cf81.aspx</comments>
      <category>.NET 4.0 - General</category>
      <category>Architecture</category>
      <category>Microsoft</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=b6565ebe-4d35-4676-a09e-08b84b6554b1</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b6565ebe-4d35-4676-a09e-08b84b6554b1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm happy to announce <a href="http://blogs.solidq.com/EN/dsarka/Lists/Posts/Post.aspx?ID=119">our</a> organization
work is coming to fruition.
</p>
        <p>
          <a href="http://www.bleedingedge.si">Bleeding Edge 2008</a> is taking the stage for
the autumn season.
</p>
        <p>
          <strong>
            <img src="http://www.request-response.com/blog/content/binary/be2008.jpg" />
            <br />
          </strong>
          <strong>Portorož, Slovenia, October 1<sup>st</sup>, 9:00</strong>
        </p>
        <p>
          <a href="http://www.bleedingedge.si">Official site</a>, <a href="http://www.bleedingedge.si/prijava.html">Registration</a>, <a href="http://www.bleedingedge.si/sponzorji.html">Sponsors</a></p>
        <p>
Go for the early bird registration (till September 12<sup>th</sup>). The time is now.
</p>
        <p>
Potential sponsor? <a href="http://www.bleedingedge.si/sponzorji.html">Here</a>'s
the offering.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b6565ebe-4d35-4676-a09e-08b84b6554b1" />
      </body>
      <title>Bleeding Edge 2008</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</link>
      <pubDate>Thu, 17 Jul 2008 13:50:06 GMT</pubDate>
      <description>&lt;p&gt;
I'm happy to announce &lt;a href="http://blogs.solidq.com/EN/dsarka/Lists/Posts/Post.aspx?ID=119"&gt;our&lt;/a&gt; organization
work is coming to fruition.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.bleedingedge.si"&gt;Bleeding Edge 2008&lt;/a&gt; is taking the stage for
the autumn season.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;img src="http://www.request-response.com/blog/content/binary/be2008.jpg"&gt;
&lt;br&gt;
&lt;/strong&gt;&lt;strong&gt;Portorož, Slovenia, October 1&lt;sup&gt;st&lt;/sup&gt;, 9:00&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.bleedingedge.si"&gt;Official site&lt;/a&gt;, &lt;a href="http://www.bleedingedge.si/prijava.html"&gt;Registration&lt;/a&gt;, &lt;a href="http://www.bleedingedge.si/sponzorji.html"&gt;Sponsors&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Go for the early bird registration (till September 12&lt;sup&gt;th&lt;/sup&gt;). The time is now.
&lt;/p&gt;
&lt;p&gt;
Potential sponsor? &lt;a href="http://www.bleedingedge.si/sponzorji.html"&gt;Here&lt;/a&gt;'s
the offering.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b6565ebe-4d35-4676-a09e-08b84b6554b1" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</comments>
      <category>Architecture</category>
      <category>Conferences</category>
      <category>MVP</category>
      <category>Work</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ab874bc2-1546-48d1-a8aa-46f0bf876d93</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ab874bc2-1546-48d1-a8aa-46f0bf876d93</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm a huge fan of document style parameter models when implementing a public, programmatic <a href="http://en.wikipedia.org/wiki/Facade_pattern">façade</a> to
a business functionality that often changes.
</p>
        <p>
          <font face="Courier New">public interface IDocumentParameterModel<br />
{<br />
   [OperationContract]<br />
   [FaultContract(typeof(XmlInvalidException))]<br />
   XmlDocument Process(XmlDocument doc);<br />
}</font>
        </p>
        <p>
This contract defines a simple method, called <font face="Courier New">Process</font>,
which processes the input document. The idea is to define the <a href="http://www.w3.org/TR/xmlschema-1/">document
schema</a> and validate inbound XML documents, while throwing exceptions on <em>validation
errors</em>. The processing semantics is arbitrary and can support any kind of action,
depending on the defined <em>invoke document </em>schema.
</p>
        <p>
A simple instance document which validates against a version 1.0 <em>processing schema</em> could
look like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0?&gt;<br />
&lt;Process xmlns="http://www.gama-system.com/process10.xsd" version="1.0"&gt;<br />
   &lt;Instruction&gt;Add&lt;/Instruction&gt;<br />
   &lt;Parameter1&gt;10&lt;/Parameter1&gt;<br />
   &lt;Parameter2&gt;21&lt;/Parameter2&gt;<br />
&lt;/Process&gt;</font>
        </p>
        <p>
Another processing instruction, supported in version 1.1 of the <em>processing schema</em>,
with different semantics could be:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0?&gt;<br />
&lt;Process xmlns="http://www.gama-system.com/process11.xsd" version="1.1"&gt;<br />
   &lt;Instruction&gt;Store&lt;/Instruction&gt;<br />
   &lt;Content&gt;77u/PEFwcGxpY2F0aW9uIHhtbG5zPSJod...mdVcCI&lt;/Content&gt;<br />
&lt;/Process&gt;</font>
        </p>
        <p>
Note that the default XML namespace changed, but that is <strong>not a norm</strong>.
It only allows you to automate schema retrieval using the schema repository (think <font face="Courier New">System.Xml.Schema.XmlSchemaSet</font>),
load all supported schemas and validate automatically.
</p>
        <p>
          <font face="Courier New">public class ProcessService : IDocumentParameterModel<br />
{<br />
   public XmlDocument Process(XmlDocument doc)<br />
   {<br />
      XmlReaderSettings sett = new XmlReaderSettings();</font>
        </p>
        <p>
          <font face="Courier New">
            <strong>      sett.Schemas.Add(&lt;document
namespace 1&gt;, &lt;schema uri 1&gt;);<br />
      ...<br />
      sett.Schemas.Add(&lt;document namespace n&gt;, &lt;schema
uri n&gt;);</strong>
          </font>
        </p>
        <p>
          <font face="Courier New">      sett.ValidationType = ValidationType.Schema;<br />
      sett.ValidationEventHandler += new 
<br />
         ValidationEventHandler(XmlInvalidHandler);<br /></font>
          <font face="Courier New">      XmlReader books = XmlReader.Create(doc.OuterXml,
sett);<br /></font>
          <font face="Courier New">      while (books.Read())
{ }</font>
        </p>
        <p>
          <font face="Courier New">      // processing goes here<br />
      ...<br />
   }</font>
        </p>
        <p>
          <font face="Courier New">   static void XmlInvalidHandler(object sender,
ValidationEventArgs e)<br />
   {<br />
      if (e.Severity == XmlSeverityType.Error)<br />
         throw new XmlInvalidException(e.Message);<br />
   }<br />
}</font>
        </p>
        <p>
The main benefit of this approach is <em>decoupling</em> the parameter model and method
processing version from the <em>communication contract</em>. A service maintainer
has an option to change the terms of processing over time, while supporting older
version-aware document instances.
</p>
        <p>
This notion is of course most beneficial in situations where your processing syntax <strong>changes
frequently</strong> and has complex validation schemas. A simple case presented here
is informational only.
</p>
        <p>
So, how do we validate?
</p>
        <ul>
          <li>
We need to check the instance document version first. This is especially true in cases
where the document is <em>not qualified with a different namespace</em> when the version
changes.</li>
          <li>
We grab the appropriate schema or schema set</li>
          <li>
We validate the inbound XML document, throw a typed <font face="Courier New">XmlInvalidException</font> if
invalid</li>
          <li>
We process the call</li>
        </ul>
        <p>
The service side is quite straightforward.
</p>
        <p>
Let's look at the <strong>client</strong> and what are the options for painless generation
of service calls using this mechanism.
</p>
        <p>
Generally, one can always produce an instance <em>invoke document</em> by hand on
the client. <em>By hand</em> meaning using <font face="Courier New">System.Xml</font> classes
and DOM concepts. Since this is higly error prone and gets tedious with increasing
complexity, there is a notion of a schema compiler, which automatically translates
your XML Schema into the CLR type system. <font face="Courier New">Xsd.exe</font> and <font face="Courier New">XmlSerializer</font> are
your friends. 
</p>
        <p>
If your schema requires parts of the instance document to be digitally signed or encrypted,
you will need to adorn the serializer output with some manual DOM work. This might
also be a reason to use the third option.
</p>
        <p>
The third, and easiest option for the general developer, is to provide a <strong>local
object model</strong>, which serializes the requests on the client. This is an example:
</p>
        <p>
          <font face="Courier New">ProcessInstruction pi = new ProcessInstruction();<br />
pi.Instruction = "Add";<br />
pi.Parameter1 = 10;<br />
pi.Parameter2 = 21;<br />
pi.Sign(cert); // pi.Encrypt(cert);<br />
pi.Serialize();<br />
proxy.Process(pi.SerializedForm);</font>
        </p>
        <p>
The main benefit of this approach comes down to having an option on the server and
the client. Client developers have three different levels of complexity for generating
service calls. The model allows them to be as close to the wire as they see fit. Or
they can be abstracted completely from the wire representation if you provide a local
object model to access your services.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ab874bc2-1546-48d1-a8aa-46f0bf876d93" />
      </body>
      <title>Approaches to Document Style Parameter Models</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</link>
      <pubDate>Mon, 24 Sep 2007 10:19:10 GMT</pubDate>
      <description>&lt;p&gt;
I'm a huge fan of document style parameter models when implementing a public, programmatic &lt;a href="http://en.wikipedia.org/wiki/Facade_pattern"&gt;façade&lt;/a&gt; to
a business functionality that often changes.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public interface IDocumentParameterModel&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; [OperationContract]&lt;br&gt;
&amp;nbsp;&amp;nbsp; [FaultContract(typeof(XmlInvalidException))]&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlDocument Process(XmlDocument doc);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This contract defines a simple method, called &lt;font face="Courier New"&gt;Process&lt;/font&gt;,
which processes the input document. The idea is to define the &lt;a href="http://www.w3.org/TR/xmlschema-1/"&gt;document
schema&lt;/a&gt; and validate inbound XML documents, while throwing exceptions on &lt;em&gt;validation
errors&lt;/em&gt;. The processing semantics is arbitrary and can support any kind of action,
depending on the defined &lt;em&gt;invoke document &lt;/em&gt;schema.
&lt;/p&gt;
&lt;p&gt;
A simple instance document which validates against a version 1.0 &lt;em&gt;processing schema&lt;/em&gt; could
look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0?&amp;gt;&lt;br&gt;
&amp;lt;Process xmlns="http://www.gama-system.com/process10.xsd" version="1.0"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Instruction&amp;gt;Add&amp;lt;/Instruction&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Parameter1&amp;gt;10&amp;lt;/Parameter1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Parameter2&amp;gt;21&amp;lt;/Parameter2&amp;gt;&lt;br&gt;
&amp;lt;/Process&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Another processing instruction, supported in version 1.1 of the &lt;em&gt;processing schema&lt;/em&gt;,
with different semantics could be:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0?&amp;gt;&lt;br&gt;
&amp;lt;Process xmlns="http://www.gama-system.com/process11.xsd" version="1.1"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Instruction&amp;gt;Store&amp;lt;/Instruction&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Content&amp;gt;77u/PEFwcGxpY2F0aW9uIHhtbG5zPSJod...mdVcCI&amp;lt;/Content&amp;gt;&lt;br&gt;
&amp;lt;/Process&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Note that the default XML namespace changed, but that is &lt;strong&gt;not a norm&lt;/strong&gt;.
It only allows you to automate schema retrieval using the schema repository (think &lt;font face="Courier New"&gt;System.Xml.Schema.XmlSchemaSet&lt;/font&gt;),
load all supported schemas and validate automatically.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public class ProcessService : IDocumentParameterModel&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; public XmlDocument Process(XmlDocument doc)&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlReaderSettings sett = new XmlReaderSettings();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.Schemas.Add(&amp;lt;document
namespace 1&amp;gt;, &amp;lt;schema uri 1&amp;gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.Schemas.Add(&amp;lt;document namespace n&amp;gt;, &amp;lt;schema
uri n&amp;gt;);&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.ValidationType = ValidationType.Schema;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.ValidationEventHandler += new 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ValidationEventHandler(XmlInvalidHandler);&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlReader books = XmlReader.Create(doc.OuterXml,
sett);&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (books.Read())
{ }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // processing goes here&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; static void XmlInvalidHandler(object sender,
ValidationEventArgs e)&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Severity == XmlSeverityType.Error)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new XmlInvalidException(e.Message);&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The main benefit of this approach is &lt;em&gt;decoupling&lt;/em&gt; the parameter model and method
processing version from the &lt;em&gt;communication contract&lt;/em&gt;. A service maintainer
has an option to change the terms of processing over time, while supporting older
version-aware document instances.
&lt;/p&gt;
&lt;p&gt;
This notion is of course most beneficial in situations where your processing syntax &lt;strong&gt;changes
frequently&lt;/strong&gt; and has complex validation schemas. A simple case presented here
is informational only.
&lt;/p&gt;
&lt;p&gt;
So, how do we validate?
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
We need to check the instance document version first. This is especially true in cases
where the document is &lt;em&gt;not qualified with a different namespace&lt;/em&gt; when the version
changes.&lt;/li&gt;
&lt;li&gt;
We grab the appropriate schema or schema set&lt;/li&gt;
&lt;li&gt;
We validate the inbound XML document, throw a typed &lt;font face="Courier New"&gt;XmlInvalidException&lt;/font&gt; if
invalid&lt;/li&gt;
&lt;li&gt;
We process the call&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The service side is quite straightforward.
&lt;/p&gt;
&lt;p&gt;
Let's look at the &lt;strong&gt;client&lt;/strong&gt; and what are the options for painless generation
of service calls using this mechanism.
&lt;/p&gt;
&lt;p&gt;
Generally, one can always produce an instance &lt;em&gt;invoke document&lt;/em&gt; by hand on
the client. &lt;em&gt;By hand&lt;/em&gt; meaning using &lt;font face="Courier New"&gt;System.Xml&lt;/font&gt; classes
and DOM concepts. Since this is higly error prone and gets tedious with increasing
complexity, there is a notion of a schema compiler, which automatically translates
your XML Schema into the CLR type system. &lt;font face="Courier New"&gt;Xsd.exe&lt;/font&gt; and &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; are
your friends. 
&lt;/p&gt;
&lt;p&gt;
If your schema requires parts of the instance document to be digitally signed or encrypted,
you will need to adorn the serializer output with some manual DOM work. This might
also be a reason to use the third option.
&lt;/p&gt;
&lt;p&gt;
The third, and easiest option for the general developer, is to provide a &lt;strong&gt;local
object model&lt;/strong&gt;, which serializes the requests on the client. This is an example:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;ProcessInstruction pi = new ProcessInstruction();&lt;br&gt;
pi.Instruction = "Add";&lt;br&gt;
pi.Parameter1 = 10;&lt;br&gt;
pi.Parameter2 = 21;&lt;br&gt;
pi.Sign(cert); // pi.Encrypt(cert);&lt;br&gt;
pi.Serialize();&lt;br&gt;
proxy.Process(pi.SerializedForm);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The main benefit of this approach comes down to having an option on the server and
the client. Client developers have three different levels of complexity for generating
service calls. The model allows them to be as close to the wire as they see fit. Or
they can be abstracted completely from the wire representation if you provide a local
object model to access your services.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ab874bc2-1546-48d1-a8aa-46f0bf876d93" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.5 - WCF</category>
      <category>Architecture</category>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=bdb761f8-8856-41c8-b4ad-c38338bf6567</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,bdb761f8-8856-41c8-b4ad-c38338bf6567.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,bdb761f8-8856-41c8-b4ad-c38338bf6567.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bdb761f8-8856-41c8-b4ad-c38338bf6567</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://blogs.msdn.com/nickmalik/archive/2007/05/30/system-reliability-requires-message-durability-immature-wcf.aspx">Nick</a> is
continuing <a href="http://www.request-response.com/blog/PermaLink,guid,03fb0e40-b446-42b5-ad90-3be9b0260cb5.aspx">my
discussion</a> on durable messaging support in modern WS-* based stacks, especially
WCF.
</p>
        <p>
I agree that having a simple channel configuration support to direct messages into
permanent information source (like SQL) would be <em>beneficial</em>.
</p>
        <p>
A simple idea that begs for an alternative implementation of a WCF extensibility
point, has some questions:
</p>
        <ul>
          <li>
What happens when messages are (or should be) exchanged in terms of a transaction
context? 
</li>
          <li>
How can we demand transaction support from the underlying datastore, if we don't want
to put limitations onto anything residing beind the service boundary? 
</li>
          <li>
What about security contexts? How can we acknowledge a secure, durable sessionful
channel after two weeks of service <strike>hibernation</strike> down time? Should
security keys still be valid just because service was down and not responding
all this time? 
</li>
          <li>
Is durability limited to client/service recycling or non-memory message storage? What
about both?</li>
        </ul>
        <p>
Is <font face="Courier New">[DurableService]</font>enough?
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bdb761f8-8856-41c8-b4ad-c38338bf6567" />
      </body>
      <title>Durable Messaging Continues</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,bdb761f8-8856-41c8-b4ad-c38338bf6567.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,bdb761f8-8856-41c8-b4ad-c38338bf6567.aspx</link>
      <pubDate>Wed, 30 May 2007 20:46:14 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://blogs.msdn.com/nickmalik/archive/2007/05/30/system-reliability-requires-message-durability-immature-wcf.aspx"&gt;Nick&lt;/a&gt; is
continuing &lt;a href="http://www.request-response.com/blog/PermaLink,guid,03fb0e40-b446-42b5-ad90-3be9b0260cb5.aspx"&gt;my
discussion&lt;/a&gt; on durable messaging support in modern WS-* based stacks, especially
WCF.
&lt;/p&gt;
&lt;p&gt;
I agree that having a simple channel configuration support to direct messages into
permanent information source (like SQL) would be &lt;em&gt;beneficial&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
A simple idea that begs for an alternative implementation of a WCF&amp;nbsp;extensibility
point, has some questions:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
What happens when messages are (or should be) exchanged in terms of a transaction
context? 
&lt;li&gt;
How can we demand transaction support from the underlying datastore, if we don't want
to put limitations onto anything residing beind the service boundary? 
&lt;li&gt;
What about security contexts? How can we acknowledge a secure, durable sessionful
channel after two weeks of service &lt;strike&gt;hibernation&lt;/strike&gt; down time? Should
security keys still be valid just&amp;nbsp;because service was down and not responding
all this time? 
&lt;li&gt;
Is durability limited to client/service recycling or non-memory message storage? What
about both?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Is&amp;nbsp;&lt;font face="Courier New"&gt;[DurableService]&lt;/font&gt;enough?
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bdb761f8-8856-41c8-b4ad-c38338bf6567" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,bdb761f8-8856-41c8-b4ad-c38338bf6567.aspx</comments>
      <category>.NET 3.5 - WCF</category>
      <category>Architecture</category>
      <category>Transactions</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=53aa79e4-b540-49b3-b502-a87b97c5a223</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,53aa79e4-b540-49b3-b502-a87b97c5a223.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,53aa79e4-b540-49b3-b502-a87b97c5a223.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=53aa79e4-b540-49b3-b502-a87b97c5a223</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://weblogs.asp.net/nunitaddin/default.aspx">Jamie Cansdale</a> of
TestDriven.NET fame just posted an intro <a href="http://weblogs.asp.net/nunitaddin/archive/2007/05/10/silverlight-console-applications.aspx">post</a> describing
the hosting of Silverlight's CLR - CoreCLR.
</p>
        <p>
Having the ability to host the runtime inside a Win32/.NET process brings up new possibilities,
especially running Silverlight apps outside the browser or developing test harnesses/unit
tests for Silverlight intended object models.
</p>
        <p>
          <a href="http://msdn.microsoft.com/vstudio/eula.aspx?id=e2c1a44f-0b5c-face-28c8-08a26f2e0b3c">Silverlight
1.1 alpha</a> and CoreCLR currently expose a very trimmed down version of the Framework's
BCL. This will change by RTM, but be aware that its sweet spot is still the browser.
</p>
        <p>
I can imagine a world where Silverlight apps will not only be media/presentation related.
Currently, the <a href="http://www.adobe.com/products/flex/">competing platform</a>,
though having a strong install base, has not reached into that space. 
</p>
        <p>
You could arm Flash developers with rocket launchers, but they would still lose a <strike>battle</strike> war
against .NET developers armed with chopsticks. Every day of the week and twice on
Sunday. I believe the number of souls will significantly influence the outcome in
this case.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=53aa79e4-b540-49b3-b502-a87b97c5a223" />
      </body>
      <title>CoreCLR Exposed</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,53aa79e4-b540-49b3-b502-a87b97c5a223.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,53aa79e4-b540-49b3-b502-a87b97c5a223.aspx</link>
      <pubDate>Sat, 12 May 2007 20:42:30 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://weblogs.asp.net/nunitaddin/default.aspx"&gt;Jamie Cansdale&lt;/a&gt;&amp;nbsp;of
TestDriven.NET fame just posted an intro &lt;a href="http://weblogs.asp.net/nunitaddin/archive/2007/05/10/silverlight-console-applications.aspx"&gt;post&lt;/a&gt;&amp;nbsp;describing
the&amp;nbsp;hosting of Silverlight's CLR - CoreCLR.
&lt;/p&gt;
&lt;p&gt;
Having the ability to host the runtime inside a Win32/.NET process brings up new possibilities,
especially running Silverlight apps outside the browser&amp;nbsp;or developing test harnesses/unit
tests for Silverlight intended object models.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/vstudio/eula.aspx?id=e2c1a44f-0b5c-face-28c8-08a26f2e0b3c"&gt;Silverlight
1.1 alpha&lt;/a&gt; and CoreCLR currently expose a very trimmed down version of the Framework's
BCL. This will change by RTM, but be aware that its sweet spot is still the browser.
&lt;/p&gt;
&lt;p&gt;
I can imagine a world where Silverlight apps will not only be media/presentation related.
Currently, the &lt;a href="http://www.adobe.com/products/flex/"&gt;competing platform&lt;/a&gt;,
though having a strong install base, has not reached into that space. 
&lt;/p&gt;
&lt;p&gt;
You could arm Flash developers with rocket launchers, but they would still lose&amp;nbsp;a&amp;nbsp;&lt;strike&gt;battle&lt;/strike&gt; war
against .NET developers armed with chopsticks. Every day of the week and twice on
Sunday. I believe the number of souls will significantly influence the outcome in
this case.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=53aa79e4-b540-49b3-b502-a87b97c5a223" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,53aa79e4-b540-49b3-b502-a87b97c5a223.aspx</comments>
      <category>Architecture</category>
      <category>CLR</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=f731e5cc-9490-4f1e-bc7d-efb91f357cd1</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f731e5cc-9490-4f1e-bc7d-efb91f357cd1</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
WCF includes support for establishing a security session through a simple configuration
attribute. The primary reason of a security session is a <em>shared security context</em> which
enables clients and services to use a faster, <strong>symmetric</strong> cryptographic
exchange.
</p>
        <p>
WCF sessions should not be thought of in terms of HTTP based sessions, since the former
are initiated by clients and the latter by the servers. In other terms, WCF sessions
are there to support some kind of shared context between a particular client and a
service. This context can be anything, and is not limited to security contexts.
</p>
        <p>
The attribute that establishes a security session and shared context is called, well, <font face="Courier New">establishSecurityContext</font> and
is present in binding configuration. An example of such a binding would be:
</p>
        <p>
          <font face="Courier New">&lt;bindings&gt;<br />
  &lt;wsHttpBinding&gt;<br />
    &lt;binding name="SecureBinding"&gt;<br />
      &lt;security mode ="Message"&gt;<br />
        &lt;message clientCredentialType="Certificate"
establishSecurityContext="true"/&gt;<br />
      &lt;/security&gt;<br />
    &lt;/binding&gt;<br />
  &lt;/wsHttpBinding&gt;<br />
&lt;bindings&gt;</font>
        </p>
        <p>
This binding allows HTTP based communication, demands message based security (think
WS-Security) and uses certificates to sign/encrypt the message content. The attribute <font face="Courier New">establishSecurityContext</font> is
set to <font face="Courier New">true</font>, which actually <em>enforces a WS-SecureConversation
session</em> between the client and the service.
</p>
        <p>
The following is a simplified version of what is going on under the covers:
</p>
        <ul>
          <li>
            <strong>Client instantiates the service proxy<br /></strong>No message exchange is taking place yet. 
</li>
          <li>
            <strong>Client requests a SCT (Secure Context Token)<br /></strong>This is done by the infrastructure, when the first service method is called.
SCT (again simplified) represents a secure context, which includes the symmetric key.
The message which demands it is (per WS-SecureConversation spec) called RST (Request
Secure Token). 
</li>
          <li>
            <strong>Service responds with RSTR (Request Secure Token Response) message<br /></strong>Session bootstraps and is ready to piggyback all further message exchanges.</li>
        </ul>
        <p>
What is not well known is that <em>there is a very low limit on the number of sessions</em> a
service is willing to accept. The default is set to 10 sessions and this was changed
(from 64) late in the WCF development cycle (summer 2006). So RTM ships with this
default.
</p>
        <p>
Service session count is greatly influenced by the instancing scheme the service is
using. Since instancing is a completely different beast, let's leave this for another
post (uhm, I already wrote something <a href="http://www.request-response.com/blog/PermaLink,guid,48b65a92-4015-45f2-8fee-78ae5c0e48b8.aspx">here</a>).
Let's just say that hitting the session problem is a non-issue when using singleton
instancing (<font face="Courier New">InstanceContextMode = InstanceContextMode.Single</font>).
</p>
        <p>
The main issue is, that most developers think of <strike>Indigo</strike> WCF services
in terms of simple request-response semantics and forget that such sessions get queued
up on the service side if you do not terminate them appropriately.
</p>
        <p>
This is the default service throttling behavior in the shipping version of WCF:
</p>
        <p>
          <font face="Courier New">&lt;behaviors&gt;<br />
  &lt;serviceBehaviors&gt;<br />
    &lt;behavior name="DefaultThrottlingBehavior"&gt;<br />
      &lt;serviceThrottling maxConcurrentCalls="16"<br />
                        
maxConcurrentSessions="10"<br />
                        
maxConcurrentInstances="&lt;Int32.MaxValue&gt;" /&gt;<br />
    &lt;/behavior&gt;<br />
  &lt;/serviceBehaviors&gt;<br />
&lt;/behaviors&gt;</font>
        </p>
        <p>
Every service is throttled, even if you don't specify it. You can, of course, <em>override
all three throttling parameters</em>.
</p>
        <p>
Sessions can only be initiated by the client. They can be explicitly terminated only
by the client. There are three ways a session can get terminated:
</p>
        <ul>
          <li>
Explicitly by the client 
</li>
          <li>
Implicitly by a timeout 
</li>
          <li>
Implicitly by errors</li>
        </ul>
        <p>
Timeout can pass on a client or a service and, if the timeout happens, the transport
channel that ensured communication gets faulted (<font face="Courier New">Channel.State
= CommunicationState.Faulted</font>). Session is also terminated if an error is detected,
thus invalidating the possibility to continue.
</p>
        <p>
Remember that every service proxy you use will demand a new session on the service
side (when using 
<br />
sessionful services). If you spawn <strong>11 threads</strong> and use a non-singleton
proxy you will cause <strong>10 sessions</strong> on the service side. The <strong>11<sup>th</sup></strong> will
not get setup and will block the client thread until the timeout expires. In this
case, the WCF infrastructure on the service side will issue a <em>warning in the trace
log</em>, but <strong>nothing will be returned to the client</strong>. It
seems as if the service would stop working. Nada.
</p>
        <p>
There is a method on every service proxy and it's there for a reason. The method is
called <font face="Courier New">Close()</font>. It closes the transport channel graciously
and terminates the security session, thus freeing up service resources. The same happens
for reliable messaging session or a combination of both.
</p>
        <p>
          <strong>Note:</strong> Another message (pair) is exchanged on <font face="Courier New">Close()</font>.
This message is saying <em>"We are done."</em> to the service. Thus, one should be
cautious when calling <font face="Courier New">Close()</font> for any exceptions,
like <font face="Courier New">CommunicationObjectFaultedException</font>.
</p>
        <p>
The best practice is to catch any <font face="Courier New">CommunicationException</font> exceptions
when closing the channel.
</p>
        <p>
To illustrate this, consider the following. You call a single method on a sessionful
service. Then hang on to the service proxy instance for an hour. The inactivity timeout
(attribute <font face="Courier New">inactivityTimeout</font> on a RM binding) is set
to 10 minutes. So, ten minutes after the first call the channel gets faulted. Then
you call <font face="Courier New">Close()</font>. This call <em>will fail</em> and
throw an exception.
</p>
        <p>
The following is the expected way of communication with sessionful services:
</p>
        <p>
          <font face="Courier New">ServiceClient proxy = new ServiceClient("&lt;Configuration&gt;");<br />
try<br />
{<br />
  // call service methods<br />
  int intSum = proxy.Add(1, 2);<br /><br /></font>
          <font face="Courier New">  // ... call all other methods ...<br /><br />
  </font>
          <font face="Courier New">// call service methods<br />
  int intSum = proxy.Subtract(1, 2);<br /><br />
  // close session<br />
  proxy.Close();<br />
}<br />
catch (TimeoutException ex)<br />
{<br />
  // handle timeout exceptions<br />
  proxy.Abort();<br />
}<br />
catch (FaultException&lt;T1&gt; ex)<br />
{<br />
  // handle typed exception T1<br />
  proxy.Close();<br />
}<br />
...<br />
catch (FaultException&lt;Tn&gt; ex)<br />
{<br />
  // handle typed exception Tn<br />
  proxy.Close();<br />
}<br />
catch (FaultException ex)<br />
{<br />
  // handle all other typed exceptions<br />
  proxy.Close();<br />
}<br />
catch (CommunicationException ex)<br />
{<br />
  // handle communication exceptions<br />
  proxy.Abort();<br />
}</font>
        </p>
        <p>
Note that using the <font face="Courier New">using</font> statement is not recommended.
The problem of <font face="Courier New">using</font> statement in this case is that
CLR automatically calls <font face="Courier New">Dispose()</font> method on the using
variable when exiting the statement. Since <font face="Courier New">Close()</font> can
fail (remember, another message is exchanged), you can miss this important exception.
</p>
        <p>
Everything in this post is true for all kinds of WCF sessions. It is <em>not limited
to security or RM sessions</em> only.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f731e5cc-9490-4f1e-bc7d-efb91f357cd1" />
      </body>
      <title>WCF: Security Sessions and Service Throttling</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx</link>
      <pubDate>Tue, 27 Feb 2007 16:04:52 GMT</pubDate>
      <description>&lt;p&gt;
WCF includes support for establishing a security session through a simple configuration
attribute. The primary reason of a security session is a &lt;em&gt;shared security context&lt;/em&gt; which
enables clients and services to use a faster, &lt;strong&gt;symmetric&lt;/strong&gt; cryptographic
exchange.
&lt;/p&gt;
&lt;p&gt;
WCF sessions should not be thought of in terms of HTTP based sessions, since the former
are initiated by clients and the latter by the servers. In other terms, WCF sessions
are there to support some kind of shared context between a particular client and a
service. This context can be anything, and is not limited to security contexts.
&lt;/p&gt;
&lt;p&gt;
The attribute that establishes a security session and shared context is called, well, &lt;font face="Courier New"&gt;establishSecurityContext&lt;/font&gt; and
is present in binding configuration. An example of such a binding would be:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;bindings&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;wsHttpBinding&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;binding name="SecureBinding"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;security mode ="Message"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;message clientCredentialType="Certificate"
establishSecurityContext="true"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/security&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/binding&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/wsHttpBinding&amp;gt;&lt;br&gt;
&amp;lt;bindings&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This binding allows HTTP based communication, demands message based security (think
WS-Security) and uses certificates to sign/encrypt the message content. The attribute &lt;font face="Courier New"&gt;establishSecurityContext&lt;/font&gt; is
set to &lt;font face="Courier New"&gt;true&lt;/font&gt;, which actually &lt;em&gt;enforces a WS-SecureConversation
session&lt;/em&gt; between the client and the service.
&lt;/p&gt;
&lt;p&gt;
The following is a simplified version of what is going on under the covers:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client instantiates the service proxy&lt;br&gt;
&lt;/strong&gt;No message exchange is taking place yet. 
&lt;li&gt;
&lt;strong&gt;Client requests a SCT (Secure Context Token)&lt;br&gt;
&lt;/strong&gt;This is done by the infrastructure, when the first service method is called.
SCT (again simplified) represents a secure context, which includes the symmetric key.
The message which demands it is (per WS-SecureConversation spec) called RST (Request
Secure Token). 
&lt;li&gt;
&lt;strong&gt;Service responds with RSTR (Request Secure Token Response) message&lt;br&gt;
&lt;/strong&gt;Session bootstraps and is ready to piggyback all further message exchanges.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
What is not well known is that &lt;em&gt;there is a very low limit on the number of sessions&lt;/em&gt; a
service is willing to accept. The default is set to 10 sessions and this was changed
(from 64) late in the WCF development cycle (summer 2006). So RTM ships with this
default.
&lt;/p&gt;
&lt;p&gt;
Service session count is greatly influenced by the instancing scheme the service is
using. Since instancing is a completely different beast, let's leave this for another
post (uhm, I already wrote something &lt;a href="http://www.request-response.com/blog/PermaLink,guid,48b65a92-4015-45f2-8fee-78ae5c0e48b8.aspx"&gt;here&lt;/a&gt;).
Let's just say that hitting the session problem is a non-issue when using singleton
instancing (&lt;font face="Courier New"&gt;InstanceContextMode = InstanceContextMode.Single&lt;/font&gt;).
&lt;/p&gt;
&lt;p&gt;
The main issue is, that most developers think of &lt;strike&gt;Indigo&lt;/strike&gt; WCF services
in terms of simple request-response semantics and forget that such sessions get queued
up on the service side if you do not terminate them appropriately.
&lt;/p&gt;
&lt;p&gt;
This is the default service throttling behavior in the shipping version of WCF:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;behaviors&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;serviceBehaviors&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;behavior name="DefaultThrottlingBehavior"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceThrottling maxConcurrentCalls="16"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
maxConcurrentSessions="10"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
maxConcurrentInstances="&amp;lt;Int32.MaxValue&amp;gt;" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/behavior&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/serviceBehaviors&amp;gt;&lt;br&gt;
&amp;lt;/behaviors&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Every service is throttled, even if you don't specify it. You can, of course, &lt;em&gt;override
all three throttling parameters&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
Sessions can only be initiated by the client. They can be explicitly terminated only
by the client. There are&amp;nbsp;three ways a session can get terminated:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Explicitly by the client 
&lt;li&gt;
Implicitly by a timeout 
&lt;li&gt;
Implicitly by errors&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Timeout can pass on a client or a service and, if the timeout happens,&amp;nbsp;the transport
channel that ensured communication gets faulted (&lt;font face="Courier New"&gt;Channel.State
= CommunicationState.Faulted&lt;/font&gt;). Session is also terminated if an error is detected,
thus invalidating the possibility to continue.
&lt;/p&gt;
&lt;p&gt;
Remember that every service proxy you use will demand a new session on the service
side (when using 
&lt;br&gt;
sessionful services). If you spawn &lt;strong&gt;11 threads&lt;/strong&gt; and use a non-singleton
proxy you will cause &lt;strong&gt;10 sessions&lt;/strong&gt; on the service side. The &lt;strong&gt;11&lt;sup&gt;th&lt;/sup&gt;&lt;/strong&gt; will
not get setup and will block the client thread until the timeout expires. In this
case, the WCF infrastructure on the service side will issue a &lt;em&gt;warning in the trace
log&lt;/em&gt;, but &lt;strong&gt;nothing&amp;nbsp;will be&amp;nbsp;returned to the client&lt;/strong&gt;. It
seems as if the service would stop working. Nada.
&lt;/p&gt;
&lt;p&gt;
There is a method on every service proxy and it's there for a reason. The method is
called &lt;font face="Courier New"&gt;Close()&lt;/font&gt;. It closes the transport channel graciously
and terminates the security session, thus freeing up service resources. The same happens
for reliable messaging session or a combination of both.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note:&lt;/strong&gt; Another message (pair) is exchanged on &lt;font face="Courier New"&gt;Close()&lt;/font&gt;.
This message is saying &lt;em&gt;"We are done."&lt;/em&gt; to the service. Thus, one should be
cautious when calling &lt;font face="Courier New"&gt;Close()&lt;/font&gt; for any exceptions,
like &lt;font face="Courier New"&gt;CommunicationObjectFaultedException&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
The best practice is to catch any &lt;font face="Courier New"&gt;CommunicationException&lt;/font&gt; exceptions
when closing the channel.
&lt;/p&gt;
&lt;p&gt;
To illustrate this, consider the following. You call a single method on a sessionful
service. Then hang on to the service proxy instance for an hour. The inactivity timeout
(attribute &lt;font face="Courier New"&gt;inactivityTimeout&lt;/font&gt; on a RM binding) is set
to 10 minutes. So, ten minutes after the first call the channel gets faulted. Then
you call &lt;font face="Courier New"&gt;Close()&lt;/font&gt;. This call &lt;em&gt;will fail&lt;/em&gt; and
throw an exception.
&lt;/p&gt;
&lt;p&gt;
The following is the expected way of communication with sessionful services:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;ServiceClient proxy = new ServiceClient("&amp;lt;Configuration&amp;gt;");&lt;br&gt;
try&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // call service methods&lt;br&gt;
&amp;nbsp; int intSum = proxy.Add(1, 2);&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp; // ... call all other methods ...&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font face="Courier New"&gt;// call service methods&lt;br&gt;
&amp;nbsp; int intSum = proxy.Subtract(1, 2);&lt;br&gt;
&lt;br&gt;
&amp;nbsp; // close session&lt;br&gt;
&amp;nbsp; proxy.Close();&lt;br&gt;
}&lt;br&gt;
catch (TimeoutException ex)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // handle timeout exceptions&lt;br&gt;
&amp;nbsp; proxy.Abort();&lt;br&gt;
}&lt;br&gt;
catch (FaultException&amp;lt;T1&amp;gt; ex)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // handle typed exception T1&lt;br&gt;
&amp;nbsp; proxy.Close();&lt;br&gt;
}&lt;br&gt;
...&lt;br&gt;
catch (FaultException&amp;lt;Tn&amp;gt; ex)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // handle typed exception Tn&lt;br&gt;
&amp;nbsp; proxy.Close();&lt;br&gt;
}&lt;br&gt;
catch (FaultException ex)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // handle all other typed exceptions&lt;br&gt;
&amp;nbsp; proxy.Close();&lt;br&gt;
}&lt;br&gt;
catch (CommunicationException ex)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // handle communication exceptions&lt;br&gt;
&amp;nbsp; proxy.Abort();&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Note that using the &lt;font face="Courier New"&gt;using&lt;/font&gt; statement is not recommended.
The problem of &lt;font face="Courier New"&gt;using&lt;/font&gt; statement in this case is that
CLR automatically calls &lt;font face="Courier New"&gt;Dispose()&lt;/font&gt; method on the using
variable when exiting the statement. Since &lt;font face="Courier New"&gt;Close()&lt;/font&gt; can
fail (remember, another message is exchanged), you can miss this important exception.
&lt;/p&gt;
&lt;p&gt;
Everything in this post is true for all kinds of WCF sessions. It is &lt;em&gt;not limited
to security or RM sessions&lt;/em&gt; only.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f731e5cc-9490-4f1e-bc7d-efb91f357cd1" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=aa617aa7-1073-422c-86f5-deaaa0758e7d</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=aa617aa7-1073-422c-86f5-deaaa0758e7d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the <a href="http://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx">previous
post</a> we discussed possible scenarios and methods for configuring reliable
message delivery in WCF. Let's look further into this great WCF feature.
</p>
        <p>
Delivery assurances can have a large impact on the way your code processes incoming
messages. Especially, <em>ordering</em> can be of importance if your code relies on
ordered message delivery. Since configuration can be changed by any WCF service administrator <strong>there
is a knob in WCF which lets you demand the appropriate binding</strong>. The knob
is in a form of a declarative attribute, called <font face="Courier New">DeliveryRequirementsAttribute</font>.
</p>
        <p>
Here's how it's used:
</p>
        <p>
          <font face="Courier New">[DeliveryRequirements(RequireOrderedDelivery = true,<br /></font>
          <font face="Courier New">   QueuedDeliveryRequirements =<br />
      QueuedDeliveryRequirementsMode.Required)]<br />
interface IServiceContract<br />
{<br />
   int Operation(int a, int b);<br />
}</font>
        </p>
        <p>
          <font face="Courier New">DeliveryRequirementsAttribute </font>can be set on any service
interface or service class implementation. It has three properties:
</p>
        <ol>
          <li>
            <font face="Courier New">QueuedDeliveryRequirements</font> which has three possible
values, <font face="Courier New">Allowed</font>, <font face="Courier New">NotAllowed</font> and <font face="Courier New">Required</font>.
Setting <font face="Courier New">NotAllowed</font> or <font face="Courier New">Required</font> makes
the <strong>binding either demand or prevent</strong> WS-RM usage. Setting <font face="Courier New">Allowed</font> does
not make any requirements. 
</li>
          <li>
            <font face="Courier New">RequireOrderedDelivery</font> demands a binding that <strong>supports
and has ordered delivery turned on</strong>. 
</li>
          <li>
            <font face="Courier New">TargetContract</font> property is applicable only when the
attibute is applied to a class definition. Since WCF service interfaces can be implemented
by multiple classes, one can specify a specific interface for which the queued delivery
requirements are defined.</li>
        </ol>
        <p>
The specified contract interface would demand a WS-RM capable binding and thus prevent
service administrators to turn reliable delivery off. 
</p>
        <p>
In case where an administrator would turn reliable delivery (or ordering, in
this case) off, the service host would throw an exception while trying to
host the service.
</p>
        <p>
So, <font face="Courier New">DeliveryRequirementsAttribute</font> guards developers
from wrongdoings of service administrators. It should set <font face="Courier New">QueuedDeliveryRequirements
= QueuedDeliveryRequirementsMode.Required</font> or <font face="Courier New">RequireOrderedDelivery
= true</font>, when there are objective reasons to demand guaranteed and/or ordered
delivery of messages.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=aa617aa7-1073-422c-86f5-deaaa0758e7d" />
      </body>
      <title>WCF: Reliable Message Delivery Continued</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx</link>
      <pubDate>Mon, 19 Feb 2007 11:50:01 GMT</pubDate>
      <description>&lt;p&gt;
In the &lt;a href="http://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx"&gt;previous
post&lt;/a&gt; we discussed possible scenarios and methods for&amp;nbsp;configuring reliable
message delivery in WCF. Let's look further into this great WCF feature.
&lt;/p&gt;
&lt;p&gt;
Delivery assurances can have a large impact on the way your code processes incoming
messages. Especially, &lt;em&gt;ordering&lt;/em&gt; can be of importance if your code relies on
ordered message delivery. Since configuration can be changed by any WCF service administrator &lt;strong&gt;there
is a knob in WCF which lets you demand the appropriate binding&lt;/strong&gt;. The knob
is in a form of a declarative attribute, called &lt;font face="Courier New"&gt;DeliveryRequirementsAttribute&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
Here's how it's used:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[DeliveryRequirements(RequireOrderedDelivery = true,&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;QueuedDeliveryRequirements =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;QueuedDeliveryRequirementsMode.Required)]&lt;br&gt;
interface IServiceContract&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;int Operation(int a, int b);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;DeliveryRequirementsAttribute &lt;/font&gt;can be set on any service
interface or service class implementation. It has three properties:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;QueuedDeliveryRequirements&lt;/font&gt; which has three possible
values, &lt;font face="Courier New"&gt;Allowed&lt;/font&gt;, &lt;font face="Courier New"&gt;NotAllowed&lt;/font&gt; and &lt;font face="Courier New"&gt;Required&lt;/font&gt;.
Setting &lt;font face="Courier New"&gt;NotAllowed&lt;/font&gt; or &lt;font face="Courier New"&gt;Required&lt;/font&gt; makes
the &lt;strong&gt;binding either demand or prevent&lt;/strong&gt; WS-RM usage. Setting &lt;font face="Courier New"&gt;Allowed&lt;/font&gt; does
not make any requirements. 
&lt;li&gt;
&lt;font face="Courier New"&gt;RequireOrderedDelivery&lt;/font&gt; demands a binding that &lt;strong&gt;supports
and has ordered delivery turned on&lt;/strong&gt;. 
&lt;li&gt;
&lt;font face="Courier New"&gt;TargetContract&lt;/font&gt; property is applicable only when the
attibute is applied to a class definition. Since WCF service interfaces can be implemented
by multiple classes, one can specify a specific interface for which the queued delivery
requirements are defined.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The specified contract interface would demand a WS-RM capable binding and thus prevent
service administrators to turn reliable delivery off. 
&lt;/p&gt;
&lt;p&gt;
In case where an administrator would turn reliable delivery&amp;nbsp;(or ordering, in
this case)&amp;nbsp;off,&amp;nbsp;the service host would throw an exception while trying to
host the service.
&lt;/p&gt;
&lt;p&gt;
So, &lt;font face="Courier New"&gt;DeliveryRequirementsAttribute&lt;/font&gt; guards developers
from wrongdoings of service administrators. It should set&amp;nbsp;&lt;font face="Courier New"&gt;QueuedDeliveryRequirements
= QueuedDeliveryRequirementsMode.Required&lt;/font&gt; or &lt;font face="Courier New"&gt;RequireOrderedDelivery
= true&lt;/font&gt;, when there are objective reasons to demand guaranteed and/or ordered
delivery of messages.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=aa617aa7-1073-422c-86f5-deaaa0758e7d" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://wcf.netfx3.com/">Windows Communication Foundation</a> includes concepts
which enable the developer to insist on reliably delivering messages in both directions.
The mechanism is actually transport agnostic and allows messages to be flown reliably
from client to service and replies from service to client.
</p>
        <p>
Underneath, <a href="http://www-128.ibm.com/developerworks/webservices/library/specification/ws-rm/">WS-ReliableMessaging</a> (WS-RM)
implementation is used. Click <a href="http://msdn2.microsoft.com/en-us/library/ms951271.aspx">here</a> for
Microsoft's specification. Content is the same.
</p>
        <p>
WS-RM is based on a concept of a <em>message sequence</em>. You can think of it in
terms of a session, although it does not carry HTTP session semantics (remember, it's
transport agnostic). A <em>communication initiator</em> (RM source) sends a <font face="Courier New">&lt;CreateSequence&gt;</font> element
inside the message body to establish a RM sequence. Service side (RM destination)
responds with either <font face="Courier New">&lt;CreateSequenceReponse&gt;</font> or <font face="Courier New">&lt;CreateSequenceRefused&gt;</font>,
in cases where new sequence is not welcome.
</p>
        <p>
After the sequence is initialized, there is an additional SOAP Header in messages.
It identifies the message number being transferred. The following is a simple example
of headers of the first two messages:
</p>
        <p>
          <font face="Courier New">&lt;S:Envelope&gt;<br />
   &lt;S:Header&gt;<br />
      ...<br />
      &lt;wsrm:Sequence&gt;<br />
         &lt;wsrm:Identifier&gt;http://webservices.gama-system.com/RM/Service&lt;/wsrm:Identifier&gt;<br />
         &lt;wsrm:MessageNumber&gt;1&lt;/wsrm:MessageNumber&gt;<br />
      &lt;/wsrm:Sequence&gt;<br />
   &lt;/S:Header&gt;<br />
   ...<br />
   &lt;S:Body&gt;<br />
      ...<br />
   &lt;/S:Body&gt;<br />
&lt;/S:Envelope&gt;</font>
        </p>
        <p>
          <font face="Courier New">&lt;S:Envelope&gt;<br />
   &lt;S:Header&gt;<br />
      ...<br />
      &lt;wsrm:Sequence&gt;<br />
         &lt;wsrm:Identifier&gt;http://webservices.gama-system.com/RM/Service&lt;/wsrm:Identifier&gt;<br />
         &lt;wsrm:MessageNumber&gt;2&lt;/wsrm:MessageNumber&gt;<br />
      &lt;/wsrm:Sequence&gt;<br />
   &lt;/S:Header&gt;<br />
   ...<br />
   &lt;S:Body&gt;<br />
      ...<br />
   &lt;/S:Body&gt;<br />
&lt;/S:Envelope&gt;</font>
        </p>
        <p>
After all messages have been exchanged and acknowledged, the RM destination sends
a <font face="Courier New">&lt;SequenceAcknowledgement&gt;</font> inside the body
of the message. RM source (communication initiator) then tears down the sequence with
a <font face="Courier New">&lt;TerminateSequence&gt;</font> message.
</p>
        <p>
So, how can this specification be implemented in various technology stacks? Well,
WCF implements reliable messaging using the in-memory message buffers. There is no
durable reliable messaging support in WCF.
</p>
        <p>
Here's how it works:
</p>
        <ul>
          <li>
Communication initiator (client) sends a <font face="Courier New">&lt;CreateSequence&gt;</font> message. 
</li>
          <li>
Service side responds with a <font face="Courier New">&lt;CreateSequenceResponse&gt;</font>. 
</li>
          <li>
Client sends 1..n messages and buffers them, while waiting for all acknowledgements. 
</li>
          <li>
Service side can and will dispatch the received messages as soon as possible. Now,
there are two options: 
<ul><li><strong>Communication is configured for ordered delivery<br /></strong>First message will be dispatched to the service model as soon as it arrives,
noting that it has been processed. Every other message is processed in order. If message
number 5 has been processed and the next received message carries sequence number
7, it will not be dispatched until message 6 is received and processed by the service
model. 
</li><li><strong>Communication allows out-of-order delivery<br /></strong>First message will be dispatched to the service model as soon as it arrives,
so will all the following messages. Since we did not demand ordered delivery the processing
pipeline does not care on when to process the messages. It will process them as soon
as they are received. They are acknowledged as soon as possible, but not before acknowledgement
interval.</li></ul></li>
          <li>
Service side sends a <font face="Courier New">&lt;SequenceAcknowledgement&gt;</font> message
only when all messages have been acknowledged. 
</li>
          <li>
Initiator then stops the sequence with a <font face="Courier New">&lt;TerminateSequence&gt;</font> message.</li>
        </ul>
        <p>
So, how do we go about enabling WS-RM and realizable delivery in WCF? Simple. Here's
the config file:
</p>
        <p>
          <font face="Courier New">&lt;wsHttpBinding&gt;<br />
   &lt;binding configurationName="myReliableBinding"&gt;<br />
      &lt;reliableSession enabled="true" ordered="true"
/&gt;<br />
   &lt;/binding&gt;<br />
&lt;/wsHttpBinding&gt;</font>
        </p>
        <p>
The <font face="Courier New">&lt;reliableSession&gt;</font> element has two attributes.
The first one, <font face="Courier New">enabled</font>, enables reliable message delivery.
The second one, <font face="Courier New">ordered</font>, enables in-order processing
by the service model.
</p>
        <p>
One has to acknowledge that the following is true for different WCF bindings:
</p>
        <p>
          <font face="Courier New">basicHttpBinding</font> - RM not supported<br /><font face="Courier New">wsHttpBinding</font> - RM supported, not default<br /><font face="Courier New">wsDualHttpBinding</font> - RM implicit<br /><font face="Courier New">netTcpBinding</font> - RM supported, not default
</p>
        <p>
There are a couple of options available for anyone using the custom binding, in regard
to reliable messaging behavior:
</p>
        <ol>
          <li>
            <font face="Courier New">acknowledgementInterval</font> specifies the <em>time lapse
duration </em>of message acknowledgement. The default is two seconds, while <strong>always
acknowledging the first message</strong>. This gives you an efficient way to <strong>group
the acknowledgement messages</strong>, thus conserving network traffic. 
</li>
          <li>
            <font face="Courier New">flowControlEnabled </font>enables message sender to acknowledge
the receive buffer on the recipient side. It turns out that every acknowledgement
message includes a <em>service buffer status </em>and if this attribute is set, sender
will not send messages if the recipient buffer is full, thus not occupying network
resources. 
</li>
          <li>
            <font face="Courier New">inactivityTimeout </font>defines the absolute duration of
a no-message (infrastructure and application messages) session. After the timeout,
the session is torn down. 
</li>
          <li>
            <font face="Courier New">maxPendingChannels </font>defines how many reliable channels
the service can put in its waiting-to-open queue. If there's a significant load, <strong>the
pending requests can queue up </strong>and the service refuses to open a reliable
session (think <font face="Courier New">&lt;CreateSequenceRefused&gt;</font>). 
</li>
          <li>
            <font face="Courier New">maxRetryCount</font> defaults to 8. It defines how many times
the infrastructure <strong>retries with message delivery</strong>. If the limit is
achieved, the channel will become faulted. 
</li>
          <li>
            <font face="Courier New">maxTransferWindowSize</font> defines how many messages should
be buffered. On service side all messages that have not been acknowledged <strong>increase
the count</strong>. On the client side, all messages which have not received their
acknowledgement pair <strong>are counted</strong>. 
</li>
          <li>
            <font face="Courier New">ordered</font> defines <strong>in-order delivery</strong>.
It's values are true and false.</li>
        </ol>
        <p>
There is some confusion in the <font face="Courier New">wsHttpBinding's &lt;reliableSession&gt;</font> config element.
There's an <font face="Courier New">enabled</font> property in the Visual Studio config
schema, which should not have any influence on reliable session establishment (and
does not have a matching object model method/property). It does, however. There is
a difference if you setup a reliable session by using a <font face="Courier New">customBinding</font> or <font face="Courier New">wsHttpBinding</font>.
</p>
        <p>
I.e., here's the custom binding config:
</p>
        <p>
          <font face="Courier New">&lt;customHttpBinding&gt;<br />
   &lt;binding configurationName="customReliableBinding"&gt;<br />
      &lt;reliableSession ordered="true" /&gt;<br />
   &lt;/binding&gt;<br />
&lt;/customBinding&gt;</font>
        </p>
        <p>
This will enable reliable and ordered session support in any custom binding.
</p>
        <p>
So, in general - WCF implementation of WS-ReliableMessaging gives you automatic message
retries, duplicate detection, and ordering. It should be turned on for any multi-hop
message paths, but can be very valuable even in high latency/packet loss network scenarios.
</p>
        <p>
          <strong>
            <em>Update 2007-02-19</em>
          </strong>
        </p>
        <p>
          <a href="http://www.softwaremaker.net/blog/">William Tay</a>, a friend and distributed
systems expert, replies with a terrific message exchange pattern for groking WS-RM
specification. Don't walk, <a href="http://www.softwaremaker.net/blog/WSReliableMessagingSimplifiedWHATAndHOW.aspx">run</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6" />
      </body>
      <title>WCF: Reliable Message Delivery</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx</link>
      <pubDate>Sun, 18 Feb 2007 20:24:28 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://wcf.netfx3.com/"&gt;Windows Communication Foundation&lt;/a&gt; includes concepts
which enable the developer to insist on reliably delivering messages in both directions.
The mechanism is actually transport agnostic and allows messages to be flown reliably
from client to service and replies from service to client.
&lt;/p&gt;
&lt;p&gt;
Underneath, &lt;a href="http://www-128.ibm.com/developerworks/webservices/library/specification/ws-rm/"&gt;WS-ReliableMessaging&lt;/a&gt; (WS-RM)
implementation is used. Click &lt;a href="http://msdn2.microsoft.com/en-us/library/ms951271.aspx"&gt;here&lt;/a&gt; for
Microsoft's specification. Content is the same.
&lt;/p&gt;
&lt;p&gt;
WS-RM is based on a concept of a &lt;em&gt;message sequence&lt;/em&gt;. You can think of it in
terms of a session, although it does not carry HTTP session semantics (remember, it's
transport agnostic). A &lt;em&gt;communication initiator&lt;/em&gt; (RM source) sends a &lt;font face="Courier New"&gt;&amp;lt;CreateSequence&amp;gt;&lt;/font&gt; element
inside the message body to establish a RM sequence. Service side (RM destination)
responds with either &lt;font face="Courier New"&gt;&amp;lt;CreateSequenceReponse&amp;gt;&lt;/font&gt; or &lt;font face="Courier New"&gt;&amp;lt;CreateSequenceRefused&amp;gt;&lt;/font&gt;,
in cases where new sequence is not welcome.
&lt;/p&gt;
&lt;p&gt;
After the sequence is initialized, there is an additional SOAP Header in messages.
It identifies the message number being transferred. The following is a simple example
of headers of the first two messages:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;S:Envelope&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;S:Header&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:Sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:Identifier&amp;gt;http://webservices.gama-system.com/RM/Service&amp;lt;/wsrm:Identifier&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:MessageNumber&amp;gt;1&amp;lt;/wsrm:MessageNumber&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/wsrm:Sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/S:Header&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;S:Body&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/S:Body&amp;gt;&lt;br&gt;
&amp;lt;/S:Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;S:Envelope&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;S:Header&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:Sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:Identifier&amp;gt;http://webservices.gama-system.com/RM/Service&amp;lt;/wsrm:Identifier&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;wsrm:MessageNumber&amp;gt;2&amp;lt;/wsrm:MessageNumber&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/wsrm:Sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/S:Header&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;S:Body&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/S:Body&amp;gt;&lt;br&gt;
&amp;lt;/S:Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
After all messages have been exchanged and acknowledged, the RM destination sends
a &lt;font face="Courier New"&gt;&amp;lt;SequenceAcknowledgement&amp;gt;&lt;/font&gt; inside the body
of the message. RM source (communication initiator) then tears down the sequence with
a &lt;font face="Courier New"&gt;&amp;lt;TerminateSequence&amp;gt;&lt;/font&gt; message.
&lt;/p&gt;
&lt;p&gt;
So, how can this specification be implemented in various technology stacks? Well,
WCF implements reliable messaging using the in-memory message buffers. There is no
durable reliable&amp;nbsp;messaging&amp;nbsp;support in WCF.
&lt;/p&gt;
&lt;p&gt;
Here's how it works:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Communication initiator (client) sends a &lt;font face="Courier New"&gt;&amp;lt;CreateSequence&amp;gt;&lt;/font&gt; message. 
&lt;li&gt;
Service side responds with a &lt;font face="Courier New"&gt;&amp;lt;CreateSequenceResponse&amp;gt;&lt;/font&gt;. 
&lt;li&gt;
Client sends 1..n messages and buffers them, while waiting for all acknowledgements. 
&lt;li&gt;
Service side can and will dispatch the received messages as soon as possible. Now,
there are two options: 
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Communication is configured for ordered delivery&lt;br&gt;
&lt;/strong&gt;First message will be dispatched to the service model as soon as it arrives,
noting that it has been processed. Every other message is processed in order. If message
number 5 has been processed and the next received message carries sequence number
7, it will not be dispatched until message 6 is received and processed by the service
model. 
&lt;li&gt;
&lt;strong&gt;Communication allows out-of-order delivery&lt;br&gt;
&lt;/strong&gt;First message will be dispatched to the service model as soon as it arrives,
so will all the following messages. Since we did not demand ordered delivery the processing
pipeline does not care on when to process the messages. It will process them as soon
as they are received. They are acknowledged as soon as possible, but not before acknowledgement
interval.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Service side sends a &lt;font face="Courier New"&gt;&amp;lt;SequenceAcknowledgement&amp;gt;&lt;/font&gt; message
only when all messages have been acknowledged. 
&lt;li&gt;
Initiator then stops the sequence with a &lt;font face="Courier New"&gt;&amp;lt;TerminateSequence&amp;gt;&lt;/font&gt; message.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So, how do we go about enabling WS-RM and realizable delivery in WCF? Simple. Here's
the config file:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;wsHttpBinding&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;binding configurationName="myReliableBinding"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;reliableSession enabled="true" ordered="true"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/binding&amp;gt;&lt;br&gt;
&amp;lt;/wsHttpBinding&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The &lt;font face="Courier New"&gt;&amp;lt;reliableSession&amp;gt;&lt;/font&gt; element has two attributes.
The first one, &lt;font face="Courier New"&gt;enabled&lt;/font&gt;, enables reliable message delivery.
The second one, &lt;font face="Courier New"&gt;ordered&lt;/font&gt;, enables in-order processing
by the service model.
&lt;/p&gt;
&lt;p&gt;
One has to acknowledge that the following is true for different WCF bindings:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;basicHttpBinding&lt;/font&gt; - RM not supported&lt;br&gt;
&lt;font face="Courier New"&gt;wsHttpBinding&lt;/font&gt; - RM supported, not default&lt;br&gt;
&lt;font face="Courier New"&gt;wsDualHttpBinding&lt;/font&gt; - RM implicit&lt;br&gt;
&lt;font face="Courier New"&gt;netTcpBinding&lt;/font&gt; - RM supported, not default
&lt;/p&gt;
&lt;p&gt;
There are a couple of options available for anyone using the custom binding, in regard
to reliable messaging behavior:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;acknowledgementInterval&lt;/font&gt; specifies the &lt;em&gt;time lapse
duration &lt;/em&gt;of message acknowledgement. The default is two seconds, while &lt;strong&gt;always
acknowledging the first message&lt;/strong&gt;. This gives you an efficient way to &lt;strong&gt;group
the acknowledgement messages&lt;/strong&gt;, thus conserving network traffic. 
&lt;li&gt;
&lt;font face="Courier New"&gt;flowControlEnabled &lt;/font&gt;enables message sender to acknowledge
the receive buffer on the recipient side. It turns out that every acknowledgement
message includes a &lt;em&gt;service buffer status &lt;/em&gt;and if this attribute is set, sender
will not send messages if the recipient buffer is full, thus not occupying network
resources. 
&lt;li&gt;
&lt;font face="Courier New"&gt;inactivityTimeout &lt;/font&gt;defines the absolute duration of
a no-message (infrastructure and application messages) session. After the timeout,
the session is torn down. 
&lt;li&gt;
&lt;font face="Courier New"&gt;maxPendingChannels &lt;/font&gt;defines how many reliable channels
the service can put in its waiting-to-open queue. If there's a significant load, &lt;strong&gt;the
pending requests can queue up &lt;/strong&gt;and the service refuses to open a reliable
session (think &lt;font face="Courier New"&gt;&amp;lt;CreateSequenceRefused&amp;gt;&lt;/font&gt;). 
&lt;li&gt;
&lt;font face="Courier New"&gt;maxRetryCount&lt;/font&gt; defaults to 8. It defines how many times
the infrastructure &lt;strong&gt;retries with message delivery&lt;/strong&gt;. If the limit is
achieved, the channel will become faulted. 
&lt;li&gt;
&lt;font face="Courier New"&gt;maxTransferWindowSize&lt;/font&gt; defines how many messages should
be buffered. On service side all messages that have not been acknowledged &lt;strong&gt;increase
the count&lt;/strong&gt;. On the client side, all messages which have not received their
acknowledgement pair &lt;strong&gt;are counted&lt;/strong&gt;. 
&lt;li&gt;
&lt;font face="Courier New"&gt;ordered&lt;/font&gt; defines &lt;strong&gt;in-order delivery&lt;/strong&gt;.
It's values are true and false.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
There is some confusion in the &lt;font face="Courier New"&gt;wsHttpBinding's &amp;lt;reliableSession&amp;gt;&lt;/font&gt; config&amp;nbsp;element.
There's an &lt;font face="Courier New"&gt;enabled&lt;/font&gt; property in the Visual Studio config
schema, which should not have any influence on reliable session establishment (and
does not have a matching object model method/property). It does, however. There is
a difference if you setup a reliable session by using a &lt;font face="Courier New"&gt;customBinding&lt;/font&gt; or &lt;font face="Courier New"&gt;wsHttpBinding&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
I.e., here's the custom binding config:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;customHttpBinding&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;binding configurationName="customReliableBinding"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;reliableSession ordered="true" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/binding&amp;gt;&lt;br&gt;
&amp;lt;/customBinding&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This will enable reliable and ordered session support in any custom binding.
&lt;/p&gt;
&lt;p&gt;
So, in general - WCF implementation of WS-ReliableMessaging gives you automatic message
retries, duplicate detection, and ordering. It should be turned on for any multi-hop
message paths, but can be very valuable even in high latency/packet loss network scenarios.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Update 2007-02-19&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.softwaremaker.net/blog/"&gt;William Tay&lt;/a&gt;, a friend and distributed
systems expert, replies with a terrific message exchange pattern for groking WS-RM
specification. Don't walk, &lt;a href="http://www.softwaremaker.net/blog/WSReliableMessagingSimplifiedWHATAndHOW.aspx"&gt;run&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=970f2ea8-2c17-4ece-b80e-e131afdd9f5f</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,970f2ea8-2c17-4ece-b80e-e131afdd9f5f.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,970f2ea8-2c17-4ece-b80e-e131afdd9f5f.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=970f2ea8-2c17-4ece-b80e-e131afdd9f5f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Third incarnation of the .NET 3.0 Middleware Technologies day went through yesterday.
</p>
        <p>
Here are the deliverables:
</p>
        <ul>
          <li>
PPT: <a href="http://www.request-response.com/blog/content/binary/WCF_WF_Feb2007_3.zip">Download</a> [1] 
</li>
          <li>
WCF Samples: <a href="http://www.request-response.com/blog/content/binary/WCFDemosFeb2007_3.zip">Download</a></li>
          <li>
WF Samples: <a href="http://www.request-response.com/blog/content/binary/WFDemosFeb2007_3.zip">Download</a></li>
        </ul>
        <p>
If you did not get/notice the printed articles, here's what should put you to sleep
over the weekend:
</p>
        <ul>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx">Concepts
and Semantics of Service Contracts</a> [1] 
</li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx">Transactional
Semantics in Loosely Coupled Distributed Systems</a> [1] 
</li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,86bd92f2-13fd-4454-ab88-272a4a8be875.aspx">Cooperation Between
Workflows and Services</a> [1] 
</li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx">Type
Systems Compared - XML &lt;&gt; CLR</a> [1]</li>
        </ul>
        <p>
Also, the accompanying book is available <a href="http://www.request-response.com/blog/PermaLink,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx">here</a>.
</p>
        <p>
          <font color="#808080" size="1">[1] Only available in Slovene.</font>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=970f2ea8-2c17-4ece-b80e-e131afdd9f5f" />
      </body>
      <title>.NET 3.0 Middleware Technologies Day: Third Incarnation</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,970f2ea8-2c17-4ece-b80e-e131afdd9f5f.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,970f2ea8-2c17-4ece-b80e-e131afdd9f5f.aspx</link>
      <pubDate>Thu, 15 Feb 2007 05:09:56 GMT</pubDate>
      <description>&lt;p&gt;
Third incarnation of the .NET 3.0 Middleware Technologies day went through yesterday.
&lt;/p&gt;
&lt;p&gt;
Here are the deliverables:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
PPT: &lt;a href="http://www.request-response.com/blog/content/binary/WCF_WF_Feb2007_3.zip"&gt;Download&lt;/a&gt;&amp;nbsp;[1] 
&lt;li&gt;
WCF Samples: &lt;a href="http://www.request-response.com/blog/content/binary/WCFDemosFeb2007_3.zip"&gt;Download&lt;/a&gt; 
&lt;li&gt;
WF Samples: &lt;a href="http://www.request-response.com/blog/content/binary/WFDemosFeb2007_3.zip"&gt;Download&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you did not get/notice the printed articles, here's what should put you to sleep
over the weekend:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx"&gt;Concepts
and Semantics of Service Contracts&lt;/a&gt;&amp;nbsp;[1] 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx"&gt;Transactional
Semantics in Loosely Coupled Distributed Systems&lt;/a&gt;&amp;nbsp;[1] 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,86bd92f2-13fd-4454-ab88-272a4a8be875.aspx"&gt;Cooperation&amp;nbsp;Between
Workflows and Services&lt;/a&gt;&amp;nbsp;[1] 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx"&gt;Type
Systems Compared - XML &amp;lt;&amp;gt; CLR&lt;/a&gt;&amp;nbsp;[1]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Also, the accompanying book is available &lt;a href="http://www.request-response.com/blog/PermaLink,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#808080 size=1&gt;[1] Only available in Slovene.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=970f2ea8-2c17-4ece-b80e-e131afdd9f5f" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,970f2ea8-2c17-4ece-b80e-e131afdd9f5f.aspx</comments>
      <category>.NET 3.0 - General</category>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.0 - WF</category>
      <category>Architecture</category>
      <category>Transactions</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=489d762d-7d0f-49ed-beb8-5f0545c85b21</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,489d762d-7d0f-49ed-beb8-5f0545c85b21.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,489d762d-7d0f-49ed-beb8-5f0545c85b21.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=489d762d-7d0f-49ed-beb8-5f0545c85b21</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Second incarnation of the .NET 3.0 Middleware Technologies day went through today.
</p>
        <p>
Here are the deliverables:
</p>
        <p>
Code: <a href="http://www.request-response.com/blog/content/binary/WCFWFDemosOct2006_2.zip">Download</a><br />
PPT: <a href="http://www.request-response.com/blog/content/binary/WCF_WF_Oct2006_2.zip">Download</a> [Slovenian]
</p>
        <p>
Frequent answer still stands. <a href="http://blogs.msdn.com/tomarcher/archive/2006/07/17/668572.aspx">This</a> is
the best playground.
</p>
        <p>
Since there is so much interest, we are discussing a third repeat of the series. Anyone
who wanted to attend, but did not get a seat, stay tuned.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=489d762d-7d0f-49ed-beb8-5f0545c85b21" />
      </body>
      <title>.NET 3.0 Middleware Technologies Day: Second Incarnation</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,489d762d-7d0f-49ed-beb8-5f0545c85b21.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,489d762d-7d0f-49ed-beb8-5f0545c85b21.aspx</link>
      <pubDate>Thu, 19 Oct 2006 20:01:13 GMT</pubDate>
      <description>&lt;p&gt;
Second incarnation of the .NET 3.0 Middleware Technologies day went through today.
&lt;/p&gt;
&lt;p&gt;
Here are the deliverables:
&lt;/p&gt;
&lt;p&gt;
Code: &lt;a href="http://www.request-response.com/blog/content/binary/WCFWFDemosOct2006_2.zip"&gt;Download&lt;/a&gt;
&lt;br&gt;
PPT: &lt;a href="http://www.request-response.com/blog/content/binary/WCF_WF_Oct2006_2.zip"&gt;Download&lt;/a&gt;&amp;nbsp;[Slovenian]
&lt;/p&gt;
&lt;p&gt;
Frequent answer still stands. &lt;a href="http://blogs.msdn.com/tomarcher/archive/2006/07/17/668572.aspx"&gt;This&lt;/a&gt; is
the best playground.
&lt;/p&gt;
&lt;p&gt;
Since there is so much interest, we are discussing a third repeat of the series. Anyone
who wanted to attend, but did not get a seat, stay tuned.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=489d762d-7d0f-49ed-beb8-5f0545c85b21" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,489d762d-7d0f-49ed-beb8-5f0545c85b21.aspx</comments>
      <category>.NET 3.0 - General</category>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=4c9487e9-b98a-48ae-902a-f08b8c56f9fd</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,4c9487e9-b98a-48ae-902a-f08b8c56f9fd.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,4c9487e9-b98a-48ae-902a-f08b8c56f9fd.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4c9487e9-b98a-48ae-902a-f08b8c56f9fd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We had a nice discussion throughout the day today, together with around 50 attendees.
It's hard to even cover feature changes of .NET 3.0 in a day, but we managed
to cover the important things of WCF and WF, spending a complete day inside the Visual
Studio.
</p>
        <p>
Here are the demos: <a href="http://www.request-response.com/blog/content/binary/WCFWFDemosOct2006.zip">Download</a><br />
And the PPT slides: <a href="http://www.request-response.com/blog/content/binary/WCF_WF_Oct2006.zip">Download</a> [Slovenian]
</p>
        <p>
And the link to the Tom Archer's <a href="http://blogs.msdn.com/tomarcher/archive/2006/07/17/668572.aspx">compatibility
matrix</a> for the .NET Framework 3.0 downloads.
</p>
        <p>
Thanks to everyone who attended.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4c9487e9-b98a-48ae-902a-f08b8c56f9fd" />
      </body>
      <title>.NET 3.0 Middleware Technologies Day</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,4c9487e9-b98a-48ae-902a-f08b8c56f9fd.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,4c9487e9-b98a-48ae-902a-f08b8c56f9fd.aspx</link>
      <pubDate>Thu, 05 Oct 2006 17:03:06 GMT</pubDate>
      <description>&lt;p&gt;
We had a nice discussion throughout the day today, together with around 50 attendees.
It's hard to even&amp;nbsp;cover feature changes of .NET 3.0 in a day, but we managed
to cover the important things of WCF and WF, spending a complete day inside the Visual
Studio.
&lt;/p&gt;
&lt;p&gt;
Here are the demos: &lt;a href="http://www.request-response.com/blog/content/binary/WCFWFDemosOct2006.zip"&gt;Download&lt;/a&gt;
&lt;br&gt;
And the PPT slides: &lt;a href="http://www.request-response.com/blog/content/binary/WCF_WF_Oct2006.zip"&gt;Download&lt;/a&gt;&amp;nbsp;[Slovenian]
&lt;/p&gt;
&lt;p&gt;
And the link to the Tom Archer's&amp;nbsp;&lt;a href="http://blogs.msdn.com/tomarcher/archive/2006/07/17/668572.aspx"&gt;compatibility
matrix&lt;/a&gt; for the .NET Framework 3.0 downloads.
&lt;/p&gt;
&lt;p&gt;
Thanks to everyone who attended.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4c9487e9-b98a-48ae-902a-f08b8c56f9fd" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,4c9487e9-b98a-48ae-902a-f08b8c56f9fd.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.0 - WF</category>
      <category>Architecture</category>
      <category>Work</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.request-response.com/blog/PermaLink,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx">Last
article</a> finished my XML series. This one focuses on transactional semantics in
a service oriented universe.
</p>
        <p>
Language: <strong><em>Slovenian</em></strong></p>
        <hr />
        <p>
Naslov:
</p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-TransactionalServices.doc">Transakcijska
semantika v šibko sklopljenih, porazdeljenih sistemih</a>
        </p>
        <p>
          <em>
            <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-TransactionalServices.doc">
              <img alt="Transakcijska semantika v šibko sklopljenih, porazdeljenih sistemih" hspace="0" src="http://www.request-response.com/blog/images/matevzgacnik-TransactionalServices.jpg" align="baseline" border="1" />
            </a>
          </em>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620" />
      </body>
      <title>Article: Transactional Semantics in Loosely Coupled Distributed Systems</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx</link>
      <pubDate>Tue, 06 Jun 2006 08:59:30 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx"&gt;Last
article&lt;/a&gt; finished my XML series. This one focuses on transactional semantics in
a service oriented universe.
&lt;/p&gt;
&lt;p&gt;
Language:&amp;nbsp;&lt;strong&gt;&lt;em&gt;Slovenian&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-TransactionalServices.doc"&gt;Transakcijska
semantika v šibko sklopljenih, porazdeljenih sistemih&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-TransactionalServices.doc"&gt;&lt;img alt="Transakcijska semantika v šibko sklopljenih, porazdeljenih sistemih" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-TransactionalServices.jpg" align=baseline border=1&gt;&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,a40bf4fb-fea6-42c5-a2f2-f0e7dafa3620.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>Architecture</category>
      <category>Articles</category>
      <category>Transactions</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=25e8d68b-09ff-46e8-b360-ecd5128aa90c</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=25e8d68b-09ff-46e8-b360-ecd5128aa90c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The second article is about concepts and semantics of service contracts. It deals
with WCF (<a href="http://www.windowscommunication.net">Windows Communication Foundation</a>)
contract definition and its behavioral aspects.
</p>
        <p>
Language: <strong><em>Slovenian</em></strong></p>
        <hr />
        <p>
Naslov:
</p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-ServiceContracts.doc">Koncepti
in semantike storitvenih pogodb</a>
        </p>
        <p>
          <em>
            <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-ServiceContracts.doc">
              <img alt="Koncepti in semantike storitvenih pogodb" hspace="0" src="http://www.request-response.com/blog/images/matevzgacnik-servicecontracts.jpg" align="baseline" border="1" />
            </a>
          </em>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=25e8d68b-09ff-46e8-b360-ecd5128aa90c" />
      </body>
      <title>Article: Concepts and Semantics of Service Contracts</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx</link>
      <pubDate>Fri, 02 Jun 2006 18:19:45 GMT</pubDate>
      <description>&lt;p&gt;
The second article is about concepts and semantics of service contracts. It deals
with WCF (&lt;a href="http://www.windowscommunication.net"&gt;Windows Communication Foundation&lt;/a&gt;)
contract definition and its behavioral aspects.
&lt;/p&gt;
&lt;p&gt;
Language:&amp;nbsp;&lt;strong&gt;&lt;em&gt;Slovenian&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-ServiceContracts.doc"&gt;Koncepti
in semantike storitvenih pogodb&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-ServiceContracts.doc"&gt;&lt;img alt="Koncepti in semantike storitvenih pogodb" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-servicecontracts.jpg" align=baseline border=1&gt;&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=25e8d68b-09ff-46e8-b360-ecd5128aa90c" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,25e8d68b-09ff-46e8-b360-ecd5128aa90c.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>Architecture</category>
      <category>Articles</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=2f86ca0f-29fa-48b0-b761-ca147ada43dd</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2f86ca0f-29fa-48b0-b761-ca147ada43dd</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Having spent the last two weeks tweaking my diagrams and pictures with a book designer,
I learned quite a lot about differences in a design and development environment. To
get facts straight, they live in a DPI-based world, which is nasty. And since my designer
uses MacOS X platform to do the design stuff, a lot of interesting issues arrised.
Again.
</p>
        <p>
What I wanted to convey is: The book is finally done. 
</p>
        <p>
Title (in Slovene): <strong>Arhitektura sodobnih rešitev Microsoft .NET - Načrtovalski
vzorci</strong></p>
        <p>
Its physical incarnation should be available to general developer/architect public
in a few weeks, but most definitely <a href="http://www.ntk2005.microsoft.si/Slovenija/ntk2005/">here</a>.
</p>
        <p>
Everyone who managed to send me an email after my <a href="http://www.request-response.com/blog/PermaLink.aspx?guid=8cd85a5e-1809-4761-ae02-f90752b08554">previous
blog post</a>, will be getting a copy in his/her mailbox today.
</p>
        <p>
If you would like a copy (electronic one, that is), drop me an email using <a href="mailto:matevz.gacnik@gama-system.si?subject=Knjiga: Arhitektura sodobnih resitev Microsoft .NET">this
link</a>. 
</p>
        <p>
Here's the TOC, up to level 3, (in Slovene):
</p>
        <p>
1    PREDGOVOR<br />
2    UVOD<br />
3    OZADJE<br />
3.1    O PLATFORMI<br />
3.2    O PROGRAMSKIH JEZIKIH<br />
3.3    O NAČRTOVALSKIH VZORCIH<br />
3.3.1    Začetniki koncepta načrtovalskih vzorcev<br />
3.3.2    Načrtovalski vzorci v informacijski tehnologiji<br />
3.3.3    Načrtovalski vzorec: Windows DNA<br />
3.3.4    Porazdeljene transakcije<br />
3.4    SPLOŠNO O PORAZDELJENIH STORITVAH<br />
3.4.1    Strateški pomen Enterprise Services<br />
3.4.2    Prihodnost Enterprise Services<br />
3.4.3    Hitrost COM+<br />
3.4.4    O .NET Enteprise Services<br />
3.4.5    O porazdeljenem transakcijskem koordinatorju (MSDTC)<br />
3.5    KJE SMO?<br />
4    NAČRTOVALSKI VZORCI<br />
4.1    NAČRTOVALSKI VZOREC PORAZDELJENE APLIKACIJE<br />
4.1.1    Ideja<br />
4.1.2    Porazdeljena aplikacija potrebuje nivo fasade<br />
4.1.3    Porazdeljena aplikacija potrebuje nivo dostopa do podatkov<br />
4.1.4    Objekti entitetnih storitev validirajo poslovna pravila<br />
4.1.5    Ločeno upravljanje transakcij<br />
4.1.6    Procesi<br />
4.1.7    Kje smo?<br />
4.2    NAČRTOVALSKI VZOREC SPLETNE APLIKACIJE<br />
4.2.1    Namen<br />
4.2.2    Struktura<br />
4.2.3    Stran začasnih naročil<br />
4.2.4    Objekt DataSet<br />
4.2.5    DataSet &lt;&gt; DataTable &lt;&gt; DataAdapter<br />
4.2.6    Kje smo?<br />
4.3    NAČRTOVALSKI VZOREC PODATKOVNEGA DOSTOPA<br />
4.3.1    Namen<br />
4.3.2    Struktura<br />
4.3.3    Razredi<br />
4.3.4    Dodajanje novega naročila<br />
4.3.5    Kaj pa transakcije?<br />
4.3.6    Dostop do podatkov<br />
4.3.7    Kje smo?<br />
4.4    NAČRTOVALSKI VZOREC ENTITETNIH STORITEV<br />
4.4.1    Namen<br />
4.4.2    Struktura<br />
4.4.3    Primer poslovnega pravila<br />
4.4.4    Nivo dostopa do podatkov<br />
4.4.5    Validacija poslovnih pravil<br />
4.4.6    Naprednejši koncepti validacije poslovnih pravil<br />
4.4.7    Kje smo?<br />
4.5    NAČRTOVALSKI VZOREC POSLOVNE FASADE<br />
4.5.1    Namen<br />
4.5.2    Struktura<br />
4.5.3    Kdaj uporabiti?<br />
4.5.4    Razmislite o spletnih storitvah<br />
4.5.5    Kje smo?<br />
4.6    NAČRTOVALSKI VZOREC TRANSAKCIJSKIH STORITEV<br />
4.6.1    Transakcije in .NET v splošnem<br />
4.6.2    Namen<br />
4.6.3    Struktura<br />
4.6.4    Kako deluje?<br />
4.6.5    Kdaj uporabiti?<br />
4.6.6    Kako uporabiti?<br />
4.6.7    Kje smo?<br />
5    .NET ENTEPRISE SERVICES<br />
5.1    KAKO UPORABLJATI .NET ENTERPRISE SERVICES?<br />
5.1.1    Načrtovanje komponent<br />
5.1.2    Razredni in članski atributi<br />
5.2    NAMESTITEV KOMPONENT<br />
5.3    KJE SMO?<br />
6    UNIČEVANJE VIROV<br />
6.1    METODA FINALIZE<br />
6.1.1    Dedovanje iz System.Object<br />
6.1.2    O finalizaciji<br />
6.1.3    Kdaj uporabiti finalizacijo?<br />
6.1.4    Oživljanje<br />
6.2    METODA DISPOSE<br />
6.2.1    Kdaj klicati metodo Dispose?<br />
6.3    BREZ UPORABE .NET ENTERPRISE SERVICES<br />
6.3.1    Podatkovni nivo – osnovna komponenta<br />
6.3.2    Podatkovni nivo – ostale komponente<br />
6.3.3    Komponente drugih nivojev<br />
6.4    UPORABA V .NET ENTERPRISE SERVICES<br />
6.4.1    Podatkovni nivo – osnovna komponenta<br />
6.4.2    Podatkovni nivo – ostale komponente<br />
6.4.3    Komponente drugih nivojev<br />
6.5    KJE SMO?<br />
7    VIRI
</p>
        <p>
If you still don't have my previous book, <em>Arhitektura spletnih storitev - Usmeritve
za načrtovanje</em>, you can write to me using <a href="mailto:matevz.gacnik@gama-system.si?subject=Knjiga: Arhitektura spletnih storitev">this
link</a>.
</p>
        <p>
Thanks again to all the reviewers and especially to Microsoft gals who had to read
this technical, unreadable text during the proof reading process. Thanks to Mateja
from <a href="http://www.alten.si/">Alten</a>, for doing a fantastic design
work.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=2f86ca0f-29fa-48b0-b761-ca147ada43dd" />
      </body>
      <title>Modern .NET Architecure: Book Done</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx</link>
      <pubDate>Mon, 18 Apr 2005 11:21:06 GMT</pubDate>
      <description>&lt;p&gt;
Having spent the last two weeks tweaking my diagrams and pictures with a book designer,
I learned quite a lot about differences in a design and development environment. To
get facts straight, they live in a DPI-based world, which is nasty. And since my designer
uses MacOS X platform to do the design stuff, a lot of interesting issues arrised.
Again.
&lt;/p&gt;
&lt;p&gt;
What I wanted to convey is: The book is finally done. 
&lt;/p&gt;
&lt;p&gt;
Title (in Slovene):&amp;nbsp;&lt;strong&gt;Arhitektura sodobnih rešitev Microsoft .NET - Načrtovalski
vzorci&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Its physical incarnation should be available to general developer/architect public
in a few weeks, but most definitely &lt;a href="http://www.ntk2005.microsoft.si/Slovenija/ntk2005/"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Everyone who managed to send me an email after my &lt;a href="http://www.request-response.com/blog/PermaLink.aspx?guid=8cd85a5e-1809-4761-ae02-f90752b08554"&gt;previous
blog post&lt;/a&gt;, will be getting a copy in his/her mailbox today.
&lt;/p&gt;
&lt;p&gt;
If you would like a copy (electronic one, that is), drop me an email using &lt;a href="mailto:matevz.gacnik@gama-system.si?subject=Knjiga: Arhitektura sodobnih resitev Microsoft .NET"&gt;this
link&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Here's the TOC, up to level 3, (in Slovene):
&lt;/p&gt;
&lt;p&gt;
1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PREDGOVOR&lt;br&gt;
2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UVOD&lt;br&gt;
3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OZADJE&lt;br&gt;
3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O PLATFORMI&lt;br&gt;
3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O PROGRAMSKIH JEZIKIH&lt;br&gt;
3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O NAČRTOVALSKIH VZORCIH&lt;br&gt;
3.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Začetniki koncepta načrtovalskih vzorcev&lt;br&gt;
3.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Načrtovalski vzorci v informacijski tehnologiji&lt;br&gt;
3.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Načrtovalski vzorec: Windows DNA&lt;br&gt;
3.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Porazdeljene transakcije&lt;br&gt;
3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPLOŠNO O PORAZDELJENIH STORITVAH&lt;br&gt;
3.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp; Strateški pomen Enterprise Services&lt;br&gt;
3.4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Prihodnost Enterprise Services&lt;br&gt;
3.4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Hitrost COM+&lt;br&gt;
3.4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O .NET Enteprise Services&lt;br&gt;
3.4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O porazdeljenem transakcijskem koordinatorju (MSDTC)&lt;br&gt;
3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;KJE SMO?&lt;br&gt;
4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZORCI&lt;br&gt;
4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC PORAZDELJENE APLIKACIJE&lt;br&gt;
4.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ideja&lt;br&gt;
4.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Porazdeljena aplikacija potrebuje nivo fasade&lt;br&gt;
4.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Porazdeljena aplikacija potrebuje nivo dostopa do podatkov&lt;br&gt;
4.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Objekti entitetnih storitev validirajo poslovna pravila&lt;br&gt;
4.1.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ločeno upravljanje transakcij&lt;br&gt;
4.1.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Procesi&lt;br&gt;
4.1.7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC SPLETNE APLIKACIJE&lt;br&gt;
4.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namen&lt;br&gt;
4.2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Struktura&lt;br&gt;
4.2.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Stran začasnih naročil&lt;br&gt;
4.2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Objekt DataSet&lt;br&gt;
4.2.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DataSet &amp;lt;&amp;gt; DataTable &amp;lt;&amp;gt; DataAdapter&lt;br&gt;
4.2.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC PODATKOVNEGA DOSTOPA&lt;br&gt;
4.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namen&lt;br&gt;
4.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Struktura&lt;br&gt;
4.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Razredi&lt;br&gt;
4.3.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dodajanje novega naročila&lt;br&gt;
4.3.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kaj pa transakcije?&lt;br&gt;
4.3.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dostop do podatkov&lt;br&gt;
4.3.7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC ENTITETNIH STORITEV&lt;br&gt;
4.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namen&lt;br&gt;
4.4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Struktura&lt;br&gt;
4.4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Primer poslovnega pravila&lt;br&gt;
4.4.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Nivo dostopa do podatkov&lt;br&gt;
4.4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Validacija poslovnih pravil&lt;br&gt;
4.4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Naprednejši koncepti validacije poslovnih pravil&lt;br&gt;
4.4.7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
4.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC POSLOVNE FASADE&lt;br&gt;
4.5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namen&lt;br&gt;
4.5.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Struktura&lt;br&gt;
4.5.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kdaj uporabiti?&lt;br&gt;
4.5.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Razmislite o spletnih storitvah&lt;br&gt;
4.5.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
4.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAČRTOVALSKI VZOREC TRANSAKCIJSKIH STORITEV&lt;br&gt;
4.6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Transakcije in .NET v splošnem&lt;br&gt;
4.6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Namen&lt;br&gt;
4.6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Struktura&lt;br&gt;
4.6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kako deluje?&lt;br&gt;
4.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kdaj uporabiti?&lt;br&gt;
4.6.6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kako uporabiti?&lt;br&gt;
4.6.7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kje smo?&lt;br&gt;
5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.NET ENTEPRISE SERVICES&lt;br&gt;
5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;KAKO UPORABLJATI .NET ENTERPRISE SERVICES?&lt;br&gt;
5.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Načrtovanje komponent&lt;br&gt;
5.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Razredni in članski atributi&lt;br&gt;
5.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NAMESTITEV KOMPONENT&lt;br&gt;
5.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;KJE SMO?&lt;br&gt;
6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UNIČEVANJE VIROV&lt;br&gt;
6.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;METODA FINALIZE&lt;br&gt;
6.1.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dedovanje iz System.Object&lt;br&gt;
6.1.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;O finalizaciji&lt;br&gt;
6.1.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kdaj uporabiti finalizacijo?&lt;br&gt;
6.1.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Oživljanje&lt;br&gt;
6.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;METODA DISPOSE&lt;br&gt;
6.2.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Kdaj klicati metodo Dispose?&lt;br&gt;
6.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BREZ UPORABE .NET ENTERPRISE SERVICES&lt;br&gt;
6.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Podatkovni nivo – osnovna komponenta&lt;br&gt;
6.3.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Podatkovni nivo – ostale komponente&lt;br&gt;
6.3.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Komponente drugih nivojev&lt;br&gt;
6.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UPORABA V .NET ENTERPRISE SERVICES&lt;br&gt;
6.4.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Podatkovni nivo – osnovna komponenta&lt;br&gt;
6.4.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Podatkovni nivo – ostale komponente&lt;br&gt;
6.4.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Komponente drugih nivojev&lt;br&gt;
6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;KJE SMO?&lt;br&gt;
7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VIRI
&lt;/p&gt;
&lt;p&gt;
If you still don't have my previous book, &lt;em&gt;Arhitektura spletnih storitev - Usmeritve
za načrtovanje&lt;/em&gt;, you can write to me using &lt;a href="mailto:matevz.gacnik@gama-system.si?subject=Knjiga: Arhitektura spletnih storitev"&gt;this
link&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Thanks again to all the reviewers and especially to Microsoft gals who had to read
this technical, unreadable text during the proof reading process. Thanks to Mateja
from &lt;a href="http://www.alten.si/"&gt;Alten&lt;/a&gt;, for doing&amp;nbsp;a&amp;nbsp;fantastic&amp;nbsp;design
work.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=2f86ca0f-29fa-48b0-b761-ca147ada43dd" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,2f86ca0f-29fa-48b0-b761-ca147ada43dd.aspx</comments>
      <category>Architecture</category>
      <category>Personal</category>
      <category>Work</category>
    </item>
  </channel>
</rss>