InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

JRuby brings Rails applications to Glassfish

Posted by Rob Thornton on Nov 20, 2006

Sections
Development
Topics
Dynamic Languages ,
Java ,
Ruby
Tags
Ruby on Rails ,
JRuby ,
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.

WAR-based deployment *will* happen by Charles Nutter Posted
A bit like PHP in Oracle Application Server by paul browne Posted
New screencast showing first JRuby app using NetBeans by Arun Gupta Posted
  1. Back to top

    WAR-based deployment *will* happen

    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

    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. Back to top

    New screencast showing first JRuby app using NetBeans

    by Arun Gupta

    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

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.