Most Read Latest News Blog Resources

Merb to merge into Rails




January 14, 2009 — 
Yehuda Katz spent an entire year screaming about Ruby-on-Rails' mailer framework. In the end, he decided to simply build his own runtime and framework to replace Rails. That open-source framework came to be known as Merb.

But the Rails team didn’t ignore Katz. He and some of his fellow Merbivores, in fact, have been asked to refactor Rails in Merb's image.

The entire affair began as a rather heated argument, said Katz. “Two weeks before the merge, there was a pretty visible spat between the Rails and Merb teams. It ended reasonably well. Everybody agreed to Kumbaya a little. It had been the culmination of a cold war scenario,” said Katz.

Yehuda Katz, creator of Merb
Yehuda Katz, Merb lead developer and Rails core team member
That battle was over benchmarks and other areas where the Merb faithful said their framework was better than Rails. Another of those areas was modularity, said Katz

David Heinemeier Hansson, creator of the Ruby-on-Rails framework, has written extensively on his blog about the changes Rails 3.0 will undergo. On the topic of merging Merb into Rails, he wrote, “I've been working on Rails for more than five years. Obviously I've poured much of my soul, talent and dedication into this ... The cultural impact of what is good [about] Rails has spread far and wide and touched lots of programmers.

"These programmers share a similar weltanschauung [world view], but they don't need to care only about the things that I care about. In fact, the system works much better if they care about different things than I do."

When the dust settled, Katz, Lori Holden and Carl Lerche began working on Rails full time, while the rest of the Merb team all turned into Rails contributors. Katz forked the project on GitHub and began the heavy task of refactoring.

“One way of doing this would be to completely ice the existing Rails codebase and try to rebuild the features from the ground up,” said Katz. “But there's so much existing quirkiness that as you start to look at it,” it's not really a good option, said Katz. “The alternative is to go through Rails and do massive refactoring. I went through all the code in a render pass and it’s not really recognizable as the old code.”

That means a lot of testing, however, and Katz soon learned that he needed to run the entire battery of more than 1,000 tests after every single change he made to the Rails code.

Endgame
The result of all this refactoring should be a more performant, more flexible Rails. Katz said that modularity in Rails would have allowed him to drop in a different mailing framework way back when he decided to start Merb out of his frustration with Rails. Merb already offers a wide variety of plug-ins that can be used to circumvent any aspect of the framework that users don't enjoy. He hopes that, with only a few changes, Merb plug-ins will be able to make the transition to Rails 3.0.

While Katz expects the team to have a beta of Rails 3.0 available in May, he said that there's still a lot of work going on for Rails 2.3 and existing Merb releases. Merb will continue to receive bug fixes, as it is already popular and has an important user base, said Katz. But when Rails 3.0 is complete, Merb will likely die out. There will be a transition release, however, which will bridge the gap between Rails and Merb.

Rails 2.3 should be out at the end of January, and once it's complete, the existing Rails core team will be able to focus on helping Katz rework the framework.

One thing that should help speed up Rails 3.0 is the pushing of server duties out into the Web server. Merb already does this, and as a result, it can restart faster than Rails when something goes wrong, said Katz.

“We did a bunch of stuff that added server-like capabilities to Merb itself," said Katz. "Rails can't hook into that process. Merb was able to hook in and shorten restart times.

"Passenger has been a pretty big deal. Passenger is an Apache module that behaves similarly to how the Merb server behaves. It handles pre-forking and sending off requests. There have definitely been some issues with it early on, but those issues are largely gone now. We're probably going to see more solutions along those lines where they move responsibility for system-level stuff out of Ruby. For production situations, I really think that moving the whole problem back into the realm of Web servers is probably the long-term answer to the problem.”

The unexpected fact that this merger came out of a very public online spat was not lost on Hansson. He put his thoughts on the conflict onto his blog.

“I think what really brought this change around was the realization that we largely share the same sensibilities about code," he wrote. "That we're all fundamentally Rubyists with very similar views about the big picture. That the rift in many ways was a false one. Founded on lack of communication and a mistaken notion that because we care about working on different things, we must somehow be in opposition.

"Once we realized that, it seemed rather silly to continue the phantom drama. While there's undoubtedly a deep-founded need for humans to see and pursue conflict, there are much bigger and more worthwhile targets to chase together rather than amongst ourselves. Yes, I'm looking at you J2EE, .NET and PHP."


Related Search Term(s): MerbRailsserver management


Share this link: http://www.sdtimes.com/link/33184
 

Comments

01/19/2009 03:57:52 PM EST

WOW!! You both moved into the Obama culture. You must have been Obamaized unknowingly. You have decided that you both have the same interests just different approaches, makes more sense to work together to accomplish twice as much, at twice the speed with twice the quality. Amazing Obama (the Messiah) walks on water to strike again!! Keep up the nonpartisan work and you will challenge the SUN Gods.

United StatesJ Merrick


Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading



 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Google Code turns 5
Google Code Turns 5, and adds a Paxos Algorithm to make the system more stable and reliable.
03/17/2010 11:16 AM EST

Test your Visual Studio 2010 know-how
Microsoft is offering free beta certification exams for Visual Studio 2010.
03/17/2010 11:08 AM EST

Microsoft lifts the hood on IE9
Microsoft is previewing IE9.
03/16/2010 01:10 PM EST

 

Events calendar tab
3/22/2010 to 3/25/2010
Santa Clara, Calif.
The Eclipse Foundation

4/12/2010 to 4/14/2010
Las Vegas
Penton Media

4/12/2010 to 4/15/2010
Santa Clara, Calif.
O'Reilly Media

4/19/2010
New York City
Flagg Management

4/25/2010 to 4/28/2010
Overland Park, Kans.
IIUG