<?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: Creating Comet applications with ASP.NET</title>
	<atom:link href="http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/</link>
	<description></description>
	<lastBuildDate>Thu, 25 Feb 2010 20:23:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mtranda</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-848</link>
		<dc:creator>mtranda</dc:creator>
		<pubDate>Fri, 18 Dec 2009 13:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-848</guid>
		<description>It&#039;s a pretty interesting read. I&#039;ve always wondered how this could be achieved in IIS. The part that I was missing was to turn the response buffering off. I do have another question though: how can one detect when the connection has closed? Currently, the thread remains active even after the client leaves the page.

I&#039;m thinking I could probably call some IIS API to figure out whether the connection is still active or not, but maybe there&#039;s a better way. I&#039;ve tried a Request.UserHostAdress on each iteration, but apparently it&#039;s only supplied to the server upon the page&#039;s first execution, and there&#039;s no way to actually detect whether the client is still there or not.

Anyway, lovely read.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a pretty interesting read. I&#8217;ve always wondered how this could be achieved in IIS. The part that I was missing was to turn the response buffering off. I do have another question though: how can one detect when the connection has closed? Currently, the thread remains active even after the client leaves the page.</p>
<p>I&#8217;m thinking I could probably call some IIS API to figure out whether the connection is still active or not, but maybe there&#8217;s a better way. I&#8217;ve tried a Request.UserHostAdress on each iteration, but apparently it&#8217;s only supplied to the server upon the page&#8217;s first execution, and there&#8217;s no way to actually detect whether the client is still there or not.</p>
<p>Anyway, lovely read.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HowToCode: Reverse AJAX / Http-Push / &#34;Comet&#34; &#8211; Kann der Server Clients aktiv infomieren? &#124; Code-Inside Blog</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-800</link>
		<dc:creator>HowToCode: Reverse AJAX / Http-Push / &#34;Comet&#34; &#8211; Kann der Server Clients aktiv infomieren? &#124; Code-Inside Blog</dc:creator>
		<pubDate>Wed, 21 Oct 2009 21:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-800</guid>
		<description>[...] Creating Comet applications with ASP.NET [...]</description>
		<content:encoded><![CDATA[<p>[...] Creating Comet applications with ASP.NET [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karel Boek</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-754</link>
		<dc:creator>Karel Boek</dc:creator>
		<pubDate>Sat, 26 Sep 2009 11:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-754</guid>
		<description>Have a look at the sample I posted today http://kboek.blogspot.com/2009/09/using-ihttpasynchandler-and.html</description>
		<content:encoded><![CDATA[<p>Have a look at the sample I posted today <a href="http://kboek.blogspot.com/2009/09/using-ihttpasynchandler-and.html" rel="nofollow">http://kboek.blogspot.com/2009/09/using-ihttpasynchandler-and.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StreamHub Comet Server</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-739</link>
		<dc:creator>StreamHub Comet Server</dc:creator>
		<pubDate>Wed, 02 Sep 2009 23:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-739</guid>
		<description>StreamHub have just added a Streaming Adapter for .Net so you can push data from a .NET client on the server and receive the updates in the browser.  Worth checking out.</description>
		<content:encoded><![CDATA[<p>StreamHub have just added a Streaming Adapter for .Net so you can push data from a .NET client on the server and receive the updates in the browser.  Worth checking out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerod Venema</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-719</link>
		<dc:creator>Jerod Venema</dc:creator>
		<pubDate>Mon, 27 Jul 2009 21:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-719</guid>
		<description>We have a fully scalable (horizontal + vertical) comet server written in c# for IIS. Works like a champ. We&#039;ve seen it support over 30k+ concurrent users, with throughput breaking 20k messages/sec.

Check it out: www.frozenmountain.com/websync</description>
		<content:encoded><![CDATA[<p>We have a fully scalable (horizontal + vertical) comet server written in c# for IIS. Works like a champ. We&#8217;ve seen it support over 30k+ concurrent users, with throughput breaking 20k messages/sec.</p>
<p>Check it out: <a href="http://www.frozenmountain.com/websync" rel="nofollow">http://www.frozenmountain.com/websync</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morris Johns</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-670</link>
		<dc:creator>Morris Johns</dc:creator>
		<pubDate>Wed, 22 Apr 2009 05:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-670</guid>
		<description>The async approach is used by this control which looks like it has source code available: http://www.codeproject.com/KB/aspnet/CometGrid.aspx

the article specifically says that threads are not blocked... The technique should be able to handle thousands of concurrent COMET connections.</description>
		<content:encoded><![CDATA[<p>The async approach is used by this control which looks like it has source code available: <a href="http://www.codeproject.com/KB/aspnet/CometGrid.aspx" rel="nofollow">http://www.codeproject.com/KB/aspnet/CometGrid.aspx</a></p>
<p>the article specifically says that threads are not blocked&#8230; The technique should be able to handle thousands of concurrent COMET connections.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-650</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 26 Mar 2009 16:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-650</guid>
		<description>spender, did you get any further with your suggested async approach?</description>
		<content:encoded><![CDATA[<p>spender, did you get any further with your suggested async approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spender</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-625</link>
		<dc:creator>spender</dc:creator>
		<pubDate>Wed, 04 Mar 2009 12:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-625</guid>
		<description>sure thing... just ironing out the deadlocks at the mo. :(</description>
		<content:encoded><![CDATA[<p>sure thing&#8230; just ironing out the deadlocks at the mo. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-623</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Wed, 04 Mar 2009 03:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-623</guid>
		<description>Thanks spender. Of course the example above is naive - it&#039;s an example! Keep in mind I was attempting to illustrate the concepts behind COMET, not necessarily promoting best practices. If I had production experience implementing this (and not just doing it for fun) I would have a lot more to share. I look forward to you posting a comment here with a link to your blog post that will contain an exhaustive treatise of the correct way to do things, given that what you described (which is fairly accurate) basically means that true &quot;push&quot; COMET is not possible outside a &quot;long poll&quot; approach.
:)</description>
		<content:encoded><![CDATA[<p>Thanks spender. Of course the example above is naive &#8211; it&#8217;s an example! Keep in mind I was attempting to illustrate the concepts behind COMET, not necessarily promoting best practices. If I had production experience implementing this (and not just doing it for fun) I would have a lot more to share. I look forward to you posting a comment here with a link to your blog post that will contain an exhaustive treatise of the correct way to do things, given that what you described (which is fairly accurate) basically means that true &#8220;push&#8221; COMET is not possible outside a &#8220;long poll&#8221; approach.<br />
 <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spender</title>
		<link>http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/comment-page-1/#comment-622</link>
		<dc:creator>spender</dc:creator>
		<pubDate>Wed, 04 Mar 2009 03:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/#comment-622</guid>
		<description>The example above is somewhat naive. Any Comet server that uses techniques such as thread.sleep is doomed. With more than about 20 users, the .net threadpool will be saturated and spin up new threads. It does this slowly, because it is designed with the idea that the tasks it excutes are short-lived and don&#039;t block, and is attempting to find an optimal number of threads to service the queue. This will lead to high latency connection times.

Using Flash in the manner described above is also not so good because the socket API for flash does not use browser settings for proxy information. 

There is a way to do this correctly in IIS. A couple of people mention it above. Deal with the request (quickly) then go async. Thread is returned to threadpool, threadpool remains responsive. When there&#039;s something to reply, end the async op, quickly borrow a thread from the pool and send the response. Most of the time nothing happens. Blocking many threads to do nothing is inefficient, and ultimately the server will spend more time swapping thread contexts than serving data.

The neverending download style is also perilous because several proxy server implementations will not send to the client until the response is complete, and IE&#039;s XMLHTTP also doesn&#039;t give you a look in until the response is complete

So, all in all, the techiques above should be considered harmful. ;-)</description>
		<content:encoded><![CDATA[<p>The example above is somewhat naive. Any Comet server that uses techniques such as thread.sleep is doomed. With more than about 20 users, the .net threadpool will be saturated and spin up new threads. It does this slowly, because it is designed with the idea that the tasks it excutes are short-lived and don&#8217;t block, and is attempting to find an optimal number of threads to service the queue. This will lead to high latency connection times.</p>
<p>Using Flash in the manner described above is also not so good because the socket API for flash does not use browser settings for proxy information. </p>
<p>There is a way to do this correctly in IIS. A couple of people mention it above. Deal with the request (quickly) then go async. Thread is returned to threadpool, threadpool remains responsive. When there&#8217;s something to reply, end the async op, quickly borrow a thread from the pool and send the response. Most of the time nothing happens. Blocking many threads to do nothing is inefficient, and ultimately the server will spend more time swapping thread contexts than serving data.</p>
<p>The neverending download style is also perilous because several proxy server implementations will not send to the client until the response is complete, and IE&#8217;s XMLHTTP also doesn&#8217;t give you a look in until the response is complete</p>
<p>So, all in all, the techiques above should be considered harmful. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
