InfoQ

News

JRuby brings Rails applications to Glassfish

Posted by Rob Thornton on Nov 20, 2006

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

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.

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:

    blogs.sun.com/arungupta/entry/screencast_web6_f...

    This entry also shows how the Rails app can be deployed as WAR on GlassFish.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.