develop with pleasure, deploy with fun: glassfish and netbeans for a better rails experience

52
Develop with Pleasure, Deploy with Fun: NetBeans and GlassFish for a Better Rails Experience Arun Gupta, GlassFish Guy http://blogs.sun.com/arungupta Sun Microsystems, Inc.

Upload: best-tech-videos

Post on 10-Apr-2015

420 views

Category:

Documents


2 download

DESCRIPTION

This session provides all the details on how GlassFish, and NetBeans provide a fun and robust development, deployment, and management platform for Rails applications – without pain. It talks about performance tuning tips, scalability guide, capistrano recipes, monitoring guidelines and much more - all without using Java code.

TRANSCRIPT

Page 1: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

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

Arun Gupta, GlassFish Guyhttp://blogs.sun.com/arunguptaSun Microsystems, Inc.

Page 2: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

What is GlassFish ?

dkimages.com

Page 3: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

What is GlassFish ?

Page 4: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish: It's a Community!

Page 5: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish: Lives on java.net

Since 2005

Page 6: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish: Open Source and Enterprise Quality

Page 7: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish: Java EE 5 and 6 Reference Implementation

Java EE 5Java EE 6

Page 8: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Commercially Supported Product: Sun GlassFish Enterprise Server

Customer FocusedCustomer FocusedSupport TeamSupport Team

Patches &Patches &UpgradesUpgrades

24x7 Support24x7 Support

CustomerCustomerAdvocateAdvocate

Sun VIPSun VIPInteroperabilityInteroperabilitySupportSupport

GlassFishGlassFishOpen SourceOpen SourceApplication ServerApplication Server

Enterprise ManagerEnterprise Manager

eLearningeLearningCreditCredit

Page 9: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v2

Page 10: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v2: Web-based Administration

Page 11: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v2: SOAP, REST, .NET interoperability

Page 12: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v2: Clustering & Load Balancing

Page 13: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v2: IDE support

Page 14: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v3

Page 15: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v3: Modular

Page 16: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v3: Embeddable

Page 17: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish v3: Extensible

Page 18: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why Rails on GlassFish ? - Agile

Page 19: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - Easy prototyping, yet powerful

Page 20: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - Best of both worlds

Page 21: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

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

Page 22: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - A feature for every one: Management

Page 23: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - A feature for every one: Monitoring

Page 24: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - A feature for every one: Threading

Page 25: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - A feature for every one

Page 26: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - Improvements in JVM DL Compilers

Page 27: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Why ? - Deployment choices: Directory, WAR, Embedded

Credits: http://www.flickr.com/photos/bostonbrahmin/177442308/

Page 28: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Directory-based deployment: How ?

jruby -S rails railsconf

asadmin start-domainasadmin create-jvm-options -DJRUBY_HOME=...asadmin deploy railsconf

Page 29: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Directory-based deployment: Recipes

Credits: http://blogs.sun.com/Jacobkessler/entry/capistrano_and_glassfish

Page 30: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Rails on GlassFish: GlassFish Gem

Page 31: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish Gem: How ?

jruby -S gem install glassfishcd railsconfjruby -S glassfish

jruby -S rails railsconf

http://blogs.sun.com/arungupta/entry/totd_70_jruby_and_glassfish

Page 32: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

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)

Page 33: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

GlassFish Gem: Recipes

Credits: http://blogs.sun.com/Jacobkessler/entry/capistrano_and_glassfish_now_with

Page 34: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Not Just Rails ...

http://blogs.sun.com/arungupta/entry/totd_53_scaffold_in_merbhttp://blogs.sun.com/arungupta/entry/totd_80_sinatra_crud_application

Page 35: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

And more ...

http://weblogs.java.net/blog/vivekp/archive/2009/04/plugin_any_ruby.html

Page 36: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Deployment Options

http://blogs.sun.com/arungupta/entry/totd_81_how_to_usehttp://blog.headius.com/2009/04/apache-jruby-rails-glassfish-easy.html

Page 37: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Rails on GlassFish: WAR Deployment

Credits: http://birdwatchersdigest.com

Page 38: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

WAR Deployment: How ?

jruby -S gem install warblerjruby -S warble

http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassfish

Page 39: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

WAR Deployment: How in NetBeans ?

Page 40: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

WAR Deployment: Packaging

Page 41: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Rails on GlassFish: Update Center

Page 42: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

NetBeans: Develop with Pleasure

http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug

Page 43: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

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, ...

Page 44: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

jConsole

http://blogs.sun.com/arungupta/tags/rubyonrails+jmx

Page 45: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience
Page 46: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience
Page 47: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience
Page 48: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Turning collaboration upside-down

A platform and ecosystemfor Developers to:• Freely host open source

projects and code• Connect, Communicate,

Collaborate, and Code with peers

• Eventually easily deploy applications/services to “clouds”

• http://kenai.com

Page 49: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Endorsements

Look like the best deploying option I ever

found for Rails, GREAT!

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.

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

Page 50: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Who loves Rails on GlassFish ?

Page 51: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

JRuby, Rails, and GlassFish BootcampMay 19/20, San Francisco

railscamp.eventbrite.com

Page 52: Develop with pleasure, Deploy with Fun: GlassFish and NetBeans for a better Rails experience

Resources

• glassfish.org• blogs.sun.com/theaquarium• glassfish-scripting.dev.java.net• wiki.glassfish.java.net/Wiki.jsp?page=JRuby• blogs.sun.com/arungupta