<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inside Java2Script &#187; Comet</title>
	<atom:link href="http://inside.java2script.com/category/comet/feed" rel="self" type="application/rss+xml" />
	<link>http://inside.java2script.com</link>
	<description>A Book about Java to JavaScript Details</description>
	<lastBuildDate>Mon, 22 Sep 2008 23:21:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Performance of Comet and Simple Pipe</title>
		<link>http://inside.java2script.com/2007/09/13/performance-of-comet-and-simple-pipe.html</link>
		<comments>http://inside.java2script.com/2007/09/13/performance-of-comet-and-simple-pipe.html#comments</comments>
		<pubDate>Wed, 12 Sep 2007 18:10:08 +0000</pubDate>
		<dc:creator>Zhou Renjian</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Comet]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://inside.java2script.com/2007/09/13/performance-of-comet-and-simple-pipe.html</guid>
		<description><![CDATA[About one and a half months ago, I introduced Java2Script Simple Pipe, another Comet implementation. At that time, I knew there were lots of performance issues on such Comet technology. Because at that time I were busy and it was &#8230; <a href="http://inside.java2script.com/2007/09/13/performance-of-comet-and-simple-pipe.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>About one and a half months ago, I introduced <a href="http://inside.java2script.com/2007/08/01/introducing-java2scripts-simple-pipe.html">Java2Script Simple Pipe, another Comet implementation</a>. At that time, I knew there were lots of performance issues on such Comet technology. Because at that time I were busy and it was not a urgent deal for me, I didn't write test codes to test out the performances at that moment.</p>
<p>Only recently, I took some tests on performance issues. And the results said Simple Pipe's Comet implementation performs really bad!</p>
<p>Opening 10 Comet connections using Simple Pipe does not affect the whole server. But when I opened 20 Comet connections, the CPU usage is up to 100% quickly! It's not a problem of the application logics. It is a matter of Comet connection. </p>
<p>Java2Script Simple Pipe supports switching pipe mode into query mode. It is very easy, just call a static method:</p>
<blockquote class="code"><p><code>SimplePipeRequest.switchToQueryMode(250);</code></p></blockquote>
<p>After switching to query mode for the pipe, I can open up to 100+ connections to the server to receive stream data back to browser. The peak of CPU usage is about 60% ~ 70%. The average CPU usage may be about 20%-30%. It is an acceptable technology with such performances under the pressure tests.</p>
<p>( I did not test those server with special Comet optimizations. I just tested Simple Pipe on Apache Tomcat 5.5. Maybe those Comet optimized should have a better results. )</p>
]]></content:encoded>
			<wfw:commentRss>http://inside.java2script.com/2007/09/13/performance-of-comet-and-simple-pipe.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

