<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>cfis : Rails - Simple Asynchronous Processing</title>
    <link>http://cfis.savagexi.com</link>
    <atom:link rel="self" type="application/rss+xml" href="http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing?format=rss"/>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Charlie Savage's Blog</description>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by jim Cropcho</title>
      <description>&lt;p&gt;thanks for getting this up; I&amp;#8217;m def checking out the worker plugin.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jun 2008 07:11:30 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:8a8296a6-7acf-4873-8ec9-cf2d0c5851de</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18856</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by aleco</title>
      <description>&lt;p&gt;this sounds like a very interesting plugin. are you planning to add scheduled tasks that are not triggered by a controller action?&lt;/p&gt;

&lt;p&gt;ps: personally I&amp;#8217;d strongly prefer github over rubyforge.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jun 2008 09:03:38 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:c7d8c9c6-0e37-4dd2-a313-cf995348a481</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18863</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Jim Cropcho</title>
      <description>&lt;p&gt;I noticed that the .zip doesn&amp;#8217;t include any tests. Has any testing been done on the plugin yet? If not, I suppose writing them would be a first step, should a formal project be created.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jun 2008 10:29:21 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:a610a608-c3c9-49ce-93f9-203d94886b33</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18872</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Aleco - Github is also fine if that&amp;#8217;s what people want.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jun 2008 11:48:17 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b91aad59-7ec1-4563-92fb-574bd092cb98</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18874</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Jim - Sorry, there aren&amp;#8217;t any direct tests with the plugin. Having said that, we&amp;#8217;ve been running the code in production for the last couple of months.  In addition, it is tested indirectly through our unit and functional test suites (the tests verify that certain background requests get completed correctly).&lt;/p&gt;

&lt;p&gt;So I so feel fairly confident about the code - although I&amp;#8217;m sure there are some lurking bugs.  Adding some direct tests would be a good thing.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jun 2008 11:50:32 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b191ae2d-ab29-4b4c-8dff-9c96e17e169b</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18878</link>
    </item>
    <item>
      <title>Trackback from roScripts &amp;#45; Webmaster resources and websites: cfis : Rails &amp;#45; Super Simple Asynchronous Processing on Rails - Simple Asynchronous Processing</title>
      <description>cfis : Rails &amp;#45; Super Simple Asynchronous Processing</description>
      <pubDate>Tue, 17 Jun 2008 20:15:04 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:eb8ff4d0-1265-4fc1-b544-b507bf5c35b6</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#trackback-18896</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Noel</title>
      <description>&lt;p&gt;The instructions for the test and development environment file modifications are the same &amp;#8211; is this correct?&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 14:24:10 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:9924c4a0-0719-4add-897e-4beae326c890</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18939</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Thomas Kadauke</title>
      <description>&lt;p&gt;Hey there,&lt;/p&gt;

&lt;p&gt;Here is a completely different approach to background processing, that can be used with any of the above mentioned choices:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devblog.imedo.de/2008/6/18/running-ruby-blocks-in-the-background" rel="nofollow"&gt;http://devblog.imedo.de/2008/6/18/running-ruby-blocks-in-the-background&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of implementing a complete background task communication protocol, this solution builds on top of any communication protocol to execute code in a background process. Plus, it is the only solution that I know of, that has DRY error recovery support.&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:18:57 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ed9a52e9-e440-4e66-b842-d872e53aa5f0</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18940</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Good catch Noel - the test and development modes use different workers.  Test mode uses an in-process worker (similar to render_component), while development mode uses an out of process worker (well sort of, its the same Rails instance but its done via a 2nd http request).&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 17:33:08 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e15be31a-991c-409b-85a4-191736559a82</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18945</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Thomas Kadauke</title>
      <description>&lt;p&gt;Hey there,&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not sure if my last comment made it all the way through. Anyway, here is it:&lt;/p&gt;

&lt;p&gt;Here is a completely different approach to background processing, that can be used with any of the above mentioned choices:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://devblog.imedo.de/2008/6/18/running-ruby-blocks-in-the-background" rel="nofollow"&gt;http://devblog.imedo.de/2008/6/18/running-ruby-blocks-in-the-background&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of implementing a complete background task communication protocol, this solution builds on top of any communication protocol to execute code in a background process. Plus, it is the only solution that I know of, that has DRY error recovery support.&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 17:56:07 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:24c9aafe-217d-4b98-a8c3-10586537cce7</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-18946</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Hi Thomas,&lt;/p&gt;

&lt;p&gt;Thanks for the link. Looks like youv&amp;#8217;e done some great work - the Imedo solution of passing blocks is quite interesting, I&amp;#8217;ve never seen anything like that before.&lt;/p&gt;

&lt;p&gt;By passing blocks, its a ruby-centric take on distributed objects.  As you could probably guess from the article, I&amp;#8217;m not a fan of such solutions, since I think they bind processes to tightly together and are tough to debug.  Having said that, they can can work well in a local network.&lt;/p&gt;

&lt;p&gt;As for working with any communication protocol, I think that&amp;#8217;s over engineering.  I know it seems like a good idea, but every time I&amp;#8217;ve tried it the extra complexity has never been worth the flexibility.  Is someone really going to switch communication protocol?  And of course, you still need at least one communication protocol anyway, so now a user needs to install two things.&lt;/p&gt;

&lt;p&gt;Error recovery is definitely a good point since its non-obvious what the best way is for a background process to report an error.  So curious what you mean that it has DRY error support?&lt;/p&gt;

&lt;p&gt;And as for DRY generally - one of the thing that I like about the solution we&amp;#8217;re using is that everything is a Rails instance.  Thus there is no need to implement a bunch of supporting code in background instances that duplicate what you already have in your foreground instances.&lt;/p&gt;</description>
      <pubDate>Thu, 19 Jun 2008 14:15:35 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:cb1af3c7-8079-40dd-bf25-8423d201a11f</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19052</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by niko</title>
      <description>&lt;p&gt;I really like the approach and I got i working&#8230; basically. But I had to set&lt;/p&gt;

&lt;p&gt;session :cookie_only =&gt; false&lt;/p&gt;

&lt;p&gt;in the controller. Otherwise I&amp;#8217;d get a SessionFixationAttempt error on the process method. I&amp;#8217;m working with Rails 2.1.&lt;/p&gt;

&lt;p&gt;Now the bad thing is, with :cookie_only set to false, the :process action can&amp;#8217;t add flash-notices. I&amp;#8217;d really like the user to be noticed about the progress&#8230;&lt;/p&gt;

&lt;p&gt;What am I doing wrong?&lt;/p&gt;

&lt;p&gt;Niko.&lt;/p&gt;

&lt;p&gt;PS: +1 for github :D&lt;/p&gt;</description>
      <pubDate>Fri, 20 Jun 2008 01:24:22 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:9045d45c-1aef-419e-8e1e-07374ad8e1c5</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19073</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by niko</title>
      <description>&lt;p&gt;pls forget about the last comment&#8230; of course the flash notice isn&amp;#8217;t added until the process action finishes.&lt;/p&gt;</description>
      <pubDate>Fri, 20 Jun 2008 03:18:54 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:1fe466e7-cfe9-4e75-af7b-66d23ec2d0b5</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19081</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Hey Niko - Good point I forgot to mention.  You have to tell rails that you&amp;#8217;re passing the session id as URL parameter.&lt;/p&gt;

&lt;p&gt;As far as notifying a user about progress - you can&amp;#8217;t really since this is a background asynchronous process.  What we do instead is send a message to a user&amp;#8217;s &amp;#8220;Inbox&amp;#8221; telling them when the action has completed.  You could also send an email, sms, etc.&lt;/p&gt;</description>
      <pubDate>Fri, 20 Jun 2008 13:25:45 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:84043093-0e85-42e3-ac08-5b4791537191</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19155</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Thomas Kadauke</title>
      <description>&lt;p&gt;@Charlie: Our background processing plugin does not implement any communication protocol (like e.g. ActiveMessaging does), but it relies on the user to use an existing one, or implement a new one. In the case of ActiveMessaging, that is a single line of code. It&amp;#8217;s really not that complicated, just a matter of how the code block is sent to the background process.&lt;/p&gt;

&lt;p&gt;The advantage of being able to switch communication protocols on the fly is that you get error recovery for free. Shipped with the plugin are fallback handlers that execute the code block in-process, write it to disk, or discard it altogether.&lt;/p&gt;

&lt;p&gt;The DRY part about this is that for using fallback handlers, you still only need to write&lt;/p&gt;

&lt;pre&gt;
background do
  # your code
end
&lt;/pre&gt;


&lt;p&gt;if it fails to connect to your background process, the code block is automatically sent to a fallback handler (which can be configured in environment.rb).&lt;/p&gt;</description>
      <pubDate>Mon, 23 Jun 2008 03:46:45 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:62f3a736-0a39-482d-ab2a-73bada682f0d</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19547</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by Charlie</title>
      <description>&lt;p&gt;Thomas - Thanks for the comments.  I understand that your background process can use various communication protocols to send blocks to background processes.  What&amp;#8217;s involved on the receiving end though to support the various protocols?&lt;/p&gt;

&lt;p&gt;As far error handling, is it really the case that if using ActiveMessaging to send a message fails then rolling over to some other protocol is going to work?  That seems unlikely to me, but what are you seeing in practice.&lt;/p&gt;</description>
      <pubDate>Mon, 23 Jun 2008 10:00:25 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:0925e541-0993-4e89-9b14-2b81ad0d592e</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-19574</link>
    </item>
    <item>
      <title>Trackback from Remmrit Bookmarking: Super Bookmarks on Rails - Simple Asynchronous Processing</title>
      <description>Remmrit.com user has just tagged your post as Super!</description>
      <pubDate>Wed, 13 Aug 2008 13:00:08 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:96a29e8c-61de-4666-9d82-d97d7b053178</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#trackback-25559</link>
    </item>
    <item>
      <title>Comment on Rails - Simple Asynchronous Processing by aleco</title>
      <description>&lt;p&gt;The link &lt;a href="http://cfis.savagexi.com/files/worker.zip" rel="nofollow"&gt;http://cfis.savagexi.com/files/worker.zip&lt;/a&gt; returns a 404 error. Has the plugin been moved to github/rubyforge? I can&amp;#8217;t seem to find it anywhere&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Sat, 04 Oct 2008 13:43:29 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d7baffdf-9c17-4e5c-be13-3dfc81b82f1e</guid>
      <link>http://cfis.savagexi.com/2008/06/16/rails-super-simple-asynchronous-processing#comment-29651</link>
    </item>
  </channel>
</rss>
