<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: JAX-RS + Asynch HTTP</title>
	<atom:link href="http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/feed/" rel="self" type="application/rss+xml" />
	<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/</link>
	<description>Software plumbing using middleware wrenches</description>
	<lastBuildDate>Mon, 23 Jan 2012 15:53:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Morten Hattesen</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-3370</link>
		<dc:creator><![CDATA[Morten Hattesen]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 09:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-3370</guid>
		<description><![CDATA[I find the application of Comet or &quot;delayed response&quot; HTTP services very exciting, and I do not agree that the use case is limited.

The COMET (Async HTTP/Delayed Response/Ajax Push...) technique can be applied in any situation where &quot;server push&quot; is desired over HTTP protocol (which has obvious routing, security/TLS, and compression GZIP advantages), whether this is server/server communication, Server/RichClient or Server/Thin Client (Ajax).

The COMET approach provides low latency, low bandwidth combination, and as an added bonus you even get heartbeat/keepalive for free, when you have the typical 30-second timeout &quot;null&quot; message being returned to the client, ensuring that the client libraries and other network components do not disconnect the HTTP/Socket connection.

So you could argue, that the COMET approach is ideally suited to any application, where a client wish to subscribe to data from a channel/web service. I am currently involved in a large infrastructure project, where Rich Clients connect to web services to subscribe to data channels. The transport format is ATOM (over HTTP) and to get low latency, COMET is applied. We are currently looking into moving to RESTEasy with ATOM/Asynchronous HTTP since this implementation seems very elegant.

Background COMET article: http://en.wikipedia.org/wiki/Comet_(programming)]]></description>
		<content:encoded><![CDATA[<p>I find the application of Comet or &#8220;delayed response&#8221; HTTP services very exciting, and I do not agree that the use case is limited.</p>
<p>The COMET (Async HTTP/Delayed Response/Ajax Push&#8230;) technique can be applied in any situation where &#8220;server push&#8221; is desired over HTTP protocol (which has obvious routing, security/TLS, and compression GZIP advantages), whether this is server/server communication, Server/RichClient or Server/Thin Client (Ajax).</p>
<p>The COMET approach provides low latency, low bandwidth combination, and as an added bonus you even get heartbeat/keepalive for free, when you have the typical 30-second timeout &#8220;null&#8221; message being returned to the client, ensuring that the client libraries and other network components do not disconnect the HTTP/Socket connection.</p>
<p>So you could argue, that the COMET approach is ideally suited to any application, where a client wish to subscribe to data from a channel/web service. I am currently involved in a large infrastructure project, where Rich Clients connect to web services to subscribe to data channels. The transport format is ATOM (over HTTP) and to get low latency, COMET is applied. We are currently looking into moving to RESTEasy with ATOM/Asynchronous HTTP since this implementation seems very elegant.</p>
<p>Background COMET article: <a href="http://en.wikipedia.org/wiki/Comet_(programming)" rel="nofollow">http://en.wikipedia.org/wiki/Comet_(programming)</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RESTEasy Beta 9 Released &#171; Bill the Plumber</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2261</link>
		<dc:creator><![CDATA[RESTEasy Beta 9 Released &#171; Bill the Plumber]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 22:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2261</guid>
		<description><![CDATA[[...] JAX-RS + Asynch&#160;HTTP [...]]]></description>
		<content:encoded><![CDATA[<p>[...] JAX-RS + Asynch&nbsp;HTTP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2169</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Thu, 16 Oct 2008 23:00:12 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2169</guid>
		<description><![CDATA[Jan,

Thanks.  Interesting use case.]]></description>
		<content:encoded><![CDATA[<p>Jan,</p>
<p>Thanks.  Interesting use case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Bartel</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2168</link>
		<dc:creator><![CDATA[Jan Bartel]]></dc:creator>
		<pubDate>Thu, 16 Oct 2008 22:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2168</guid>
		<description><![CDATA[Hi Bill,

I think there&#039;s more use cases for &quot;async http&quot; than just the comet technique for ajax. For example, consider the case where a servlet wants to make a number of webservices calls to mashup some data. If each webservice call is executed synchronously, then on a moderately busy site this can rapidly eat up servlet container threads. Allowing the calls to be asynchronous and proceed in parallel (where possible of course) can free-up precious servlet container threads and thereby make the site more available. We &lt;a href=&quot;http://docs.codehaus.org/display/JETTY/Asynchronous+REST&quot; rel=&quot;nofollow&quot;&gt;implemented a webapp&lt;/a&gt; to show this. The servlet makes calls to eBay using &lt;a href=&quot;http://docs.codehaus.org/display/JETTY/Jetty+HTTP+Client&quot; rel=&quot;nofollow&quot;&gt;Jetty&#039;s async http client&lt;/a&gt;, and suspends the servlet until the results of all the REST calls are available. The &lt;a href=&quot;http://blogs.webtide.com/jesse/entry/asynchronous_content_aggregation_with_servlet&quot; rel=&quot;nofollow&quot;&gt;numbers&lt;/a&gt; clearly show the benefit of this type of approach.

best regards
Jan]]></description>
		<content:encoded><![CDATA[<p>Hi Bill,</p>
<p>I think there&#8217;s more use cases for &#8220;async http&#8221; than just the comet technique for ajax. For example, consider the case where a servlet wants to make a number of webservices calls to mashup some data. If each webservice call is executed synchronously, then on a moderately busy site this can rapidly eat up servlet container threads. Allowing the calls to be asynchronous and proceed in parallel (where possible of course) can free-up precious servlet container threads and thereby make the site more available. We <a href="http://docs.codehaus.org/display/JETTY/Asynchronous+REST" rel="nofollow">implemented a webapp</a> to show this. The servlet makes calls to eBay using <a href="http://docs.codehaus.org/display/JETTY/Jetty+HTTP+Client" rel="nofollow">Jetty&#8217;s async http client</a>, and suspends the servlet until the results of all the REST calls are available. The <a href="http://blogs.webtide.com/jesse/entry/asynchronous_content_aggregation_with_servlet" rel="nofollow">numbers</a> clearly show the benefit of this type of approach.</p>
<p>best regards<br />
Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2160</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Mon, 13 Oct 2008 05:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2160</guid>
		<description><![CDATA[Trustin, I agree and I don&#039;t think the usecase falls under the 80/20 rule, but its not that uncommon.  Think of any AJAX application that needs updates pushed from the server.  Any monitoring applications comes to mind.]]></description>
		<content:encoded><![CDATA[<p>Trustin, I agree and I don&#8217;t think the usecase falls under the 80/20 rule, but its not that uncommon.  Think of any AJAX application that needs updates pushed from the server.  Any monitoring applications comes to mind.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trustin Lee</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2159</link>
		<dc:creator><![CDATA[Trustin Lee]]></dc:creator>
		<pubDate>Sun, 12 Oct 2008 01:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2159</guid>
		<description><![CDATA[You are right.  It makes sense when one thread makes more than one response.  My point was that such a case will be pretty rare in the real world apps.  A user will end up with a separate thread pool to wait for an event in many cases.  For example, most data access API still live in a blocking paradigm.

Anyway, your idea will solve the problem when a user got some cool non-blocking data access layer or uses only in-memory data structure, so I don&#039;t think it&#039;s a bad idea.  I was just wondering what would be the real use case is.]]></description>
		<content:encoded><![CDATA[<p>You are right.  It makes sense when one thread makes more than one response.  My point was that such a case will be pretty rare in the real world apps.  A user will end up with a separate thread pool to wait for an event in many cases.  For example, most data access API still live in a blocking paradigm.</p>
<p>Anyway, your idea will solve the problem when a user got some cool non-blocking data access layer or uses only in-memory data structure, so I don&#8217;t think it&#8217;s a bad idea.  I was just wondering what would be the real use case is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2158</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Sat, 11 Oct 2008 20:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2158</guid>
		<description><![CDATA[Trustin, your approach wouldn&#039;t do/solve anything.  The polling usecase limits the amount of threads.  In your case, you&#039;re just removing a thread from the pool, no?  So, the idea would be that one thread makes multiple responses, hence the callback object.]]></description>
		<content:encoded><![CDATA[<p>Trustin, your approach wouldn&#8217;t do/solve anything.  The polling usecase limits the amount of threads.  In your case, you&#8217;re just removing a thread from the pool, no?  So, the idea would be that one thread makes multiple responses, hence the callback object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trustin Lee</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2157</link>
		<dc:creator><![CDATA[Trustin Lee]]></dc:creator>
		<pubDate>Sat, 11 Oct 2008 16:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2157</guid>
		<description><![CDATA[about how a thread should be acquired -&gt; about how a thread should be managed]]></description>
		<content:encoded><![CDATA[<p>about how a thread should be acquired -&gt; about how a thread should be managed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trustin Lee</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2156</link>
		<dc:creator><![CDATA[Trustin Lee]]></dc:creator>
		<pubDate>Sat, 11 Oct 2008 16:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2156</guid>
		<description><![CDATA[It&#039;s not asynchronous but delayed or event-driven.  I agree with you this feature has very limited use case (like waiting for a new message in an inbox and getting it).  But who triggers the completion of the request?  I guess, in most cases, it&#039;s just another blocked thread unless everything is purely non-blocking, which is unlikely to happen in the real world.  So I&#039;d rather introduce an annotation which gives a hint about how a thread should be acquired for the request, not introducing a new type.


@Path(&quot;/myresource&quot;)
@GET
@Execution(&quot;detached&quot;) // @Execution(&quot;attached&quot;) is assumed implicitly
public Object getMyResource() {
   ... the thread that called this method is detached from its thread pool automatically ...
   ... once the execution of this method completes, the thread is returned to the thread pool or is destroyed (if the pool size has reached to its maximum already) ...
}
]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s not asynchronous but delayed or event-driven.  I agree with you this feature has very limited use case (like waiting for a new message in an inbox and getting it).  But who triggers the completion of the request?  I guess, in most cases, it&#8217;s just another blocked thread unless everything is purely non-blocking, which is unlikely to happen in the real world.  So I&#8217;d rather introduce an annotation which gives a hint about how a thread should be acquired for the request, not introducing a new type.</p>
<p>@Path(&#8220;/myresource&#8221;)<br />
@GET<br />
@Execution(&#8220;detached&#8221;) // @Execution(&#8220;attached&#8221;) is assumed implicitly<br />
public Object getMyResource() {<br />
   &#8230; the thread that called this method is detached from its thread pool automatically &#8230;<br />
   &#8230; once the execution of this method completes, the thread is returned to the thread pool or is destroyed (if the pool size has reached to its maximum already) &#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subbu Allamaraju</title>
		<link>http://bill.burkecentral.com/2008/10/09/jax-rs-asynch-http/#comment-2155</link>
		<dc:creator><![CDATA[Subbu Allamaraju]]></dc:creator>
		<pubDate>Fri, 10 Oct 2008 14:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/?p=143#comment-2155</guid>
		<description><![CDATA[I wish they stop calling it &quot;Asynchronous HTTP&quot; :)]]></description>
		<content:encoded><![CDATA[<p>I wish they stop calling it &#8220;Asynchronous HTTP&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

