Hi, This is my first mailing list submission. I work for an e-learning company with over a million active online users. We have an online learning environment that is creaking along. The company is planning a big overhaul, rebuilding the learning environment in Java/J2EE. Even though I''m not involved in the project I walked over to the head of IT at the company conference and said "I heard you''re prototyping...". Several questions followed that I couldn''t really answer: 1. How scalable is rails? Could we support a million users? 2. How much code does the framework produce -- i.e. would it have a larger code footprint than any other framework? 3. Would a Rails system be faster than a Java-based system? Thanks, Max
> 1. How scalable is rails? Could we support a million users?As long as your hardware and network can. And I''m not saying to be a smart-ass, it''s just that having even done big sites 10 years ago in things like perl, I just don''t think the language ("scripting" language that is) is the most important thing.> 2. How much code does the framework produce -- i.e. would it have a > larger code footprint than any other framework?It tends to have less code than java stuff> 3. Would a Rails system be faster than a Java-based system?Depends. - Jason
Short answers for generalised questions: Max Mitchell wrote:> 1. How scalable is rails? Could we support a million users?Yes.> 2. How much code does the framework produce -- i.e. would it have a > larger code footprint than any other framework?Less.> 3. Would a Rails system be faster than a Java-based system?Maybe, maybe not. Some longer answers: In general it''s very difficult to answer these questions, because they''re very loosely defined. To take question 1, "Could we support a million users..." doing *what*, exactly? Viewing cached static pages? The bottleneck wouldn''t be Rails, or any sensible framework. Doing realtime audio encoding in Ruby? Unlikely. You haven''t specified what typical tasks are in an ''online learning environment''. Supporting a million users could be as simple as storing their names and ID''s, or as complex as a real-time messaging system between all of them... However, the short answer is ''yes'' because you can just duplicate Rails boxes as much as you like, as long as whatever database backend you''re using can cope. Question 2 is easy - there''s simply less code the Rails way. Google for ''Rails LOC'' and the first link should be evidence enough. Also check http://www.relevancellc.com/blogs/?p=31 for another perspective. Question 3 comes back to the first point... Faster at what, exactly? Or do you mean processor load for equivalent processes? Do you mean developer load per task? -- Alex
Max Mitchell wrote:> Several questions followed that I couldn''t really answer: > > 1. How scalable is rails? Could we support a million users? > 2. How much code does the framework produce -- i.e. would it have a > larger code footprint than any other framework? > 3. Would a Rails system be faster than a Java-based system?This question keeps popping up and I think the answer is no one knows for sure at the moment (or they are keeping quiet if they do). No one wants to stick their head on the block and say "Yes and you can sue me (and recoup your losses) if I''m wrong". What we need is for: a) Someone with a vested interest in rails undertakes a paid for study and comes out saying "Yes it''s X times better than Java and our study of this one project proves it". People can then point at the study and say "they said it''s OK" as justification in case things go wrong. b) Someone sticks their neck out on a large project and is allowed to speak about the outcome. This requires a certain amount of recklessness and a bet the farm kind of scenario where a company with a variety of Java experience suddenly decides to do its next big project in Ruby on Rails and tackle the problems as they come. Of course, if for whatever reason things went wrong we somehow still need to be able to hear about it. If things go right we still need them to talk about all aspects of the outcome and not keep it to themselves as some sort of internal secret / competitive advantage. What is less useful is someone new saying "Rails worked for us" because that doesn''t tell you anything about its worth compared to Java (other than it can work if you have no prior experience/investment). This search will hopefully help you find other posts asking the same thing: http://search.gmane.org/?query=java+scale&email=&group=gmane.comp.lang.ruby.rails&sort=date&DEFAULTOP=and&xP=java.scale.&xFILTERS=Gcomp.lang.ruby.rails---A If you find any highlights link them into one post to make it easier for the next person.
> 1. How scalable is rails? Could we support a million users?Think about the way Rails "scales". You can physically seperate your database, application and web servers. In short, this means you can load balance requests coming into your web server, load balance requests from your web servers to your application servers, and send your database queries to your database cluster. Then there are tools like memcached (http://www.danga.com/memcached/) to make things even more efficient. When you have a setup like that, it''s not so much "can Rails scale" but rather, can my infrastructure (hardware and network, like Jason said) handle it? In the end, it comes down to adding enough hardware, having a network that can handle it, and the technical resources and expertise to manage the whole setup. Ben
On 10/21/05, Max Mitchell <max.mitchell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 2. How much code does the framework produce -- i.e. would it have a > larger code footprint than any other framework?Do you mean the code behind Rails or the code needed for _your_ project. If it''s the latter, figures like 5x smaller dan Java/J2EE are mentioned. I really never did hear anyone claiming the code needed for a project in Rails is larger then with another framework, especcially because you don''t need to configure the defaults... Jaap
Alex Young wrote:>>2. How much code does the framework produce -- i.e. would it have a >>larger code footprint than any other framework? >> >>I''ve been researching this issue for a technology white paper on Rails, and my conclusion is that a Rails app doing what Rails is targeted at would be 3 to 5 times smaller in terms of lines count (for whatever this metric is worth) than a functionally similar app in Java. One caveat is that I''m not counting HTML templates (app/views/** in Rails). Best regards, Alexey Verkhovsky