Scaling with Rails
Whenever I talk to developers in the Java community about Rails, the first question out of their mouth is usually "But can it scale?" Today, David has written a nice post titled It's boring to scale with Ruby on Rails.
The one thing that I see time and time again is that Java developers don't seem to realize that some of the highest traffic sites on the net are using LAMP stacks similar to what Rails advocates. IMHO, I don't think "Rails can't scale" is a valid argument. In fact, I don't know if there's any argument or way to put down Rails anymore.
As a developer, my guess is the rates for programming in Ruby developer are less than for programming in Java (unless you're a Ruby Superstar of course), so that's one reason not to program in it. However, since Rails is one of those new bright and shiny things, chances are you might be able to get high rates for it. As far as Enterprise Adoption of Rails, unfortunately I think that's still pretty far on the horizon. I think the hardest part is convincing management that they'll be able to find developers to support it. Mind you, I didn't say good developers, just developers. Period. This is information I've gathered from talking to my Java developer friends.
Try convincing a Fortune 500 company to program in Rails vs. Struts and they'll probably choose Struts because there are thousands of Struts Developers. Is this a good decision on their part? I don't think so. I think it's more important to hire smart people that can learn a technology, rather than hiring those that know a technology. Of course, if someone knows a technology really well, there's probably no harm in hiring them.
I think Rails can become a real contender in the Enterprise if managers can be convinced that it'll be easy to maintain Rails application. Remember that most of software cost is maintenance. Because of this, the whole "it's super productive to develop with" doesn't matter so much - does it? Are Rails applications easy to maintain? My guess is yes, but how do you convince CTOs and CIOs? Another thing I think Rails needs for Enterprise Adoption is good tool support. Drag and Drop type of stuff. Why? Because management loves that stuff (because then they can develop apps) and it's a great sales tool. ASP.NET has been successful because of Visual Studio, not because of its ease-of-use and simple syntax.
Will I learn Rails and use it to develop applications? I certainly hope to, but it's hard enough convincing companies to use something other than Struts - so I don't know if I'll have much luck in selling Rails. The one cool thing about my new job at Virtuas is its an open source company, not just a Java open source company. This opens the doors for me to learn about Rails (and others) and compare them to Java Web Frameworks.
Update: Aaron Rustad has written an interesting article for DeveloperWorks that compares Rails to Struts+Hibernate: Ruby on Rails and J2EE: Is there room for both?
Scalability really is such a loose term, it could mean anything. It's straightforward to scale a stateless app that fronts a single database, but to me that simpler case breaks down when you start talking about integrating different systems in a transactional manner.
Rails seems to me a more dynamic and simpler alternative to a Struts+Hibernate combo, but I don't see it as an alternative to J2EE in any way. I also think there is room in the Java space for similiar architectures built on lightweight scripting environments like Groovy. I'm particularly excited about what I see happening with Grails.
Keith
Posted by Keith Donald on July 12, 2005 at 03:08 PM MDT #
Why on earth are people reinventing the wheel instead of improving it?
And where is Hani when we need him :) ?
Posted by Ahmed Mohombe on July 12, 2005 at 03:09 PM MDT #
Posted by Eelco on July 12, 2005 at 03:53 PM MDT #
Personally, another problem I have with Ruby, related to the lack of tool support, is that the langauge itself bothers me. I just prefer Java so much more. I know, enclosures, and typing and yada yada yada. Say what you will about Java, about the lame generics support, etc... but when combined with an IDE like IDEA, it is truly a very productive language to write in. Going back to an environment where the IDE is not as "aware" of the code and where refactoring is simply a Find and Replace operation wouldn't be productive for me.
Posted by Patrick Lightbody on July 12, 2005 at 04:47 PM MDT #
Completely agree. The maturity of the tools and the capabilities of modern day IDEs are strengths of the Java platform. And Java truly is a productive language to write in.
Ruby On Rails is an application framework. Comparing RoR to a platform like J2EE is like comparing apples to oranges. Comparing RoR to a Struts/Hibernate makes sense, and when you'll do that you'll see fundamental differences in architecture that account for a majority of RoR's simplicity advantages for web applications that front a single database. My point is not all of RoR's advantages can be directly attributed to the fact its built on Ruby--some are--as Ruby is a more dynamic language--but not all of them. Take the ActiveRecord pattern vs that of a DataMapper for example--that's a major fundamental difference with tradeoffs that has nothing to do with the choice of implementation language.
KeithPosted by Keith Donald on July 12, 2005 at 05:47 PM MDT #
Posted by PJ Hyett on July 12, 2005 at 07:50 PM MDT #
Posted by Jason Wong on July 12, 2005 at 08:34 PM MDT #
A person who is coming fresh out of college has to learn Struts + Spring middle tier + Hibernate + XML to develop a simple web based application. RoR shines there.
Posted by Neeraj Kumar on July 12, 2005 at 08:40 PM MDT #
Posted by Patrick Lightbody on July 12, 2005 at 09:25 PM MDT #
Posted by moo on July 12, 2005 at 09:31 PM MDT #
moo:
Does any of these ring a bell : slashdot.org, flickr.com, yahoo.com, friendster.com, ...
(The latter even kicked out Java in favor of PHP!)
I heard several success stories of people dumping Java EE for LAMP, now I'd be really curious to see the same kind of case studies regarding migrations to Java EE or .NET...
Posted by Xavier on July 12, 2005 at 10:00 PM MDT #
Seems like you're beginning making the same transition I did, tell you what, come along to rubyconf and I'll buy you a few beers in return for your shout at apachecon.
As far as the other comments go, sure, rails doesn't have magic async document based messaging with global transactions and BPEL integration. I like that. It means I can't use rails build some horrendous EAI application which talks to hundreds of legacy applications. But you know what, that kind of development is horrible, soul destroying stuff. And it only represents a *tiny* fraction of the development market.
If most java developers were being honest with themselves they'd realise that 99% of apps don't need *any* of that crap. They want a database driven web application, and if you're using SOAP and JMS and distributed transactions to build it, you're wasting your clients' money.
Posted by Michael Koziarski on July 12, 2005 at 10:20 PM MDT #
That said...it is so incredibly frustrating to become familiar with one platform and set of contructs (e.g. appfuse/Java EE) only to have them forsaken for the new gadget with the shiny marketing scheme. It is quite ironic (as one of the CEO types) to be called on the carpet for going for those platforms that are "shiny" (i.e. .Net), when all the while the Java EE community can't make up its god-loving mind which glamorous tool it wants to use next.
Meanwhile we have a project like appfuse which not only has merit which I can easily pitch to my investors as possessing a robust scope for development, moreover it has a strong following. I have personally spent over two years becoming familiar and tracking the project. And now I have to worry that it might be abandoned for Ruby????? Arrrrggghhh!
And Java guys wonder why so many of us "CEO guys" choose .Net in the end. Believe me, it isn't because it's the best choice, sometimes it's the only choice. We want to know that our technology will be around as long as our business.
Posted by David Thompson on July 12, 2005 at 10:31 PM MDT #
Posted by Matt Raible on July 12, 2005 at 10:46 PM MDT #
Posted by Eelco on July 12, 2005 at 11:08 PM MDT #
But, it might be interesting that my rates aren't at all different between the Java work I do and the Rails work I do. And, I could probably hike my Rails rates right now into the stratosphere because there's a lot of demand for Rails work--more than there are supply of people who know what they are doing.
Posted by James Duncan Davidson on July 13, 2005 at 02:19 AM MDT #
It's taken a year to get the majority of our developers comfortable and familiar with Java, Struts, and iBatis. Unit testing and the like are still sinking in. Turning on a dime and switching over to Rails just isn't very viable. There was also a lot of help available getting developers up to speed on Struts and J2EE in general from structured classes to books to a few knowledgeable java developers we already had on staff. In the Ruby world that's just beginning and even our senior java developers would have to get up to speed.
I've heard people refer to the current fascination as 'Ruby Fanboys' as they rush to play with the shiny new toy. Still I'm I have somewhere on a todo list an item that says I should pick up Ruby as a new language maybe in the next year. I'm expecting mainly just to learn a new language and gain some insights into how another language handles similiar problems. If Ruby eventually develops into a larger solution with more market share I just might consider it down the line. My guess would be though it may very well fit into a niche like Python, another language I learned long ago, but rarely use today even though it does have a dedicated community.
Posted by Ed Gibbs on July 13, 2005 at 02:51 AM MDT #
Posted by Rick Hightower on July 13, 2005 at 09:31 AM MDT #
Why TF the Ruby monks don't get on the .NET crowd but loose our(java) time with their 'religion lessons' :).
Posted by Ahmed Mohombe on July 13, 2005 at 10:44 AM MDT #
Posted by ahmet on July 13, 2005 at 02:08 PM MDT #
1) People claim RoR is so great because it is easier for the developer, but you state that those "who know what they are doing" do not number many.
2) You state that you could hike your RoR rates into the stratosphere as a result of 1 - but the point of RoR is that BECAUSE it is so much easier and more productive for the developer, that development is CHEAPER.
That doesn't seem to be the case. It seems to be just another shiny object. I'm with Patrick - the Ruby langauge doesn't have the vast community and support, or even maturity that Java benefits from.
It seems that at the moment due to developers having to learn more "stuff" that development time will increase, product quality will decrease, and that you'd be better off sticking to what everybody already knows and uses (in this context, Java).
Using some templates in Eclipse or IDEA, I'm pretty sure your simple database backed CRUD applications could be built in the same amount of time as with RoR, with the added benefit of the enterprise scalability goodness.
Posted by Lee on July 13, 2005 at 04:19 PM MDT #
Posted by anon on July 14, 2005 at 04:41 AM MDT #
Also, since most Java IDEs are written in Java, they all have one big problem: they use a lot of memory. Don't deny it, I actually upgraded my computer's memory because it would get bogged down with both an IDE and Tomcat running. I would never want to program like that again.
Posted by Matt Moriarity on July 16, 2005 at 12:38 PM MDT #
Posted by Damian Harvey on July 17, 2005 at 01:00 AM MDT #
The questions we had to face:
1) Does it work?
2) Who will maintain?
3) Who will buy?
4) Will it match unpredicted environments?
5) Is it going to be here in 5 years?
Our topic here falls in question 4), still open with question 5); Java gives proved replies, as PHP or Python, while RoR still doesn't. The day it will, the scaling stuff will probably sound like a joke.
Posted by Luca on July 17, 2005 at 05:36 PM MDT #
Posted by David Thompson on July 25, 2005 at 07:00 PM MDT #
>probably choose Struts because there are thousands of Struts Developers.
I work for such a company and we are taking a serious look at Rails for an upcoming rewrite. We seem to be leaning that way right now and I'm certainly pushing it as hard as I can. I think I've gotten the team on board but the question for us now is whether or not we should rewrite in the first place. If we do chose to rewrite, I'm almost certain we'll chose Ruby on Rails.
Posted by Brian McQuay on August 11, 2005 at 04:54 PM MDT #
Posted by Thought Leadership on December 26, 2005 at 05:32 PM MST #