<?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 for Caffeine Lab</title>
	<atom:link href="http://erwan.jp/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://erwan.jp</link>
	<description>Really tasty technologies</description>
	<lastBuildDate>Wed, 07 Jul 2010 18:00:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by Arno.Nyhm</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81291</link>
		<dc:creator>Arno.Nyhm</dc:creator>
		<pubDate>Wed, 07 Jul 2010 18:00:13 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81291</guid>
		<description>maybe you can give the callback also a helper object which holds more informations and also the response object (which is still open until the last callback is used).</description>
		<content:encoded><![CDATA[<p>maybe you can give the callback also a helper object which holds more informations and also the response object (which is still open until the last callback is used).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by erwan</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81109</link>
		<dc:creator>erwan</dc:creator>
		<pubDate>Thu, 01 Jul 2010 08:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81109</guid>
		<description>Arno: Actually, there&#039;s no closures in Java so no callback functions. I could however expose a function that takes an interface with the methods &quot;onSuccess&quot;, &quot;onError&quot; and so on, then people can define a class on the fly.

However that wouldn&#039;t help if you want to return a response to the user after you get the result. That would only replace usage of jobs.</description>
		<content:encoded><![CDATA[<p>Arno: Actually, there&#8217;s no closures in Java so no callback functions. I could however expose a function that takes an interface with the methods &#8220;onSuccess&#8221;, &#8220;onError&#8221; and so on, then people can define a class on the fly.</p>
<p>However that wouldn&#8217;t help if you want to return a response to the user after you get the result. That would only replace usage of jobs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by Arno.Nyhm</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81091</link>
		<dc:creator>Arno.Nyhm</dc:creator>
		<pubDate>Thu, 01 Jul 2010 00:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81091</guid>
		<description>why you dont use a callback function with the async call?</description>
		<content:encoded><![CDATA[<p>why you dont use a callback function with the async call?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by sakuraba</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81059</link>
		<dc:creator>sakuraba</dc:creator>
		<pubDate>Wed, 30 Jun 2010 09:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81059</guid>
		<description>Thanks for clarification.</description>
		<content:encoded><![CDATA[<p>Thanks for clarification.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by erwan</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81058</link>
		<dc:creator>erwan</dc:creator>
		<pubDate>Wed, 30 Jun 2010 08:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81058</guid>
		<description>sakuraba: the waitFor is better that the synchronous call because it doesn&#039;t block a Play thread for the time it&#039;s waiting (and it could be several seconds). On a heavy traffic site the first visitor will block an execution thread, the second block the other thread and all the others will be queued. At the end of the day instead of waiting just for his request to the web service, the user has to wait for a thread to be freed and it can take a long time.

Now for the waitFor vs. a job: it depends what you&#039;re doing. If it&#039;s a general information (like the twitter box on Planet Play) a job is better. However if the WS is really specific to the visitor&#039;s request, and you need to provide feedback, you can&#039;t use a background job.

Example: your web application is a feed reader, and you want to provide a &quot;refresh now&quot; button. You&#039;ll want to refresh your view of the feed after a success, and notify the user if the feed couldn&#039;t be retrieved. You can&#039;t notify the client of a success with a background job so you have to use waitFor (or use a synchronous call).

If you&#039;re doing that in an AJAX call, then you can simply show a throbber and the user can still interact with your page during that time.</description>
		<content:encoded><![CDATA[<p>sakuraba: the waitFor is better that the synchronous call because it doesn&#8217;t block a Play thread for the time it&#8217;s waiting (and it could be several seconds). On a heavy traffic site the first visitor will block an execution thread, the second block the other thread and all the others will be queued. At the end of the day instead of waiting just for his request to the web service, the user has to wait for a thread to be freed and it can take a long time.</p>
<p>Now for the waitFor vs. a job: it depends what you&#8217;re doing. If it&#8217;s a general information (like the twitter box on Planet Play) a job is better. However if the WS is really specific to the visitor&#8217;s request, and you need to provide feedback, you can&#8217;t use a background job.</p>
<p>Example: your web application is a feed reader, and you want to provide a &#8220;refresh now&#8221; button. You&#8217;ll want to refresh your view of the feed after a success, and notify the user if the feed couldn&#8217;t be retrieved. You can&#8217;t notify the client of a success with a background job so you have to use waitFor (or use a synchronous call).</p>
<p>If you&#8217;re doing that in an AJAX call, then you can simply show a throbber and the user can still interact with your page during that time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by sakuraba</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81056</link>
		<dc:creator>sakuraba</dc:creator>
		<pubDate>Wed, 30 Jun 2010 07:12:06 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81056</guid>
		<description>Nice article, but I dont get the idea.

How is an async &quot;wait&quot; method better than a long running synchronous call? At the end of the day the user will have to wait in both scenarios ;)

Or can you render something to the user while &quot;waitfor&quot; is executed?

It seems to me that a Job-based solution is the best one after all.</description>
		<content:encoded><![CDATA[<p>Nice article, but I dont get the idea.</p>
<p>How is an async &#8220;wait&#8221; method better than a long running synchronous call? At the end of the day the user will have to wait in both scenarios <img src='http://erwan.jp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Or can you render something to the user while &#8220;waitfor&#8221; is executed?</p>
<p>It seems to me that a Job-based solution is the best one after all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by Serdar Irmak</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81028</link>
		<dc:creator>Serdar Irmak</dc:creator>
		<pubDate>Tue, 29 Jun 2010 18:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81028</guid>
		<description>Well done, I love open source.</description>
		<content:encoded><![CDATA[<p>Well done, I love open source.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by grenlibre</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81025</link>
		<dc:creator>grenlibre</dc:creator>
		<pubDate>Tue, 29 Jun 2010 17:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81025</guid>
		<description>This is pretty cool for mashup Play application using multiple API.

Thanks :)</description>
		<content:encoded><![CDATA[<p>This is pretty cool for mashup Play application using multiple API.</p>
<p>Thanks <img src='http://erwan.jp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Asynchronous HTTP Client in Play Framework by Nicolas Martignole</title>
		<link>http://erwan.jp/2010/06/29/asynchronous-http-client-in-play-framework/#comment-81023</link>
		<dc:creator>Nicolas Martignole</dc:creator>
		<pubDate>Tue, 29 Jun 2010 16:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=490#comment-81023</guid>
		<description>Great post about one of the most interesting feature of Play! framework.

Thanks for your job Erwan

Nicolas.</description>
		<content:encoded><![CDATA[<p>Great post about one of the most interesting feature of Play! framework.</p>
<p>Thanks for your job Erwan</p>
<p>Nicolas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing in Play&#8217;s Eclipse Plugin by Damien B</title>
		<link>http://erwan.jp/2010/03/11/testing-in-plays-eclipse-plugin/#comment-77414</link>
		<dc:creator>Damien B</dc:creator>
		<pubDate>Tue, 16 Mar 2010 22:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://erwan.jp/?p=484#comment-77414</guid>
		<description>Rassurant :-) Faudra que je teste un jour. Faudra trouver le projet qui s&#039;y prête par contre.</description>
		<content:encoded><![CDATA[<p>Rassurant <img src='http://erwan.jp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Faudra que je teste un jour. Faudra trouver le projet qui s&#8217;y prête par contre.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
