Forum: Ruby on Rails Rails or Java J2EE (Spring, Struts Shale) - scalabilty

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael G. (Guest)
on 2006-01-19 22:40
(Received via mailing list)
Hi,

normally I am doing all my webprojects with PHP. But now I am planning
to use a framework, either Ruby On Rails, or Java in particular J2EE
with Java Spring, or Struts Shale.

Well, I already tried RoR a few month ago, so I am simply comparing it
to the Java alternatives now. My problem is, that maybe using Java for
my projects is like using a dredger to grub a small hole :) But on the
other hand I don't know, how heavily my next project will be used. Maybe
I have 50 requests per second, or only 50 requests per hour. I only have
one server for this project (1,5 GHz, 512 MB RAM) and I am not sure, if
ruby on rails can manage 50 requests per second. Any experiences?

I don't know, how Tomcat behaves compared to ruby on rails. Does anybody
know, which one scales better? Which one needs more Cpu Power, or memory
usage? PHP seems to use less memory, or cpu power compared to RoR. Or
would it be possible to run similar webapps like amazon, or ebay with
RoR? (Having enough server capacity assumed)

With Java it is possible to share the application on several servers (if
this case should occur). Is this possible with RoR too?

Greetings

Mike
Will B. (Guest)
on 2006-01-19 22:49
(Received via mailing list)
On 1/19/06, Michael G. <removed_email_address@domain.invalid> wrote:
> other hand I don't know, how heavily my next project will be used. Maybe
> I have 50 requests per second, or only 50 requests per hour. I only have
> one server for this project (1,5 GHz, 512 MB RAM) and I am not sure, if
> ruby on rails can manage 50 requests per second. Any experiences?


This all depends on what sort of work your app is doing.  The # of
requests
you can handle per second will vary so widely that without a better idea
of
what you're doing, it's almost impossible to say.

I don't know, how Tomcat behaves compared to ruby on rails. Does anybody
> know, which one scales better? Which one needs more Cpu Power, or memory
> usage? PHP seems to use less memory, or cpu power compared to RoR. Or
> would it be possible to run similar webapps like amazon, or ebay with
> RoR? (Having enough server capacity assumed)


With enough server capacity, RoR can scale quite well.  Raw performance
numbers are usually a bit lower than Java due to the fact that RoR is
interpreted, while Java is byte-compiled.  Ruby is not the language to
use
if you need to eke out every last bit of performance from a given piece
of
hardware.  With the price of hardware nowadays, this is almost never an
issue.

With Java it is possible to share the application on several servers (if
> this case should occur). Is this possible with RoR too?


Using FastCGI (maybe SCGI but I haven't looked into it),  you can
distribute
RoR apps w/ load balancing across many servers.

Greetings
Michael G. (Guest)
on 2006-01-19 23:56
(Received via mailing list)
Hi,

first thanks for your answer.

> This all depends on what sort of work your app is doing.  The # of
> requests you can handle per second will vary so widely that without a
> better idea of what you're doing, it's almost impossible to say.

Hm yeah this is right of course.
>
>
> With enough server capacity, RoR can scale quite well.  Raw
> performance numbers are usually a bit lower than Java due to the fact
> that RoR is interpreted, while Java is byte-compiled.  Ruby is not the
> language to use if you need to eke out every last bit of performance
> from a given piece of hardware.  With the price of hardware nowadays,
> this is almost never an issue.

Ok, but Ruby will have bytecode in the future too. So this is only a
disadvantage at the moment :) This will change I guess.

> Using FastCGI (maybe SCGI but I haven't looked into it),  you can
> distribute RoR apps w/ load balancing across many servers.

This sounds really nice. Thanks

Mike
Mike P. (Guest)
on 2006-01-19 23:59
(Received via mailing list)
Scalability is manageable. Code that is completely obtuse and verbose
and just plain ugly is not. Use Ruby.

Mike P.
Enterprise Java Developer
Michael G. (Guest)
on 2006-01-20 00:57
(Received via mailing list)
Hi,

you are working with JavaEE? Do you use it at work? And in your free
time RoR?

I've read some articles about the next version of struts, struts shale.
Have you ever heard about? Do you think, this will change the situation?
Or not?

Greetings

Mike
Theodore M. (Guest)
on 2006-01-20 01:27
(Received via mailing list)
I am a fulltime Java programmer but have recently switch to coding
rails at home. At work we spent a significant amount of time bringing
together and customizing Struts, Tiles, an ORM, Ant and JUnit into a
single cohesive package.

This was well before I knew anything about rails, and as you know,
rails comes with all this functionality built in and in a standardized
fashion to boot. Fairly depressing.

This means that comparing RoR to Struts (at least how Struts works
currently) is not adequate, because Struts does not contain a data
persistence layer, a pre-configured build process and a built-in
testing framework. All these pieces are scattered about various open
 source projects, albeit mostly of the Jakarta flavor.

Also Rails contains a more extensive "best-practices layer" in all its
components, meaning that it encourages you to write test cases and use
a automated build process from the start. You don't have to get
discouraged trying to set a test harness, it just runs.

Some Java project may pop up that mimics RoR, but I'm not aware of any
that are there yet and that don't use a godawful amount of XML in the
process. I am disallusion with Spring, at least for web projects. Some
PHP projects are around, but I haven't messed with them yet.

My 2 cents.

-Theo
Michael G. (Guest)
on 2006-01-20 01:57
(Received via mailing list)
Hi,

thanks for your answer. This helps me a little bit to decide.

Normally I would use RoR for home, because I am really fast in
developing with it.

But on the other hand: I would learn more with J2EE, because I don't
have any experiences in J2EE, Struts and Co. Maybe this is more useful,
than simply bringing a new webproject up and running, because the
project is only for myself and not for a customer.

Hm, difficult.

Greetings

Mike
Mike P. (Guest)
on 2006-01-20 02:00
(Received via mailing list)
Same on pretty much all counts here. I have done a lot in the Java
space and most of the really cool stuff happening around Java is just
attempts to make Java dynamic. To make Java more like Ruby by all
kinds of abstractions around Java Beans, etc.

It gets so that every 100 lines of Java starts to look like 10 lines
of Ruby just waiting to pop out.

I am hoping that Rails will free me from that misery soon.

Best,
Mike P.
This topic is locked and can not be replied to.