<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Turbocharging .Net Webservice Clients</title>
	<atom:link href="http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/feed/" rel="self" type="application/rss+xml" />
	<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/</link>
	<description>Incoherent and disjointed opinionated drivel from somewhere near London</description>
	<lastBuildDate>Sat, 21 Aug 2010 02:05:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: TheBotanist</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-21860</link>
		<dc:creator>TheBotanist</dc:creator>
		<pubDate>Mon, 28 Jun 2010 10:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-21860</guid>
		<description>i have been caught out by this, my thread pool (10 threads) has been beavering away placing bets, on the surface it looks ok. The reality is only 2 threads have ever been calling the api concurrently. 

This was highlighted when I was making lots of bets on an in play match - the 5 second delay highlighted the fact that calls were being serialized ie they were backing up. As a result I got timout exceptions which caused me to research and ended up here.. I will implement all these suggestions - these are excellent easy wins for a performace boost coding againt the betfair API.</description>
		<content:encoded><![CDATA[<p>i have been caught out by this, my thread pool (10 threads) has been beavering away placing bets, on the surface it looks ok. The reality is only 2 threads have ever been calling the api concurrently. </p>
<p>This was highlighted when I was making lots of bets on an in play match &#8211; the 5 second delay highlighted the fact that calls were being serialized ie they were backing up. As a result I got timout exceptions which caused me to research and ended up here.. I will implement all these suggestions &#8211; these are excellent easy wins for a performace boost coding againt the betfair API.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madan</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-21779</link>
		<dc:creator>Madan</dc:creator>
		<pubDate>Sat, 19 Jun 2010 05:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-21779</guid>
		<description>Excellent tips</description>
		<content:encoded><![CDATA[<p>Excellent tips</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Depois eu leio &#187; Parallel, F# e no fim, de volta ao básico</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-12158</link>
		<dc:creator>Depois eu leio &#187; Parallel, F# e no fim, de volta ao básico</dc:creator>
		<pubDate>Wed, 15 Apr 2009 18:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-12158</guid>
		<description>[...] de perder um tempo no MSDN, o Google me fez parar neste e neste post. Ambos têm a resposta que eu procurava, mas no primeiro ainda têm uma mega aula de debug e o [...]</description>
		<content:encoded><![CDATA[<p>[...] de perder um tempo no MSDN, o Google me fez parar neste e neste post. Ambos têm a resposta que eu procurava, mas no primeiro ainda têm uma mega aula de debug e o [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3881</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Thu, 11 Sep 2008 16:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3881</guid>
		<description>elmariachi,

The new .Net 3.5 Add Service wizard (using WCF) seems to have gone out of its way to make this difficult. When I use 3.5, I always create 2.0-style web references. There are two ways to do this:

1) Use wsdl.exe directly (e.g. from the command line or a build script

2) In VS2008, in the Add Service Reference dialog, click Advanced... (bottom left corner), then click Add Web Reference... in the Service Reference Settings dialog that pops up. You should then be able to use EnableDecompression as usual.
</description>
		<content:encoded><![CDATA[<p>elmariachi,</p>
<p>The new .Net 3.5 Add Service wizard (using WCF) seems to have gone out of its way to make this difficult. When I use 3.5, I always create 2.0-style web references. There are two ways to do this:</p>
<p>1) Use wsdl.exe directly (e.g. from the command line or a build script</p>
<p>2) In VS2008, in the Add Service Reference dialog, click Advanced&#8230; (bottom left corner), then click Add Web Reference&#8230; in the Service Reference Settings dialog that pops up. You should then be able to use EnableDecompression as usual.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3880</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Thu, 11 Sep 2008 16:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3880</guid>
		<description>Glyn,

I&#039;m actually not sure what&#039;s going on there - the same thing is now happening to me, but I can&#039;t figure out why. I think it&#039;s something at Betfair&#039;s end - if I use the little python lib I cooked up, and switch on detailed tracing, I see this (headers only):

POST /global/v3/BFGlobalService HTTP/1.1
Host: api.betfair.com:443
Content-Length: 960
SOAPAction: urn:getEvents
Content-Type: text/xml
Accept-Encoding: gzip
User-Agent: pybetfair/0.4alpha

HTTP/1.1 200 OK
header: Server: Apache-Coyote/1.1
header: Date: Thu, 11 Sep 2008 16:12:56 GMT
header: Server: TME-GLUE/5.0.2
header: Content-Type: text/xml;charset=UTF-8
header: ntCoent-Length: 19715
header: Cache-Control: private
header: Content-Encoding: gzip
header: Content-Length:       1498

So Betfair&#039;s servers definitely have compression switched on. It looks like it&#039;s doing something weird with the headers (the jumbled ntCoent-Length header contains the uncompressed size of the response), but the data is undoubtedly compressed, and correctly represented in the Content-Length header. Weird. I&#039;ll see if I can find out what&#039;s going on.

BTW, when using gzip, I believe only the response is compressed, not the request.</description>
		<content:encoded><![CDATA[<p>Glyn,</p>
<p>I&#8217;m actually not sure what&#8217;s going on there &#8211; the same thing is now happening to me, but I can&#8217;t figure out why. I think it&#8217;s something at Betfair&#8217;s end &#8211; if I use the little python lib I cooked up, and switch on detailed tracing, I see this (headers only):</p>
<p>POST /global/v3/BFGlobalService HTTP/1.1<br />
Host: api.betfair.com:443<br />
Content-Length: 960<br />
SOAPAction: urn:getEvents<br />
Content-Type: text/xml<br />
Accept-Encoding: gzip<br />
User-Agent: pybetfair/0.4alpha</p>
<p>HTTP/1.1 200 OK<br />
header: Server: Apache-Coyote/1.1<br />
header: Date: Thu, 11 Sep 2008 16:12:56 GMT<br />
header: Server: TME-GLUE/5.0.2<br />
header: Content-Type: text/xml;charset=UTF-8<br />
header: ntCoent-Length: 19715<br />
header: Cache-Control: private<br />
header: Content-Encoding: gzip<br />
header: Content-Length:       1498</p>
<p>So Betfair&#8217;s servers definitely have compression switched on. It looks like it&#8217;s doing something weird with the headers (the jumbled ntCoent-Length header contains the uncompressed size of the response), but the data is undoubtedly compressed, and correctly represented in the Content-Length header. Weird. I&#8217;ll see if I can find out what&#8217;s going on.</p>
<p>BTW, when using gzip, I believe only the response is compressed, not the request.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elmariachi</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3875</link>
		<dc:creator>elmariachi</dc:creator>
		<pubDate>Thu, 11 Sep 2008 08:24:15 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3875</guid>
		<description>its seems that in .NET 3.5 the lines:

BFGlobalService service = new BFGlobalService();
service.EnableDecompression = true;

dont work, since there is no EnableDecompression Property anymore.
Im using the VS2008.

What would be the proper way todo this in .NET 3.5</description>
		<content:encoded><![CDATA[<p>its seems that in .NET 3.5 the lines:</p>
<p>BFGlobalService service = new BFGlobalService();<br />
service.EnableDecompression = true;</p>
<p>dont work, since there is no EnableDecompression Property anymore.<br />
Im using the VS2008.</p>
<p>What would be the proper way todo this in .NET 3.5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glyn</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3549</link>
		<dc:creator>Glyn</dc:creator>
		<pubDate>Fri, 29 Aug 2008 21:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3549</guid>
		<description>Hmmm, looks like tags in the xml request haven&#039;t posted correctly (not surprisingly), but please take my work for it that the body of the request and the response is not encoded.
Cheers,
Glyn.</description>
		<content:encoded><![CDATA[<p>Hmmm, looks like tags in the xml request haven&#8217;t posted correctly (not surprisingly), but please take my work for it that the body of the request and the response is not encoded.<br />
Cheers,<br />
Glyn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glyn</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3548</link>
		<dc:creator>Glyn</dc:creator>
		<pubDate>Fri, 29 Aug 2008 21:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3548</guid>
		<description>Hi,
thanks very much for this great article.  I am having problems enabling decompression using .net 2.0.
I am sending a request to the betfair server, using the below code:

...
BFExchangeService exch = new BFExchangeService();
exch.EnableDecompression = true;
resp = exch.getMarketPrices(req);
...

when I look at the soap request (using fiddler) I see my request went out with &#039;Accept-Encoding: gzip&#039;.  So that looks ok.
I notice that the response from betfair is not gzip&#039;d (neither is ANY of the text in my outgoing request).

Am I missing something obvious here.  Much googeling has told me that all i should need to do is set EnableDecompression = true, and everything should just magically work.
Is the betfair server playing a cruel trick on me?

Any suggestions or comments gratefully received.
Thanks,
Glyn.  (request header below:  sorry for large post)

POST /global/v3/BFGlobalService HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)
VsDebuggerCausalityData: uIDPoygYcuRlhZpPmGVpTdLQXRIAAAAAHzazgPIXCkSq/XdQF2OsD2WAJ3aAVWhKl5xe1Kb1tSYACAAA
Content-Type: text/xml; charset=utf-8
SOAPAction: &quot;getEvents&quot;
Host: api.betfair.com
Content-Length: 558
Accept-Encoding: gzip

0tTwbdin7udb8kXdRl/udR76XcMMUhPkkr2aRfS4P9wo=25322943</description>
		<content:encoded><![CDATA[<p>Hi,<br />
thanks very much for this great article.  I am having problems enabling decompression using .net 2.0.<br />
I am sending a request to the betfair server, using the below code:</p>
<p>&#8230;<br />
BFExchangeService exch = new BFExchangeService();<br />
exch.EnableDecompression = true;<br />
resp = exch.getMarketPrices(req);<br />
&#8230;</p>
<p>when I look at the soap request (using fiddler) I see my request went out with &#8216;Accept-Encoding: gzip&#8217;.  So that looks ok.<br />
I notice that the response from betfair is not gzip&#8217;d (neither is ANY of the text in my outgoing request).</p>
<p>Am I missing something obvious here.  Much googeling has told me that all i should need to do is set EnableDecompression = true, and everything should just magically work.<br />
Is the betfair server playing a cruel trick on me?</p>
<p>Any suggestions or comments gratefully received.<br />
Thanks,<br />
Glyn.  (request header below:  sorry for large post)</p>
<p>POST /global/v3/BFGlobalService HTTP/1.1<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)<br />
VsDebuggerCausalityData: uIDPoygYcuRlhZpPmGVpTdLQXRIAAAAAHzazgPIXCkSq/XdQF2OsD2WAJ3aAVWhKl5xe1Kb1tSYACAAA<br />
Content-Type: text/xml; charset=utf-8<br />
SOAPAction: &#8220;getEvents&#8221;<br />
Host: api.betfair.com<br />
Content-Length: 558<br />
Accept-Encoding: gzip</p>
<p>0tTwbdin7udb8kXdRl/udR76XcMMUhPkkr2aRfS4P9wo=25322943</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: feed</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-3212</link>
		<dc:creator>feed</dc:creator>
		<pubDate>Mon, 11 Aug 2008 06:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-3212</guid>
		<description>Easy and simple information to follow. Great share, thanks</description>
		<content:encoded><![CDATA[<p>Easy and simple information to follow. Great share, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russ</title>
		<link>http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/comment-page-1/#comment-2274</link>
		<dc:creator>russ</dc:creator>
		<pubDate>Mon, 09 Jun 2008 21:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/15/turbocharging-net-webservice-clients/#comment-2274</guid>
		<description>Hi John,

It should be sufficient simply to add the code to the app.config file - though don&#039;t add it to the applicationSettings node, insert it as a top level XML fragment. You can also set the values directly on the ServicePointManager object in your app code, although this means changing the code and recompiling if you want to change any values.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>It should be sufficient simply to add the code to the app.config file &#8211; though don&#8217;t add it to the applicationSettings node, insert it as a top level XML fragment. You can also set the values directly on the ServicePointManager object in your app code, although this means changing the code and recompiling if you want to change any values.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.888 seconds -->
