<?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"
	>
<channel>
	<title>Comments on: Ajax: Polling for Long Running Processes in Seaside with Scriptaculous</title>
	<atom:link href="http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/feed/" rel="self" type="application/rss+xml" />
	<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/</link>
	<description>thoughts on Smalltalk and programming in general...</description>
	<pubDate>Wed, 23 Jul 2008 20:14:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/#comment-9862</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Sun, 27 Jan 2008 17:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/?p=9#comment-9862</guid>
		<description>No problem, it's a rather small pond.</description>
		<content:encoded><![CDATA[<p>No problem, it&#8217;s a rather small pond.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Alexander</title>
		<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/#comment-9859</link>
		<dc:creator>Nick Alexander</dc:creator>
		<pubDate>Sun, 27 Jan 2008 03:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/?p=9#comment-9859</guid>
		<description>For future users of this snippet: if the id of the element displaying the output is not set, the updater will silently do nothing.  Try:

html div
    id: 'someid';
    with: 'Searching...'
    waitMax: 30 seconds
    forWork: [self getDataFromLongRunningProcess]
    thenRender: [:r :value &#124; r text: value]

Thanks Ramon, for the best seaside blog of them all!</description>
		<content:encoded><![CDATA[<p>For future users of this snippet: if the id of the element displaying the output is not set, the updater will silently do nothing.  Try:</p>
<p>html div<br />
    id: &#8217;someid&#8217;;<br />
    with: &#8216;Searching&#8230;&#8217;<br />
    waitMax: 30 seconds<br />
    forWork: [self getDataFromLongRunningProcess]<br />
    thenRender: [:r :value | r text: value]</p>
<p>Thanks Ramon, for the best seaside blog of them all!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/#comment-728</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Sun, 24 Dec 2006 03:26:58 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/?p=9#comment-728</guid>
		<description>Actually, its single threaded nature is a feature, a necessary one, when you consider that requests come in on different threads, but the server contains long lived objects that must serve them all.  Rather than making you think about such things, and do the locking yourself, Seaside simply forces all access to a session through a lock allowing one request at a time to access the session.  So it's not something you want to change, just something you need to be aware of, and how know how to work around, should the need arise.

This isn't normally a problem in other frameworks because they don't keep things like pages and controls alive between multiple requests like Seaside does, but, it is something you have to be aware of if you try and do something like I did in this article, because otherwise you'll see all your processes that you expect to run asynchronously running serially and you won't know why.

When not doing Ajax, you'd never notice this anyway, but Ajax allows a page to kick off multiple threads on the server and do work asyncronously, which personally, I find highly useful, for much more than loading data.  

I used this because I had some local data I could show right away, and then some other related data from remote systems that may or may not come back, and take several seconds to fetch.  This allowed me to show the user what I had instantly and inform them, in the page widgets, that more data was being fetched, and when it comes in it'll display.  I consider this little piece of code critical to the user experience in my applications.  Consider how useful this might be in a mashup where you get data from many sources you might not control, or want to wait for.</description>
		<content:encoded><![CDATA[<p>Actually, its single threaded nature is a feature, a necessary one, when you consider that requests come in on different threads, but the server contains long lived objects that must serve them all.  Rather than making you think about such things, and do the locking yourself, Seaside simply forces all access to a session through a lock allowing one request at a time to access the session.  So it&#8217;s not something you want to change, just something you need to be aware of, and how know how to work around, should the need arise.</p>
<p>This isn&#8217;t normally a problem in other frameworks because they don&#8217;t keep things like pages and controls alive between multiple requests like Seaside does, but, it is something you have to be aware of if you try and do something like I did in this article, because otherwise you&#8217;ll see all your processes that you expect to run asynchronously running serially and you won&#8217;t know why.</p>
<p>When not doing Ajax, you&#8217;d never notice this anyway, but Ajax allows a page to kick off multiple threads on the server and do work asyncronously, which personally, I find highly useful, for much more than loading data.  </p>
<p>I used this because I had some local data I could show right away, and then some other related data from remote systems that may or may not come back, and take several seconds to fetch.  This allowed me to show the user what I had instantly and inform them, in the page widgets, that more data was being fetched, and when it comes in it&#8217;ll display.  I consider this little piece of code critical to the user experience in my applications.  Consider how useful this might be in a mashup where you get data from many sources you might not control, or want to wait for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giles Bowkett</title>
		<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/#comment-721</link>
		<dc:creator>Giles Bowkett</dc:creator>
		<pubDate>Sun, 24 Dec 2006 01:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/?p=9#comment-721</guid>
		<description>Does this single-thread thing present a real problem? The most I've done in Seaside so far is following along with your blog screencast, but in one of the podcasts I've heard him on, Avi Bryant said Dabble uses Ajax mostly for pre-loading data, rather than UI stuff, so it must be feasible. Is changing the single-threaded nature of Seaside possible? Have you found this to be tricky only in unusual situations? I know most uses of Ajax don't generally involve long-running processes, although polling for the status of such processes is a pretty well-accepted method of handling them. (Sorry if the questions are overkill.)</description>
		<content:encoded><![CDATA[<p>Does this single-thread thing present a real problem? The most I&#8217;ve done in Seaside so far is following along with your blog screencast, but in one of the podcasts I&#8217;ve heard him on, Avi Bryant said Dabble uses Ajax mostly for pre-loading data, rather than UI stuff, so it must be feasible. Is changing the single-threaded nature of Seaside possible? Have you found this to be tricky only in unusual situations? I know most uses of Ajax don&#8217;t generally involve long-running processes, although polling for the status of such processes is a pretty well-accepted method of handling them. (Sorry if the questions are overkill.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#8230; of many things &#8230; &#187; Polling for long running processes in Seaside</title>
		<link>http://onsmalltalk.com/programming/smalltalk/polling-for-long-running-processes/#comment-276</link>
		<dc:creator>&#8230; of many things &#8230; &#187; Polling for long running processes in Seaside</dc:creator>
		<pubDate>Fri, 01 Dec 2006 22:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/?p=9#comment-276</guid>
		<description>[...] Another good post from Ramon Léon. [...]</description>
		<content:encoded><![CDATA[<p>[...] Another good post from Ramon Léon. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
