aspose file tools*
The moose likes Ruby and the fly likes Ruby - App Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Ruby - App Server" Watch "Ruby - App Server" New topic
Author

Ruby - App Server

Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Hi,

Which is the best App Server that Ruby comfortably sit and play well?

Mourougan


Mourougan
Open Source leads to Open Mind
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

anyone?


===Vyas Sanzgiri===
My Blog
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
I bet on GlassFish


SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Since Ruby is interpreted, you don't need an app server at all to run Ruby scripts. However, if you are building web-applications - you can go with:

Mongrel - the trusted standby
Glassfish - If you want to deploy onto the JVM
Webrick - For development it isn't a bad choice.
Cerise - follows J2EE patterns


Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Hmmm... interesting....

Thanks Vyas for activating my query
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

Important to know before I can convince the management
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Thats a good post ! Thanks Michael!


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Mongrel is a Web Server, not an App Server.
There is also Apache Web Server just like Mongrel for Ruby web applications.

Being a Java guy I am more inclined to Apache, but it seems Mongrel is more popular for Ruby specific web applications.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Himalay, fair enough.

Glassfish and Cerise are app servers, Mongrel, Webrick, and Apache are web-servers.

That said, you can use either web or app server in prod deploys of Rails apps, though for Ruby scripts - only the interpreter is needed.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

That said, Ruby can fit into both Web and App Servers? What if in case of application container specific stuff is packed into a Ruby based web application? Something similar to Java EE applications, we should go for an App Server then?
Riccardo Tacconi
Greenhorn

Joined: Jun 19, 2009
Posts: 6
I think that is implicit that if you deploy on the JVM you need to use JRuby not Ruby.

I will use Tomcat 6. I am not sure if I will develop with Ruby or JRuby, and at the time of the deployment I could switch from a Ruby project to a JRuby one only by copying the files.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
As mentioned by others already, you can deploy Ruby-based web applications on both a "native" Ruby platform or on the JVM.

For the former, the "classic" infrastructure was also mentioned already (Apache + Mongrel) but I'd like to add to that list a couple of web servers that seem to be popular: Thin, Nginx and Lighttpd. In addition to these, Phusion Passenger (an Apache module) has been gaining popularity.

On the JVM with JRuby, I'd probably go for Jetty rather than Glassfish. The main advantages of Jetty compared to Glassfish are that Jetty's a proven web container with good performance and Jetty can be easily embedded into your Java process, making it easy to write integration tests.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

That's great. Thanks Lasse!
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
I've heard a lot about Nginx, has anyone used it personally?
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

I have NOT yet
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Well, I touched base with a friend of mine who was trying to scale out a simple rails app, and test with something like 1000 concurrent users. Amazon offers a free 50/pay 50+ concurrent user test platform that he uses to get the appropriate count, but he was trying to get gzip compression and far-future expires headers set through Apache... and having a heck of a time.

Instead, he upgraded on his host (hostingRails), and intalled Nginx. Now, he's a pretty savvy Unix guy so keep that in mind. He said that his install, config, use of Nginx was fantastic. Not only did it run extremely fast compared to Apache... but he said most of the performance tweaks he was going for were already setup correctly. He's singing the praises of Nginx, and he's definitely colored me to take a better look.

Good suggestion Lasse!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ruby - App Server