<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx</link><description>A common complaint is that the first call on a client object takes some disproportionately large amount of time, usually ten seconds or more, while successive calls are instantaneous. There are many reasons why this might happen so there's no generic</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx#9635645</link><pubDate>Fri, 22 May 2009 21:16:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9635645</guid><dc:creator>Tobias</dc:creator><description>&lt;p&gt;The problem with servers can be solved with a central UDDI and dynamic WCF clients. After some tweaking we got a reliable plattform. A bunch of &amp;quot;unreliable&amp;quot; services grouped by a UDDI can make a pretty reliable service. See &lt;a rel="nofollow" target="_new" href="http://www.codeproject.com/KB/WCF/uddiservicefactory.aspx"&gt;http://www.codeproject.com/KB/WCF/uddiservicefactory.aspx&lt;/a&gt; for code and details.&lt;/p&gt;
&lt;p&gt;This &amp;quot;all is static approach&amp;quot; of standard WCF implementation is its biggest conceptual weakness and imo not suited for serious enterprise apps. &lt;/p&gt;
&lt;p&gt;The first call is slow problem. Before the first call the client is in &amp;quot;Created&amp;quot; state. First call establishes the connection which can consist of a couple of calls between service and client (encryption) and thus can be very time consuming.&lt;/p&gt;
&lt;p&gt;This can be partially solved by calling the the proxies .Open() method before the first method call. &lt;/p&gt;
&lt;p&gt;But be careful. There is a nasty caching bug waiting. Check &lt;a rel="nofollow" target="_new" href="http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/49c6683d-043b-4358-ae3c-3f75bfb34cb0"&gt;http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/49c6683d-043b-4358-ae3c-3f75bfb34cb0&lt;/a&gt; for a workaround.&lt;/p&gt;</description></item><item><title>re: Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx#9635953</link><pubDate>Sat, 23 May 2009 00:13:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9635953</guid><dc:creator>Tobias Manthey</dc:creator><description>&lt;p&gt;I would go even one step further...&lt;/p&gt;
&lt;p&gt;If a distributed system is for you a system one in which the failure of a computer you didn't even know existed can render your own computer unusable, you have a major design flaw in your distributed system.&lt;/p&gt;
&lt;p&gt;Distributed systems are by definition systems in which you do not control every node and hence redundancy and a fail over mechanisms are essential components.&lt;/p&gt;
&lt;p&gt;But then a distributed system can be a source of impressive quality of service. Guess you have a crappy service with a availability of 90%. Having 4 services of them with a fail over mechanism turns down the probability of a total service failure to 0.1^4 = 0.0001 or the service availability to 99.99%. This makes the difference between crap and high availability.&lt;/p&gt;
&lt;p&gt;But regarding the proxy I definitely agree. Especially in enterprise environments using a proxy should be very common. Proxy and WCF does not go very well together and by default all .Net HTTP requests use your Internet Explorer settings. Not only that proxies slow down things significantly, especially &amp;quot;1 out 100 service calls fails&amp;quot; errors can be caused by proxies.&lt;/p&gt;
&lt;p&gt;Either turn off the proxy usage in code by setting &lt;/p&gt;
&lt;p&gt;Webrequest.DefaultProxy = null;&lt;/p&gt;
&lt;p&gt;or switch it off in configuration...&lt;/p&gt;
&lt;p&gt;&amp;lt;system.net&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;True&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;proxy useSystemDefault=&amp;quot;False&amp;quot; autoDetect=&amp;quot;False&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;lt;/defaultProxy&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/system.net&amp;gt; &lt;/p&gt;
&lt;p&gt;Use Fiddler on your client computer to confirm that you were successful.&lt;/p&gt;</description></item><item><title>re: Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx#9637215</link><pubDate>Sat, 23 May 2009 14:56:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9637215</guid><dc:creator>Udi Dahan</dc:creator><description>&lt;p&gt;If you were doing queued messaging between your services, these technical problems would just disappear.&lt;/p&gt;
&lt;p&gt;Of course, you'd have to rethink your service contracts to move to a more one-way model (possibly with callback contracts), but that's actually a good thing - technical decoupling leading to greater logical decoupling.&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.nservicebus.com&amp;quot;&amp;gt;NServiceBus&amp;lt;/a&amp;gt;"&gt;http://www.nservicebus.com&amp;quot;&amp;gt;NServiceBus&amp;lt;/a&amp;gt;&lt;/a&gt; is a messaging framework which is based on these two principles - technical and logical decoupling, which is designed to make building robust and scalable distributed systems easier by preventing you from making decisions that can get you in trouble later.&lt;/p&gt;</description></item><item><title>re: Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx#9642157</link><pubDate>Tue, 26 May 2009 23:43:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9642157</guid><dc:creator>Nicholas Allen</dc:creator><description>&lt;p&gt;Hi Tobias,&lt;/p&gt;
&lt;p&gt;Replication is indeed a common way of improving reliability beyond that of the individual components in the system. &amp;nbsp;There are some restrictions to this approach (for example, replicated systems frequently need to trade off consistency of write visibility to achieve adequate performance) but there's a very large number of applications for which these restrictions are acceptable. &amp;nbsp;A client might still have single points of failures even in a replicated system though, including some of the examples in the article. &amp;nbsp;DNS is a highly replicated distributed system but a client might not have a mechanism for retrying after the name servers it has been configured with fail to respond.&lt;/p&gt;
</description></item><item><title>re: Tripping over Missing Servers</title><link>http://blogs.msdn.com/drnick/archive/2009/05/22/tripping-over-missing-servers.aspx#9642189</link><pubDate>Tue, 26 May 2009 23:53:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9642189</guid><dc:creator>Nicholas Allen</dc:creator><description>&lt;p&gt;Hi Udi,&lt;/p&gt;
&lt;p&gt;I agree with you that more people should be thinking about queued topologies that provide decoupled messaging than do so today. &amp;nbsp;I avoid calling queues a generic resolution to the problem though because replacing connected messaging with queued messaging is a semantic change to the application. &amp;nbsp;Adding a queue to the system can change the boundaries for transactions and acknowledgments, as well as some of the properties of message delivery sessions. &amp;nbsp;Application changes or additional protocols may be needed, which you might not always have the design freedom to introduce. &amp;nbsp;That's why more people need to think about these problems up front because it is often hard to switch to a better approach after the problem is seen in deployment.&lt;/p&gt;
</description></item></channel></rss>