SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
Dynamic Languages & Web
           Frameworks in GlassFish v3




Arun Gupta (blogs.sun.com/arungupta, @arungupta)
Sun Microsystems, Inc.
What is a Dynamic Language ?
   Broadly a language that allows a program to change its
    own code at runtime
     −   Evaluate data as code ("The name is: #{@name}" )
     −   Manipulate code as data ({"name"=>"Duke"}.each {|data| puts data})
     −   High order functions
     −   Dynamic Typing
     −   Closures, Continuations, Macros, ...
   Simple, human-readable syntax
   List, Ruby, Python, Groovy, ...
Web Frameworks
   Full-stack
     −   Object relational mapping
     −   MVC-pattern
     −   Templating
     −   JavaScript library
     −   Extension points
   Agile Development
     −   No compile, redeploy, restart cycles
     −   Testing built into the framework
Design Principles
   Convention over Configuration (CoC)
    −   Common cases easily served
    −   Encourages standard practices
    −   Everything simpler and smaller
   Don't Repeat Yourself (DRY)
    −   Framework written around minimizing repetition
What is GlassFish ?
   A community
    −   Users, Partners, Testers, Developers, ...
    −   Started in 2005 on java.net
   Application Server
    −   Enterprise Quality and Open Source
    −   Java EE Reference Implementation
    −   Full Commercial Support from Sun
Sun GlassFish Enterprise Server
                         Enterprise Manager



              Customer
              Advocate                         eLearning
                                               Credit



Customer Focused                                     24x7 Support
Support Team


                          GlassFish
   Sun VIP
                          Open Source
   Interoperability                                   Patches &
                          Application Server
   Support                                            Upgrades
                                                                    6
GlassFish v3
   Modular:
    −   Maven 2 – Build & Module description
    −   Felix – OSGi runtime (216 bundles)
    −   Allow any type of Container to be plugged
            Start Container and Services on demand
   Embeddable: runs in-VM
   Extensible
    −   Rails, Grails, Django, ...
                                                      7
GlassFish v3 Architecture
Grails                    Security    Config
          Rails
  Web                     Naming     Injection


              GlassFish Kernel


            Grizzly        HK2 Services        requests

                          OSGi Runtime
Bundles Repositories                           services
                                                   8
Dynamic Languages & Frameworks




http://glassfish-scripting.dev.java.net
                                          9
What is                                     ?
   Ruby interpreter written in Java
   Current Version: 1.4.0
   Ruby 1.8.6 compatible
   Some Ruby 1.9 support
    −   --1.9 flag
    −   80% of 1.9.1
   9 Active committers

http://jruby.kenai.com/presentations/JRubyConf%2009%20Keynote.pdf
Compatibility
   ~37,000 passing rubyspecs
   ~22,000 passing assertions
   Continuous Integration
    −   On commit ~3 Java versions * 4 vendors
    −   Nightly: 30 minute “full” run
   Solid performance ( Ruby 1.9)
    −   Startup is poor, execution usually better than 1.9
   Runs native threads
   Foreign Function Interface (FFI) for C
    libraries
   Runs Rails great!
What is              ?
   Full-stack Web development MVC
    framework in Ruby
   Current Version: Rails 2.3.4
   Getting Started
    −   Install Rails: “jruby -S gem install rails”
    −   Generate Rails app: “jruby -S rails helloworld”
Rails Deployment Choices




              Credits: http://birdwatchersdigest.com

                                                       14
Directory-based Deployment: How ?

jruby -S rails helloworld


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


                                        15
Directory-based: Capistrano Recipes




       http://wiki.glassfish.java.net/Wiki.jsp?page=DeployUsingCapsitrano   16
Rails Development using
         NetBeans 6.8




http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug
                                                                       17
Rails Deployment: GlassFish Gem




                              18
GlassFish Gem: How ?

jruby -S rails helloworld


jruby -S gem install glassfish
cd helloworld
jruby -S glassfish


                                 19
Single Threaded Rails < v 2.2




                                20
Multi Threaded Rails or Merb or ...




                                  21
GlassFish Gem: Capistrano Recipes




      http://wiki.glassfish.java.net/Wiki.jsp?page=DeployUsingCapsitrano   22
GlassFish Gem Options
jruby -S glassfish -h

-n: Number of JRuby runtimes to create initially
--runtimes-min: Minimum runtimes
--runtimes-max: Maximum runtimes
-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)
                                                   23
Demo
GlassFish Gem




http://blogs.sun.com/arungupta/entry/totd_76_jruby_1_2
                                                         24
GlassFish Gem in Production
Easy, green deployment



 −Reverse proxy not required
 −JRuby runtime pool provides required scaling
        Rails is single threaded by default
    −MT   frameworks scales automatically
     JRuby and JVM support native threads
Configuration using “glassfish.yml”



                                               25
Optional front-ending




http://blogs.sun.com/arungupta/entry/totd_81_how_to_use
http://blogs.sun.com/arungupta/entry/totd_84_using_apache_mod
                                                                26
Rails Deployment: WAR-based




                              27
WAR-based: How ?

jruby -S rails helloworld


jruby -S gem install warbler
cd helloworld
  jruby warble config
  Edit “config/warble.rb”
    Include gems, Change RAILS_ENV
jruby warble
asadmin deploy helloworld.war        28
WAR Deployment: Packaging
Demo
WAR-based Deployment




http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassfish
                                                                   30
JRuby Module on
GlassFish Update Center
Ruby Rack Support
   A Ruby Web server interface
   Plugin any Rack compliant framework
    −   Rails, Merb, Sinatra, Ramaze, Campsite, ...
   Rack support in GlassFish
    −   GlassFish Gem
             Plugin any Rack metal (such as RackCache)
    −   GlassFish v2 & v3 through Warbler
   Use your own framework
    −   Rackup script
    −   jruby.applicationType property
                                                          32
Ruby Application Auto-detection




                                  33
Performance
   Need JVM tuning for production
     −Use   Server profile where possible (-server)
   GC settings
     −   -XX:+DisableExplicitGC, -XX:NewRatio=2
   Memory settings
     −Use large settings for -Xmx -Xms and
     -XX:MaxPermSize
     −Use  at least 20 MB perm gen space for each JRuby
     runtime
                                                          34
Scaling
 Rails is single-threaded by default
 Setup JRuby runtime pool


     −With      gem
           glassfish -n 3 –runtime-min 2 –runtime-max 4
 2 HTTP Worker Threads per runtime
 Turn on file caching


     −   network-config>protocols>protocol>http>file-cache#enabled
   MT frameworks (Rails > 2.2, Merb)
     −No       configuration needed
                                                                     35
Rails Monitoring
   Basic Monitoring
    −   jinfo: System properties and VM CLI flags
    −   jmap: Shared object memory map
    −   jstack: Stack traces of Java threads
    −   jstat: Performance stats on class, JIT compiler, GC
   Advanced
    −   jconsole / Visual VM
    −   NewRelic, FiveRuns, ...
Rails Monitoring in GlassFish v3
   asadmin enable-monitoring –level jruby-
    container=HIGH
   asadmin list –monitor=true “*”
   asadmin list –monitor=true “*jruby*”
   asadmin list-probes | grep jruby
   dtrace or JavScript-based monitoring

http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring
Endorsements
                          had no reliability and
                           performance issues
                              with Glassfish     money is on JRuby (and
   Look like the best                            Glassfish) for the long
deploying option I ever                            haul; if you haven't
found for Rails, GREAT!                           checked out Glassfish
                       nice way to deploy and yet, you're doing yourself
                        manage my app while           a disservice!
                      leaving things open for
                               scaling
    the easiest rails stack
 in the world, jruby 1.2rc, rails          leading the way to simple,
       2.3rc, glassfish v3              scalable, no-hassle hosting for
                ...                           Ruby web applications.
  too easy to run jruby/rack/                           ...
     glassfish behind nginx              it's true one-step deployment.
Who loves Rails on GlassFish ?
What is                    ?
   Agile dynamic language for the JVM
   Seamlessly integrates with all existing Java
    objects & libraries
    −   Compiles straight to bytecode
   Current version: 1.6.7
   groovy -e "println 'Hello ' + args[0]" World
What is                    ?
   MVC Web framework for the Java platform
    −   Persistence framework (Hibernate)
    −   Templating using GSP (Groovy Server Pages)
    −   Tag libraries to create web page components
    −   Good Ajax support
    −   Web server & automatic resources reload
   Current Version: 1.1.2, 1.2 RC1 released 12/5
Grails “Hello World”
●   Create app: “grails create-app bookstore”
    ● Create domain class: “grails create-domain-class
     book”
    ● Edit “grails-app/domain/Book.groovy” and add

     attributes
    ● Create controller: “grails create-controller Book”


    ● Edit “grails-app/controllers/BookController.groovy”


    ● Add scaffold: “def scaffold = Book”


●   Run app: “grails run-app”
Grails on GlassFish App Server
● Create WAR: “grails war”
● Deploy: “asadmin deploy helloworld-0.1.war”
Demo
Grails & GlassFish




http://blogs.sun.com/arungupta/entry/getting_started_with_grails_on
http://blogs.sun.com/arungupta/entry/totd_75_getting_started_with
http://blogs.sun.com/arungupta/entry/grails_on_glassfish_v3_embedded
http://blogs.sun.com/arungupta/entry/tic_tac_toe_using_rails
                                                                       45
Grails Module on
GlassFish Update Center
Efficient Deployment

Grails Application WAR



    −Large
      Over 48 Grails dependent JARs
      ~20MB for a simple app
    −Expensive   to bundle in single WAR
    −Issues   when hot deployment is required

                                                47
GlassFish proposes light-weight WAR
 Don't package dependencies!
 Smaller WAR file: ~200KB vs ~20MB


 GlassFish knows how to find dependencies


 Only one copy of dependencies in GlassFish


     −Less   memory consumption and deployment speed-up
  $ grails shared-war
 With Grails 1.1 use –nojars option
  $ asadmin deploy helloworld-0.1.war
                                                      48
GlassFish/Grails: Coming up ...
   Use “grails –nojars”
     − JIRA-5174, JIRA-5175

“grails install-plugin glassfish –global”



     − grails run-app
   “asadmin deploy grailsApp”



                                            49
50
What is               ?
Implementation of Python in Java
   −Seamless integration of Python and Java
   −Java <==> Python
   −Just Python
   −Dynamic compilation to Java bytecodes
Jython 2.5.1 released (Sep 2009)


Works with Django 1.0

                                              51
What is                    ?
   MVC-based framework written in Python
     −   Object-relational mapper
     −   A lightweight, standalone Web server
     −   A regular expression based URL dispatcher
     −   A templating system
     −   A caching framework
     −   An internationalization system
     −   ...
                                                     52
GlassFish Deployment
Deploy as WAR



    −Modjy
         Servlet, ServletContextListener + WSGI Implementation
         Integrated with Jython 2.5
Pure Django Deployment



    −Grizzly   + WSGI => Django
    −No    WAR, no packaging
    −asadmin     deploy myDjangoApp
                                                             53
How does it work ?

 Download Jython
 Install Django (jython25 setup.py install)


 GlassFish v3 Jython OSGi module from UC


 asadmin create-jvm-options -Djython.home=...


 cd DjangoApp


 asadmin deploy .



                                            54
Jython Module on
GlassFish Update Center
Demo
Django & GlassFish




http://blogs.sun.com/arungupta/entry/totd_85_getting_started_with
                                                                    56
http://blogs.sun.com/arungupta/entry/tic_tac_toe_using_rails
                                                               57
Java EE & Dynamic Languages
JavaEE is a mature and robust platform



    −Servlet,   EJB, JMS, JAX-RS, JAX-WS...
Hybrid Rails and Servlet/JSP application



    −Forward    to and from Rails to Servlet/JSP
    −HTTPSession     as Rails session
    −ServletRequest/Response     API available to Rails
JDBC connection pool
JMS: Async messaging in Rails

                                                          58
Servlet 3.0 Pluggability
   JavaEE 6 and Dynamic Languages
     − No boilerplate web.xml
     −Dynamically add ServletFilter and
     ServletContextListener
   Simple packaging
     −No need to package as WAR, No Warbler
     −Place application inside WEB-INF directory

                                               59
References
   glassfish.org
   glassfish-scripting.dev.java.net
   sun.com/glassfish
   blogs.sun.com/theaquarium
   twitter.com/glassfish
   glassfish@sun.com
Dynamic Languages & Web
           Frameworks in GlassFish v3




Arun Gupta (blogs.sun.com/arungupta, @arungupta)
Sun Microsystems, Inc.

Mais conteúdo relacionado

Mais procurados

Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionOvidiu Dimulescu
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Arun Gupta
 
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVMDiagnosing Your Application on the JVM
Diagnosing Your Application on the JVMStaffan Larsen
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST ServicesRob Tweed
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?Ovidiu Dimulescu
 
Java & containers: What I wish I knew before I used it | DevNation Tech Talk
Java & containers: What I wish I knew before I used it | DevNation Tech TalkJava & containers: What I wish I knew before I used it | DevNation Tech Talk
Java & containers: What I wish I knew before I used it | DevNation Tech TalkRed Hat Developers
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGYuji Kubota
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SEdogangoko
 
WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the UnionDimitris Andreadis
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle TierRob Tweed
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Arun Gupta
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooRob Tweed
 
Turn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmTurn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmDimitris Andreadis
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Securityamiable_indian
 

Mais procurados (20)

Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java edition
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
 
OpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOFOpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOF
 
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVMDiagnosing Your Application on the JVM
Diagnosing Your Application on the JVM
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?
 
Java & containers: What I wish I knew before I used it | DevNation Tech Talk
Java & containers: What I wish I knew before I used it | DevNation Tech TalkJava & containers: What I wish I knew before I used it | DevNation Tech Talk
Java & containers: What I wish I knew before I used it | DevNation Tech Talk
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUG
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09
 
WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the Union
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
Ts 2992
Ts 2992Ts 2992
Ts 2992
 
Java 9 new features
Java 9 new featuresJava 9 new features
Java 9 new features
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
Turn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmTurn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly Swarm
 
GraalVm and Quarkus
GraalVm and QuarkusGraalVm and Quarkus
GraalVm and Quarkus
 
Ruby on Rails Security
Ruby on Rails SecurityRuby on Rails Security
Ruby on Rails Security
 

Semelhante a Dynamic Languages & Web Frameworks in GlassFish

GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?Arun Gupta
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta ThoughtWorks
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...railsconf
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionEduardo Pelegri-Llopart
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudArun Gupta
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the CloudArun Gupta
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Arun Gupta
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudArun Gupta
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudArun Gupta
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Arun Gupta
 
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Arun Gupta
 
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudJavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudArun Gupta
 
Running your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudRunning your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudArun Gupta
 
Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01MindTree Ltd
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Arun Gupta
 
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...Arun Gupta
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
Scripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeScripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeEduardo Pelegri-Llopart
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaKeith Bennett
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 

Semelhante a Dynamic Languages & Web Frameworks in GlassFish (20)

GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full Version
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the Cloud
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the Cloud
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds
 
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
 
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudJavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
 
Running your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudRunning your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloud
 
Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Scripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeScripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 Prelude
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-java
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 

Mais de IndicThreads

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs itIndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsIndicThreads
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayIndicThreads
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices IndicThreads
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreadsIndicThreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreadsIndicThreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingIndicThreads
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreadsIndicThreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprisesIndicThreads
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIndicThreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present FutureIndicThreads
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameIndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceIndicThreads
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java CarputerIndicThreads
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache SparkIndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & DockerIndicThreads
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackIndicThreads
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack CloudsIndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!IndicThreads
 

Mais de IndicThreads (20)

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before Reacting
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprises
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fame
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads Conference
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedback
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Dynamic Languages & Web Frameworks in GlassFish

  • 1. Dynamic Languages & Web Frameworks in GlassFish v3 Arun Gupta (blogs.sun.com/arungupta, @arungupta) Sun Microsystems, Inc.
  • 2. What is a Dynamic Language ?  Broadly a language that allows a program to change its own code at runtime − Evaluate data as code ("The name is: #{@name}" ) − Manipulate code as data ({"name"=>"Duke"}.each {|data| puts data}) − High order functions − Dynamic Typing − Closures, Continuations, Macros, ...  Simple, human-readable syntax  List, Ruby, Python, Groovy, ...
  • 3. Web Frameworks  Full-stack − Object relational mapping − MVC-pattern − Templating − JavaScript library − Extension points  Agile Development − No compile, redeploy, restart cycles − Testing built into the framework
  • 4. Design Principles  Convention over Configuration (CoC) − Common cases easily served − Encourages standard practices − Everything simpler and smaller  Don't Repeat Yourself (DRY) − Framework written around minimizing repetition
  • 5. What is GlassFish ?  A community − Users, Partners, Testers, Developers, ... − Started in 2005 on java.net  Application Server − Enterprise Quality and Open Source − Java EE Reference Implementation − Full Commercial Support from Sun
  • 6. Sun GlassFish Enterprise Server Enterprise Manager Customer Advocate eLearning Credit Customer Focused 24x7 Support Support Team GlassFish Sun VIP Open Source Interoperability Patches & Application Server Support Upgrades 6
  • 7. GlassFish v3  Modular: − Maven 2 – Build & Module description − Felix – OSGi runtime (216 bundles) − Allow any type of Container to be plugged  Start Container and Services on demand  Embeddable: runs in-VM  Extensible − Rails, Grails, Django, ... 7
  • 8. GlassFish v3 Architecture Grails Security Config Rails Web Naming Injection GlassFish Kernel Grizzly HK2 Services requests OSGi Runtime Bundles Repositories services 8
  • 9. Dynamic Languages & Frameworks http://glassfish-scripting.dev.java.net 9
  • 10. What is ?  Ruby interpreter written in Java  Current Version: 1.4.0  Ruby 1.8.6 compatible  Some Ruby 1.9 support − --1.9 flag − 80% of 1.9.1  9 Active committers http://jruby.kenai.com/presentations/JRubyConf%2009%20Keynote.pdf
  • 11. Compatibility  ~37,000 passing rubyspecs  ~22,000 passing assertions  Continuous Integration − On commit ~3 Java versions * 4 vendors − Nightly: 30 minute “full” run
  • 12. Solid performance ( Ruby 1.9) − Startup is poor, execution usually better than 1.9  Runs native threads  Foreign Function Interface (FFI) for C libraries  Runs Rails great!
  • 13. What is ?  Full-stack Web development MVC framework in Ruby  Current Version: Rails 2.3.4  Getting Started − Install Rails: “jruby -S gem install rails” − Generate Rails app: “jruby -S rails helloworld”
  • 14. Rails Deployment Choices Credits: http://birdwatchersdigest.com 14
  • 15. Directory-based Deployment: How ? jruby -S rails helloworld asadmin start-domain asadmin create-jvm-options -DJRUBY_HOME=... asadmin deploy railsconf 15
  • 16. Directory-based: Capistrano Recipes http://wiki.glassfish.java.net/Wiki.jsp?page=DeployUsingCapsitrano 16
  • 17. Rails Development using NetBeans 6.8 http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug 17
  • 19. GlassFish Gem: How ? jruby -S rails helloworld jruby -S gem install glassfish cd helloworld jruby -S glassfish 19
  • 20. Single Threaded Rails < v 2.2 20
  • 21. Multi Threaded Rails or Merb or ... 21
  • 22. GlassFish Gem: Capistrano Recipes http://wiki.glassfish.java.net/Wiki.jsp?page=DeployUsingCapsitrano 22
  • 23. GlassFish Gem Options jruby -S glassfish -h -n: Number of JRuby runtimes to create initially --runtimes-min: Minimum runtimes --runtimes-max: Maximum runtimes -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) 23
  • 25. GlassFish Gem in Production Easy, green deployment  −Reverse proxy not required −JRuby runtime pool provides required scaling  Rails is single threaded by default −MT frameworks scales automatically JRuby and JVM support native threads Configuration using “glassfish.yml”  25
  • 28. WAR-based: How ? jruby -S rails helloworld jruby -S gem install warbler cd helloworld jruby warble config Edit “config/warble.rb” Include gems, Change RAILS_ENV jruby warble asadmin deploy helloworld.war 28
  • 31. JRuby Module on GlassFish Update Center
  • 32. Ruby Rack Support  A Ruby Web server interface  Plugin any Rack compliant framework − Rails, Merb, Sinatra, Ramaze, Campsite, ...  Rack support in GlassFish − GlassFish Gem  Plugin any Rack metal (such as RackCache) − GlassFish v2 & v3 through Warbler  Use your own framework − Rackup script − jruby.applicationType property 32
  • 34. Performance  Need JVM tuning for production −Use Server profile where possible (-server)  GC settings − -XX:+DisableExplicitGC, -XX:NewRatio=2  Memory settings −Use large settings for -Xmx -Xms and -XX:MaxPermSize −Use at least 20 MB perm gen space for each JRuby runtime 34
  • 35. Scaling  Rails is single-threaded by default  Setup JRuby runtime pool −With gem glassfish -n 3 –runtime-min 2 –runtime-max 4  2 HTTP Worker Threads per runtime  Turn on file caching − network-config>protocols>protocol>http>file-cache#enabled  MT frameworks (Rails > 2.2, Merb) −No configuration needed 35
  • 36. Rails Monitoring  Basic Monitoring − jinfo: System properties and VM CLI flags − jmap: Shared object memory map − jstack: Stack traces of Java threads − jstat: Performance stats on class, JIT compiler, GC  Advanced − jconsole / Visual VM − NewRelic, FiveRuns, ...
  • 37. Rails Monitoring in GlassFish v3  asadmin enable-monitoring –level jruby- container=HIGH  asadmin list –monitor=true “*”  asadmin list –monitor=true “*jruby*”  asadmin list-probes | grep jruby  dtrace or JavScript-based monitoring http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring
  • 38. Endorsements had no reliability and performance issues with Glassfish money is on JRuby (and Look like the best Glassfish) for the long deploying option I ever haul; if you haven't found for Rails, GREAT! checked out Glassfish nice way to deploy and yet, you're doing yourself manage my app while a disservice! leaving things open for scaling the easiest rails stack in the world, jruby 1.2rc, rails leading the way to simple, 2.3rc, glassfish v3 scalable, no-hassle hosting for ... Ruby web applications. too easy to run jruby/rack/ ... glassfish behind nginx it's true one-step deployment.
  • 39. Who loves Rails on GlassFish ?
  • 40.
  • 41. What is ?  Agile dynamic language for the JVM  Seamlessly integrates with all existing Java objects & libraries − Compiles straight to bytecode  Current version: 1.6.7  groovy -e "println 'Hello ' + args[0]" World
  • 42. What is ?  MVC Web framework for the Java platform − Persistence framework (Hibernate) − Templating using GSP (Groovy Server Pages) − Tag libraries to create web page components − Good Ajax support − Web server & automatic resources reload  Current Version: 1.1.2, 1.2 RC1 released 12/5
  • 43. Grails “Hello World” ● Create app: “grails create-app bookstore” ● Create domain class: “grails create-domain-class book” ● Edit “grails-app/domain/Book.groovy” and add attributes ● Create controller: “grails create-controller Book” ● Edit “grails-app/controllers/BookController.groovy” ● Add scaffold: “def scaffold = Book” ● Run app: “grails run-app”
  • 44. Grails on GlassFish App Server ● Create WAR: “grails war” ● Deploy: “asadmin deploy helloworld-0.1.war”
  • 46. Grails Module on GlassFish Update Center
  • 47. Efficient Deployment Grails Application WAR  −Large Over 48 Grails dependent JARs ~20MB for a simple app −Expensive to bundle in single WAR −Issues when hot deployment is required 47
  • 48. GlassFish proposes light-weight WAR Don't package dependencies! Smaller WAR file: ~200KB vs ~20MB GlassFish knows how to find dependencies Only one copy of dependencies in GlassFish −Less memory consumption and deployment speed-up $ grails shared-war With Grails 1.1 use –nojars option $ asadmin deploy helloworld-0.1.war 48
  • 49. GlassFish/Grails: Coming up ...  Use “grails –nojars” − JIRA-5174, JIRA-5175 “grails install-plugin glassfish –global”  − grails run-app  “asadmin deploy grailsApp” 49
  • 50. 50
  • 51. What is ? Implementation of Python in Java −Seamless integration of Python and Java −Java <==> Python −Just Python −Dynamic compilation to Java bytecodes Jython 2.5.1 released (Sep 2009) Works with Django 1.0 51
  • 52. What is ?  MVC-based framework written in Python − Object-relational mapper − A lightweight, standalone Web server − A regular expression based URL dispatcher − A templating system − A caching framework − An internationalization system − ... 52
  • 53. GlassFish Deployment Deploy as WAR  −Modjy  Servlet, ServletContextListener + WSGI Implementation  Integrated with Jython 2.5 Pure Django Deployment  −Grizzly + WSGI => Django −No WAR, no packaging −asadmin deploy myDjangoApp 53
  • 54. How does it work ?  Download Jython  Install Django (jython25 setup.py install)  GlassFish v3 Jython OSGi module from UC  asadmin create-jvm-options -Djython.home=...  cd DjangoApp  asadmin deploy . 54
  • 55. Jython Module on GlassFish Update Center
  • 58. Java EE & Dynamic Languages JavaEE is a mature and robust platform  −Servlet, EJB, JMS, JAX-RS, JAX-WS... Hybrid Rails and Servlet/JSP application  −Forward to and from Rails to Servlet/JSP −HTTPSession as Rails session −ServletRequest/Response API available to Rails JDBC connection pool JMS: Async messaging in Rails 58
  • 59. Servlet 3.0 Pluggability  JavaEE 6 and Dynamic Languages − No boilerplate web.xml −Dynamically add ServletFilter and ServletContextListener  Simple packaging −No need to package as WAR, No Warbler −Place application inside WEB-INF directory 59
  • 60. References  glassfish.org  glassfish-scripting.dev.java.net  sun.com/glassfish  blogs.sun.com/theaquarium  twitter.com/glassfish  glassfish@sun.com
  • 61. Dynamic Languages & Web Frameworks in GlassFish v3 Arun Gupta (blogs.sun.com/arungupta, @arungupta) Sun Microsystems, Inc.