InfoQ

News

JRuby brings Rails applications to Glassfish

Posted by Rob Thornton on Nov 20, 2006 01:27 PM

Community
Java,
Ruby
Topics
Dynamic Languages
Tags
JRuby,
Ruby on Rails,
Glassfish

It is now possible to deploy Ruby on Rails applications on Glassfish. Utilizing JRuby and its growing support for Rails, Glassfish can now be used as a production platform, allowing a more robust and scalable deployment platform.

Previously, Rails applications were deployed using multiple processes of Mongrel, which required managing all of them, and handling zombie processes. Now, Takai Naoto has detailed the steps to deploying a JRuby on Rails application in Glassfish. Charles Nutter, one of the JRuby leads, describes the benefits of this approach:

The potential here should be obvious. GlassFish, like other Java EE application servers, is extremely good at scaling up many concurrent requests across many independent applications; so good that many organizations deploy only a single appserver-per-machine and stuff it full of applications to serve. That means a single server, a single process to manage. GlassFish also supports clustering, which means you'll be able to hit the deploy button once and have your n-server cluster instantly start serving up Rails. But there's one last area that trumps all the rest:

That single app server can handle as many concurrent requests across as many independent Rails apps as you desire, scaling them across all the CPU cores you can throw at it.

There are some drawbacks to this solution, namely the deployment process. Robert Cooper describes how this loses all the benefits of WAR packaging. He points out that the Java tools are very good and while it is good to have Rails applications running in Glassfish, it should be done in such a way to leverage the existing tools.

3 comments

Reply

WAR-based deployment *will* happen by Charles Nutter Posted Nov 21, 2006 3:15 AM
A bit like PHP in Oracle Application Server by paul browne Posted Nov 24, 2006 7:16 AM
New screencast showing first JRuby app using NetBeans by Arun Gupta Posted Aug 8, 2007 8:42 PM
  1. Back to top

    WAR-based deployment *will* happen

    Nov 21, 2006 3:15 AM by Charles Nutter

    What Cooper fails to understand is that WAR-based deployment *is* the ultimate goal. We've been looking at the problem a lot lately, and by my estimation no Rails appserver deployment model will be complete until there's support for bundling your entire app as a WAR file and deploying it like a standard Java webapp. It may not be here today...but we like to think we're moving pretty quickly. It will be here "tomorrow".

  2. Back to top

    A bit like PHP in Oracle Application Server

    Nov 24, 2006 7:16 AM by paul browne

    JRuby in Glassfish is a bit like PHP in Oracle Application Server. Both allow you to use a non-Java language for rapid Web development, while having a Java 'core' to your application to ensure maintainability. Paul , Technology in Plain English

  3. I released a screencast this morning that shows how you develop your first JRuby app using NetBeans IDE at: http://blogs.sun.com/arungupta/entry/screencast_web6_first_jruby_app This entry also shows how the Rails app can be deployed as WAR on GlassFish.

Exclusive Content

Rob Windsor on WCF with REST, JSON and RSS

WCF is not just for SOAP based services and can be used with popular protocols like RSS, REST and JSON. Join Rob Windsor as he introduces WCF 3.5 and its new native support for non-SOAP services.

Christophe Coenraets Discusses Flex 3, AIR, and BlazeDS

Christophe Coenraets discusses Flex 3, Flex Builder, AIR, BlazeDS, Adobe and open source, integrating Flex with existing applications, and integrating RIAs with search engines and browsers.

Debunking Common Refactoring Misconceptions

Danijel Arsenovski attempts to dispel some of the myths around refactoring and how it applies to .NET developers.

REST Eye for the SOA Guy

In this presentation, recorded at QCon San Francisco, CORBA guru Steve Vinoski explains REST from the view of someone who comes to SOA from a traditional, RPC-oriented background.

Choose Feature Teams over Component Teams for Agility

Feature teams are key to scaling agility for large teams. In an excerpt from "Scaling Lean and Agile Development," Larman & Vodde show how feature teams resolve traditional problems & raise new issues

Billy Newport explains Virtualization

Billy Newport talks about virtualization, eXtreme Transaction Processing (XTP) and WebSphere Virtual Enterprise. He discusses hardware, hypervisor, JVM, application and data virtualization.

Virtualization and Security

While virtualization provides many benefits, security can not be a forgotten concept in its application.

Introduction to Agile for Traditional Project Managers

This session is specifically aimed at traditionally trained project managers who are new to Agile, and who would like to be able to relate the PMI's best practices to their Agile equivalents.