Develop with Pleasure, Deploy with Fun: NetBeans and GlassFish for a Better Rails Experience

Arun Gupta, GlassFish Guy Sun Microsystems, Inc.

What is GlassFish ?

What is GlassFish ?

GlassFish: It's a Community!

GlassFish: Lives on

Since 2005

GlassFish: Open Source and Enterprise Quality

GlassFish: Java EE 5 and 6 Reference Implementation

Java EE 5 Java EE 6

Commercially Supported Product: Sun GlassFish Enterprise Server

Enterprise Manager

Customer Advocate

eLearning Credit

Customer Focused Support Team GlassFish Open Source Application Server

24x7 Support

Sun VIP Interoperability Support

Patches & Upgrades

GlassFish v2

GlassFish v2: Web-based Administration

GlassFish v2: SOAP, REST, .NET interoperability

GlassFish v2: Clustering & Load Balancing

GlassFish v2: IDE support

GlassFish v3

GlassFish v3: Modular

GlassFish v3: Embeddable

GlassFish v3: Extensible

Why Rails on GlassFish ? - Agile

Why ? - Easy prototyping, yet powerful

Why ? - Best of both worlds

Why ? - A feature for every one: Database Connection Pooling

Why ? - A feature for every one: Management

Why ? - A feature for every one: Monitoring

Why ? - A feature for every one: Threading

Why ? - A feature for every one

Why ? - Improvements in JVM DL Compilers

Why ? - Deployment choices: Directory, WAR, Embedded


Directory-based deployment: How ?

jruby -S rails railsconf asadmin start-domain asadmin create-jvm-options -DJRUBY_HOME=... asadmin deploy railsconf

Directory-based deployment: Recipes


Rails on GlassFish: GlassFish Gem

GlassFish Gem: How ?

jruby -S rails railsconf

jruby -S gem install glassfish cd railsconf jruby -S glassfish

GlassFish Gem: Options

jruby -S glassfish -h -c: change the context root -e: environment -d: Runs as daemon -P: location of PID file -l: log file location -log-level: Logging level (0-7)

GlassFish Gem: Recipes


Not Just Rails ...

And more ...

Deployment Options

Rails on GlassFish: WAR Deployment


WAR Deployment: How ?

jruby -S gem install warbler jruby -S warble

WAR Deployment: How in NetBeans ?

WAR Deployment: Packaging

Rails on GlassFish: Update Center

NetBeans: Develop with Pleasure

Rails Monitoring
• Basic Monitoring
jinfo: System properties and VM CLI flags jmap: Shared object memory map jstack: Stack traces of Java threads jstat: Performance statistics on class, JIT compiler, GC, ...

• Advanced
- jconsole / Visual VM - NewRelic, FiveRuns, ...


Turning collaboration upside-down

A platform and ecosystem for Developers to: • Freely host open source projects and code • Connect, Communicate, Collaborate, and Code with peers • Eventually easily deploy applications/services to “clouds” •

Look like the best deploying option I ever found for Rails, GREAT!

had no reliability and performance issues with Glassfish money is on JRuby (and Glassfish) for the long haul; if you haven't checked out Glassfish yet, you're doing yourself a disservice!

nice way to deploy and manage my app while leaving things open for scaling the easiest rails stack in the world, jruby 1.2rc, rails 2.3rc, glassfish v3 ... too easy to run jruby/rack/ glassfish behind nginx

leading the way to simple, scalable, no-hassle hosting for Ruby web applications. ... it's true one-step deployment.

Who loves Rails on GlassFish ?

JRuby, Rails, and GlassFish Bootcamp May 19/20, San Francisco

• • • • •

Sign up to vote on this title
UsefulNot useful