develop with pleasure deploy with fun glass fish and net beans 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: railsconf

Post on 16-May-2015

1.841 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

What is GlassFish ?

dkimages.com

Page 3: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

What is GlassFish ?

Page 4: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish: It's a Community!

Page 5: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish: Lives on java.net

Since 2005

Page 6: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish: Open Source and Enterprise Quality

Page 7: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish: Java EE 5 and 6 Reference Implementation

Java EE 5Java EE 6

Page 8: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v2

Page 10: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v2: Web-based Administration

Page 11: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v2: SOAP, REST, .NET interoperability

Page 12: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v2: Clustering & Load Balancing

Page 13: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v2: IDE support

Page 14: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v3

Page 15: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v3: Modular

Page 16: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v3: Embeddable

Page 17: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish v3: Extensible

Page 18: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why Rails on GlassFish ? - Agile

Page 19: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - Easy prototyping, yet powerful

Page 20: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - Best of both worlds

Page 21: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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

Page 22: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - A feature for every one: Management

Page 23: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - A feature for every one: Monitoring

Page 24: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - A feature for every one: Threading

Page 25: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - A feature for every one

Page 26: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - Improvements in JVM DL Compilers

Page 27: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Why ? - Deployment choices: Directory, WAR, Embedded

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

Page 28: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

Directory-based deployment: Recipes

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

Page 30: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Rails on GlassFish: GlassFish Gem

Page 31: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

GlassFish Gem: Recipes

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

Page 34: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

And more ...

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

Page 36: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

Rails on GlassFish: WAR Deployment

Credits: http://birdwatchersdigest.com

Page 38: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

WAR Deployment: How in NetBeans ?

Page 40: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

WAR Deployment: Packaging

Page 41: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Rails on GlassFish: Update Center

Page 42: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

NetBeans: Develop with Pleasure

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

Page 43: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

jConsole

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

Page 45: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation
Page 46: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation
Page 47: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation
Page 48: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

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  Glass Fish And Net Beans For A Better Rails Experience Presentation

Who loves Rails on GlassFish ?

Page 51: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

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

railscamp.eventbrite.com

Page 52: Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better Rails Experience Presentation

Resources

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