<?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: Ruby Background Tasks with Starling - Part 2</title>
	<atom:link href="http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/</link>
	<description>Some random thoughts - Go big or stay home!</description>
	<pubDate>Thu, 28 Aug 2008 22:36:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-231</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 24 Jul 2008 00:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-231</guid>
		<description>I've had it running for months without a single thread-related issue.  The trick is to make sure you have:

ActiveRecord::Base.allow_concurrency = true

when you startup your thread.  To be complete, you should also have:

ActiveRecord::Base.verify_active_connections!

at the end of your thread.

Don't ever try to have threads in your web application, but I haven't seen problems with daemons.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had it running for months without a single thread-related issue.  The trick is to make sure you have:</p>
<p>ActiveRecord::Base.allow_concurrency = true</p>
<p>when you startup your thread.  To be complete, you should also have:</p>
<p>ActiveRecord::Base.verify_active_connections!</p>
<p>at the end of your thread.</p>
<p>Don&#8217;t ever try to have threads in your web application, but I haven&#8217;t seen problems with daemons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: graham</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-230</link>
		<dc:creator>graham</dc:creator>
		<pubDate>Wed, 23 Jul 2008 23:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-230</guid>
		<description>I'm wondering if threading is the best direction to go for this. I've been looking around, and it seems like rails/activerecord threading generally meant a world of hurt (is this view outdated?).</description>
		<content:encoded><![CDATA[<p>I&#8217;m wondering if threading is the best direction to go for this. I&#8217;ve been looking around, and it seems like rails/activerecord threading generally meant a world of hurt (is this view outdated?).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-219</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sat, 28 Jun 2008 11:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-219</guid>
		<description>Balancing sleep_time with CPU is pretty much your only option.  Since Starling is a really simple queuing system, it only supports polling.  We could probably come up with a signaling scheme to prevent the polling and make jobs start immediately, but that is not the case that starling/workling were meant to solve.</description>
		<content:encoded><![CDATA[<p>Balancing sleep_time with CPU is pretty much your only option.  Since Starling is a really simple queuing system, it only supports polling.  We could probably come up with a signaling scheme to prevent the polling and make jobs start immediately, but that is not the case that starling/workling were meant to solve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Watts</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-218</link>
		<dc:creator>Andy Watts</dc:creator>
		<pubDate>Sat, 28 Jun 2008 04:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-218</guid>
		<description>default poll is 1 second.  Pretty fast.

Adding sleep_time to config/starling.yml can make it faster.
Making it faster drives the cpu load up.

development:
  listens_on: localhost:22122
  sleep_time: 0.001</description>
		<content:encoded><![CDATA[<p>default poll is 1 second.  Pretty fast.</p>
<p>Adding sleep_time to config/starling.yml can make it faster.<br />
Making it faster drives the cpu load up.</p>
<p>development:<br />
  listens_on: localhost:22122<br />
  sleep_time: 0.001</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Watts</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-217</link>
		<dc:creator>Andy Watts</dc:creator>
		<pubDate>Sat, 28 Jun 2008 03:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-217</guid>
		<description>Workling seems to poll memcache for starling messages every two seconds.  This means a delay before a worker starts on a job.

Is this sleep between polls necessary?
Is there anything else I can do to minimize the delay in jobs starting?

Thanks Andy</description>
		<content:encoded><![CDATA[<p>Workling seems to poll memcache for starling messages every two seconds.  This means a delay before a worker starts on a job.</p>
<p>Is this sleep between polls necessary?<br />
Is there anything else I can do to minimize the delay in jobs starting?</p>
<p>Thanks Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-206</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 18 Jun 2008 15:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-206</guid>
		<description>As an FYI, the original Working author has integrated my changes as well as several other improvements.  I will be switching back to his very soon.  Because everything is on git now, it's easier to suggest new additions so everyone can get the benefit.

The author's site: http://playtype.net/past/2008/2/6/starling_and_asynchrous_tasks_in_ruby_on_rails/

The github for the sources: git://github.com/purzelrakete/workling.git</description>
		<content:encoded><![CDATA[<p>As an FYI, the original Working author has integrated my changes as well as several other improvements.  I will be switching back to his very soon.  Because everything is on git now, it&#8217;s easier to suggest new additions so everyone can get the benefit.</p>
<p>The author&#8217;s site: <a href="http://playtype.net/past/2008/2/6/starling_and_asynchrous_tasks_in_ruby_on_rails/" rel="nofollow">http://playtype.net/past/2008/2/6/starling_and_asynchrous_tasks_in_ruby_on_rails/</a></p>
<p>The github for the sources: git://github.com/purzelrakete/workling.git</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-205</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 18 Jun 2008 13:06:49 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-205</guid>
		<description>I'm curious how the wrong port caused a loop.</description>
		<content:encoded><![CDATA[<p>I&#8217;m curious how the wrong port caused a loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-204</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Wed, 18 Jun 2008 06:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-204</guid>
		<description>aaaahhhh... Starling was running on the wrong port !!!</description>
		<content:encoded><![CDATA[<p>aaaahhhh&#8230; Starling was running on the wrong port !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-203</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Wed, 18 Jun 2008 05:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-203</guid>
		<description>Any idea why my worker functions would be called in a loop?

I have exactly one call:

 BgWorker.asynch_set_enable(:ref =&#62; 1)

in my bg_worker.rb file I have

class BgWorker &#60;1, :uid=&#62;"bg_workers:set_enable:61bb317b03aaf804bdbc21ce635a779e"})

called in a loop. I don't understand why. This worked before, and now runs in a loop.

Thanks</description>
		<content:encoded><![CDATA[<p>Any idea why my worker functions would be called in a loop?</p>
<p>I have exactly one call:</p>
<p> BgWorker.asynch_set_enable(:ref =&gt; 1)</p>
<p>in my bg_worker.rb file I have</p>
<p>class BgWorker &lt;1, :uid=&gt;&#8221;bg_workers:set_enable:61bb317b03aaf804bdbc21ce635a779e&#8221;})</p>
<p>called in a loop. I don&#8217;t understand why. This worked before, and now runs in a loop.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-202</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 11 Jun 2008 02:28:19 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/2008/03/29/ruby-background-tasks-with-starling-part-2/#comment-202</guid>
		<description>Updated the patch again to be a ZIP instead of an svn patch. Some people were having problems with that.</description>
		<content:encoded><![CDATA[<p>Updated the patch again to be a ZIP instead of an svn patch. Some people were having problems with that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
