<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Brainspl.at: Hey Rails, nice Rack!</title>
    <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Brainspl.at</description>
    <item>
      <title>"Hey Rails, nice Rack!" by random8r</title>
      <description>I'll notice making concurrent requests, because in one of my apps, I'm doing concurrent requests. How I've done it in the past has been to run two copies on different ports, and change the parts of code the do concurrent requests to request on the different port. KLUDG-O-RAMA.

I love you Ez.

-Random8r</description>
      <pubDate>Sun, 18 May 2008 00:50:27 +0000</pubDate>
      <guid>urn:uuid:a557cd84-9d56-4fa9-a1c9-97a397632a82</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4825</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Yuri Leikind</title>
      <description>Been doing Rails development professionally (i.e. getting paid for this :) for some time now. 

Watched your MountainWest RubyConf presentation, got impressed and finally realized that Merb is not a toy or a bastardized version Rails :)

Your work on the crufty guts of Rails is promising, really looking forward to see this included in Rails.

Keep it up, you're a coding Jedi.</description>
      <pubDate>Sat, 03 May 2008 08:50:50 +0000</pubDate>
      <guid>urn:uuid:0721c0dd-ff6b-4c32-b438-19ac3d321e1c</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4802</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Kevin Stewart</title>
      <description>@Ezra: Whew! That's good to hear. Now, how about releasing 0.93? Or better yet, 1.0? :-) Sorry, I couldn't resist. I'll get back to working on my Merb app now... </description>
      <pubDate>Wed, 30 Apr 2008 20:49:55 +0000</pubDate>
      <guid>urn:uuid:eaba6896-cf25-41fc-b93d-b4c93b1e38c6</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4800</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Ezra Zygmuntowicz</title>
      <description>@Kevin-  At this point merb is not going anywhere. If the rails core team wanted to get radical and decide to build rails 3.0 on top of merb-core technology then I might consider merging the two projects. But I think that would take a lot of politics and I'm not sure if they would agree to it. 

So don't fret, merb is here to stay unless the rails-core has a drastic change of heart. And the code base for merb is *way* more simple and scalable for the future since it has no baggage. So expect merb to stick around and innovate for a long time to come.

I just figured that there is no reason for everyone using Rails to suffer when I could spend a few weeks and improve a bunch of stuff for folks.</description>
      <pubDate>Wed, 30 Apr 2008 17:52:50 +0000</pubDate>
      <guid>urn:uuid:aa6d2df2-f223-47c1-9d60-778130d8e28a</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4799</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Kevin Stewart</title>
      <description>Great work, Ezra! Of course, this now raises an interesting question. Merb was created to address technical issues with Action Pack. If the approaches pioneered in Merb are now pushed back into Rails, why should one continue to use Merb? Or, more importantly should the Merb efforts be directed towards making Rails better? It's sort of like you forked and are now bringing the forks back together. I'm currently using Merb (quite happily, BTW) but if Merb development stalls to "fix" Rails I would be a little concerned. Not that I have anything against Rails, I just like Merb's philosophy more. Is it the philosophy that will keep Merb and Rails separate, or will they evolve and converge toward esch other?</description>
      <pubDate>Wed, 30 Apr 2008 16:17:35 +0000</pubDate>
      <guid>urn:uuid:fbcc3380-dd39-4b26-9769-69e3190011e0</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4798</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by DaveS</title>
      <description>Whoa... thank you Ezra!!!!


PS: Why isn't Ezra part of rails core???? He's amazing!</description>
      <pubDate>Wed, 30 Apr 2008 07:38:47 +0000</pubDate>
      <guid>urn:uuid:86bb1ff0-705a-4b12-86e1-f72b6d29b132</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4797</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Alan Brown</title>
      <description>"just using your browser to test the app in dev mode you won;t ever notice since you won;t be making concurrent requests"

Can't concurrent requests happen alot, even in test mode, especially if your app uses AJAX?

Appreciate the work on this stuff.  There's a Moore's Law for Rails and you're making it happen.</description>
      <pubDate>Mon, 28 Apr 2008 09:26:40 +0000</pubDate>
      <guid>urn:uuid:1c7dd40d-3ac3-47a2-81f3-2b746fc1e8ed</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4794</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by MIke Costa</title>
      <description>Thanks for your work Ezra. 
I was hoping you would port Merb thread-safety to Rails one day. You're a winner!</description>
      <pubDate>Mon, 28 Apr 2008 07:49:25 +0000</pubDate>
      <guid>urn:uuid:8700a29f-721e-4084-8bef-4982dc9a7fc4</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4793</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Ezra</title>
      <description>yeah the idea is for this to be merged into rails proper once it is complete and tested, the core team knows of my work and says it will make it in once it is done. As far as mod_rails goes... I think they made a huge mistake by not using rack as their interface, so I'd hope they will realize this and add rack support. mod_rubinius is all rack based and will be able to run any ruby framework or simple rack handlers you can throw at it.</description>
      <pubDate>Sun, 27 Apr 2008 18:04:24 +0000</pubDate>
      <guid>urn:uuid:a4081059-80fd-4dbe-bca6-8c7a5c41b4cf</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4792</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Adam</title>
      <description>Awesome work man!  You are my personal hero!

I have the same question that zerohalo has and that's are there talks about this being added to the "official" branch or will this be something that sits on the side?  If it is the latter, what's the strategy for continuing support of the new rails code?

In addition to that, this is an open question to all:  Has anyone tried to see if these changes still work with mod_rails?  If no one has, I suppose I can look into seeing if this works later.</description>
      <pubDate>Sun, 27 Apr 2008 17:19:20 +0000</pubDate>
      <guid>urn:uuid:3def5d3a-b514-41a8-a16e-f74284c4c882</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4791</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Anil Wadghule</title>
      <description>This is really great! :)</description>
      <pubDate>Sun, 27 Apr 2008 12:23:24 +0000</pubDate>
      <guid>urn:uuid:d7d9dfc6-fabc-40e6-b40b-9e6f1d3a8e44</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4790</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Finanzamt</title>
      <description>Helpful post! Thank you!</description>
      <pubDate>Sat, 26 Apr 2008 16:40:42 +0000</pubDate>
      <guid>urn:uuid:ed0b78b5-98cf-4320-9991-de5960ce9676</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4789</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by zerohalo</title>
      <description>Awesome! Thanks, Ez. Will these changes at some point be committed to the main Rails trunk?

</description>
      <pubDate>Sat, 26 Apr 2008 16:13:58 +0000</pubDate>
      <guid>urn:uuid:0fa2096e-07e0-49b0-90e0-86d87119b9c5</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4788</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Stefan Saasen</title>
      <description>That is great news! Works like a charm.</description>
      <pubDate>Sat, 26 Apr 2008 09:50:28 +0000</pubDate>
      <guid>urn:uuid:ca05b499-bdd4-4ae3-8abc-ae0fb2fd0eda</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4787</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Maximilian Schulz</title>
      <description>Wow… this sounds amazing! Can't wait to check it out.</description>
      <pubDate>Sat, 26 Apr 2008 09:42:34 +0000</pubDate>
      <guid>urn:uuid:5a08c9d8-5300-4aa3-af59-90a9c6e85e78</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4786</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Chad Fowler</title>
      <description>Nice job Ezra!</description>
      <pubDate>Sat, 26 Apr 2008 07:52:45 +0000</pubDate>
      <guid>urn:uuid:a5aaf1d9-08a6-4d48-863c-f524db5b363c</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4785</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Pratik</title>
      <description>Awesome stuff :-) !</description>
      <pubDate>Fri, 25 Apr 2008 23:54:30 +0000</pubDate>
      <guid>urn:uuid:4618369d-c72f-49cb-be65-7b78d73e5d42</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4784</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Tobias Lütke</title>
      <description>Awesome ezra. Thank you so much. </description>
      <pubDate>Fri, 25 Apr 2008 22:46:48 +0000</pubDate>
      <guid>urn:uuid:c91741d8-ae95-4f00-af8c-71c8d775527e</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4783</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by meekish</title>
      <description>Mad props</description>
      <pubDate>Fri, 25 Apr 2008 22:45:46 +0000</pubDate>
      <guid>urn:uuid:71ebf6a9-79e4-4fd8-9ade-3ce840fc2df6</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4782</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Drogomir</title>
      <description>Great job! :)
Keep going. Rails definetely needs some more love.</description>
      <pubDate>Fri, 25 Apr 2008 22:15:33 +0000</pubDate>
      <guid>urn:uuid:edadad81-4ec7-4b54-9891-ae78ee0e510e</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4781</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Lucas Húngaro</title>
      <description>Congratulations! Keep up the awesome work!</description>
      <pubDate>Fri, 25 Apr 2008 20:31:55 +0000</pubDate>
      <guid>urn:uuid:d1818d5e-502c-4927-874c-ff49b610eaef</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4780</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Bruno Michel</title>
      <description>It rocks. Thanks for doing it :)</description>
      <pubDate>Fri, 25 Apr 2008 19:20:21 +0000</pubDate>
      <guid>urn:uuid:555e4d5f-5f46-479b-8ccb-0ae06c908c9b</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4779</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by Phil</title>
      <description>Awesome sauce. Hope this makes it into 2.1.</description>
      <pubDate>Fri, 25 Apr 2008 19:04:31 +0000</pubDate>
      <guid>urn:uuid:700410c7-83af-47db-a08b-4f55f8a01076</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4778</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by johan</title>
      <description>I'd hit that</description>
      <pubDate>Fri, 25 Apr 2008 17:06:32 +0000</pubDate>
      <guid>urn:uuid:a72cb0e2-3e2c-4c30-88d4-97775242be2c</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4777</link>
    </item>
    <item>
      <title>"Hey Rails, nice Rack!" by macournoyer</title>
      <description>omg, nice work! especially on the removing of the CGI wrapper, I tried that but it was too much work :/
And moving the mutex deeper is equally delicious!</description>
      <pubDate>Fri, 25 Apr 2008 14:54:15 +0000</pubDate>
      <guid>urn:uuid:38bb087b-eb8f-498a-b2b4-a83f74054119</guid>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack#comment-4776</link>
    </item>
    <item>
      <title>Hey Rails, nice Rack!</title>
      <description>&lt;p&gt;So i&amp;#8217;ve spent this week hacking on Rails, specifically going spelunking in ActionPack and porting Merb&amp;#8217;s rack machinery to rails. I figure that merb is a very nice experimentation ground and decided it was time to give some love back to the framework that inspired merb.&lt;/p&gt;


	&lt;p&gt;While still not complete, I have made significant headway on racking up rails in my &lt;a href='http://github.com/ezmobius/rails/commits/master'&gt;github fork of Rails&lt;/a&gt;. I&amp;#8217;ve added rack adapters for mongrel, eventedmongrel, thin, ebb and webrick. All of this is controlled via ./script/rackup in a rails app. So to start a cluster of 5 thin servers you would run this command:&lt;/p&gt;


&lt;pre&gt;
./script/rackup -a thin -c 5 -e production
&lt;/pre&gt;

	&lt;p&gt;I do have to say that parts of ActionPack haven&amp;#8217;t been touched in a &lt;strong&gt;long&lt;/strong&gt; time and had accumulated some cruft, with the rails rack adapter that thin and ebb use there was a dogpile of wrappers going on. A web request was wrapped in many layers like this(the &amp;rarr; means &amp;#8216;wrapped in&amp;#8217;)&lt;/p&gt;


&lt;pre&gt;
raw request -&amp;gt; rack env -&amp;gt; Rack::Request -&amp;gt; CGIWrapper -&amp;gt; CgiRequest
&lt;/pre&gt;

	&lt;p&gt;That was far too many wrappers, it also turned out that some of these wrapper were making &lt;strong&gt;duplicates&lt;/strong&gt; of all the &lt;span class="caps"&gt;CGI&lt;/span&gt; headers, meaning quit a bit of wasted memory on every request. I&amp;#8217;ve slimmed it down to this now:&lt;/p&gt;


&lt;pre&gt;
raw request -&amp;gt; rack env -&amp;gt; ActionController::RackRequest
&lt;/pre&gt;

	&lt;p&gt;With no more duplication of &lt;span class="caps"&gt;CGI&lt;/span&gt; headers, win!&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve also changed the giant mutex lock to be much smaller, it used to lock around the dispatcher callbacks, route recognition, controller instantiation, filters and action dispatch. Now it only locks around filters and action dispatch, Dispatcher callbacks, route recognition and controller instantiation all happen outside of the lock. This makes for a nice little speed boost with standard mongrel under concurrent load.&lt;/p&gt;


	&lt;p&gt;Of course this doesn&amp;#8217;t work so hot in development mode when you have concurrent requests, it falls apart due to route set reloading and class reloading done in dev mode.  But if you are just using your browser to test the app in dev mode you won;t ever notice since you won;t be making concurrent requests. In production mode the route recognition &lt;strong&gt;appears&lt;/strong&gt; to be thread safe, more extensive testing and stressing will be needed to be 100% certain though.&lt;/p&gt;


	&lt;p&gt;All in all I feel like these are some big wins for Rails. And I&amp;#8217;m not done yet, I plan on beating up ActionPack quite a bit more until it submits ;)&lt;/p&gt;</description>
      <pubDate>Fri, 25 Apr 2008 00:34:00 +0000</pubDate>
      <guid>urn:uuid:23a64352-2a16-459a-9f2c-5d149093fed2</guid>
      <author>ezmobius</author>
      <link>http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack</link>
      <category>rack</category>
      <trackback:ping>http://brainspl.at/articles/trackback/4760</trackback:ping>
    </item>
  </channel>
</rss>

