0
Dynamic Languages in
GlassFish v3 Prelude
GlassFish Webinar


Vivek Pandey
Developer, Glassfish Team
Sun Microsysems, Inc....
2
GlassFish v3 - A Dynamic AppServer
Productivity, performance

• GlassFish v3
   > Lightweight, Modular, Extensible, Embedd...
Overall Architecture




                       4
JRuby on Rails




                 5
Why Ruby on GlassFish?
• GlassFish v3 server is tested platform
  > Co-host Java and Rails
  > Known Deployment and Manage...
More benefits...
• No packaging, simple deployment
    > asadmin deploy depot/
• Deploy as WAR
    > warble #creates WAR f...
GlassFish v3 Runtime


                  Grizzly Listener

                               .
         Rails      Web       ...
Runtime Pool Management
• Automatic JRuby runtime pool management

          Gem         Create
                       JRu...
Configuring JRuby Runtime Pool
• On GlassFish v3 Prelude Server
  > System properties
     – -Djruby.runtime.min : Sets th...
Configuring JRuby Runtime Pool
• GlassFish gem
  > CLI options
     – -n, --runtimes
           –   Number of JRuby runtim...
JRuby Bundle - Updatecenter
• glassfish-install/bin/updatetool




                                     12
NetBeans Tooling
• NetBeans support
  > Develop, deploy debug
  > Screencast
    – http://weblogs.java.net/blog/arungupta/...
GlassFish gem
•   Rails developer friendly
•   Based on GlassFish v3 nucleus
•   Distributed as ruby gem
•   Install
    >...
GlassFish Gem
• Latest 0.9.0 released
• Features
   > Rack based architecture
      – Pluggable ruby frameworks
   > Merb ...
Demo – GlassFish Gem
• Demo screencast
  > http://mediacast.sun.com/users/vivek.pandey/media/gemdemo




                 ...
Groovy on Grails




                   17
Groovy on Grails
• An MVC frameworks
• Based on Groovy, Spring, Hibernate, SiteMesh
  > But hides all the complexity
• Ado...
Grails – Setup and Installation
• Install Grails IPS package using updatetool
  > Grails package is installed inside 'glas...
Groovy on Grails - Updatecenter
• glassfish-install/bin/updatetool




                                     20
Groovy on Grails
• Development and production on the same server
  > Develop using GlassFish v3 embedded server
    – grai...
Groovy on Grails
• Development and production on the same server
  > Develop using GlassFish v3 embedded server
    – grai...
Groovy on Grails
• Development and production on the same server
  > Develop using GlassFish v3 embedded server
     – gra...
Groovy on Grails
• Development and production on the same server
  > Develop using GlassFish v3 embedded server
      – gr...
Groovy on Grails – Screencast
• From Zero to Grails in 5 minutes with GlassFish v3 Prelude
   > https://slx.sun.com/117927...
Jython on Django
• Jython 2.5 nearing release
  > Jython 2.5 beta out
  > Being developed at
     – http://www.jython.org/...
PHP




      27
PHP
• Quercus (Caucho)
  > Open Source (GPL) PHP 5 implementation in Java
  > WAR packaging
  > WordPress, MediaWiki, phpB...
Scala on Lift




                29
Scala on Lift
• Lifts apps packaged as WAR
  >   asadmin deploy liftApp.war

• For details on developing and deploying Lif...
References
• GlassFish
   > https://glassfish.dev.java.net
• GlassFish Scripting Project
   > https://glassfish-scripting....
Q&A




      32
Upcoming SlideShare
Loading in...5
×

Scripting Support in GFv3 Prelude - Full Version

1,369

Published on

A 1 hour presentation of how GlassFish v3 Prelude provides support for Scripting / Dynamic Languages. Ruby/JRuby/Rails and Groovy/Grails are specifically described.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,369
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
36
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Scripting Support in GFv3 Prelude - Full Version"

  1. 1. Dynamic Languages in GlassFish v3 Prelude GlassFish Webinar Vivek Pandey Developer, Glassfish Team Sun Microsysems, Inc. 1
  2. 2. 2
  3. 3. GlassFish v3 - A Dynamic AppServer Productivity, performance • GlassFish v3 > Lightweight, Modular, Extensible, Embeddable • Reasonable and efficient deployment choice > Native, WAR style, embedded GlassFish • App Server feature for everyone > Database connection pooling > Native threading, non-blocking IO, ARP > Management – Monitor, Deploy, Troubleshooting > Access to enterprise stack – Metro, Jersey, JMS/MQ, Grizzly, JBI etc. 3
  4. 4. Overall Architecture 4
  5. 5. JRuby on Rails 5
  6. 6. Why Ruby on GlassFish? • GlassFish v3 server is tested platform > Co-host Java and Rails > Known Deployment and Management • “Green” alternative – One command, One instance, One process • Multiple Requests by a Single Application • Database Connection Pooling • Not just Rails – Merb, Sinatra... 6
  7. 7. More benefits... • No packaging, simple deployment > asadmin deploy depot/ • Deploy as WAR > warble #creates WAR file > asadmin deploy depot.war • Tested JRuby runtime at Updatecenter > bin/updatetool > No more config needed • Commercially supported by Sun • http://wiki.glassfish.java.net/Wiki.jsp?page=GettingStartedGuide 7
  8. 8. GlassFish v3 Runtime Grizzly Listener . Rails Web . XXX Adapter Adapter Adapter . Rails Runtime Pool JRuby 8
  9. 9. Runtime Pool Management • Automatic JRuby runtime pool management Gem Create JRuby Rails Startup Runtime JRuby Load Rails Environment Add to Rails Runtime Pool JRuby 9
  10. 10. Configuring JRuby Runtime Pool • On GlassFish v3 Prelude Server > System properties – -Djruby.runtime.min : Sets the fewest runtimes to have in the pool – -Djruby.runtime : Sets the initial number of runtimes to create – -Djruby.runtime.max : Sets the maximum number of runtimes to have active > Add these system properties as <jvm-options> elements inside domain.xml > Or, if using java CLI simply provide it using -D option – java -Djruby.home=... -Djruby.runtime.max=2 -jar modules/glassfish.jar 10
  11. 11. Configuring JRuby Runtime Pool • GlassFish gem > CLI options – -n, --runtimes – Number of JRuby runtimes to crete initially – --runtimes-min – Minimum JRuby runtimes to crete – --runtimes-max – Maximum number of JRuby runtimes to crete > glassfish -n 2 –runtimes-min 1 –runtimes-max 6 – Starts glassfish gem with 2 JRuby runtimes, the minimum pool size is 1 and maximum size it can grow up to is 6 11
  12. 12. JRuby Bundle - Updatecenter • glassfish-install/bin/updatetool 12
  13. 13. NetBeans Tooling • NetBeans support > Develop, deploy debug > Screencast – http://weblogs.java.net/blog/arungupta/archive/2008/11/screencast_26_d.html 13
  14. 14. GlassFish gem • Rails developer friendly • Based on GlassFish v3 nucleus • Distributed as ruby gem • Install > gem install glassfish • Run > cd myAp > glassfish • More info > http://glassfishgem.rubyforge.org/ 14
  15. 15. GlassFish Gem • Latest 0.9.0 released • Features > Rack based architecture – Pluggable ruby frameworks > Merb support – JRuby and Merb native extension issue $jruby -S gem install merb-core merb-more $merb-gen core hello $cd hello $glassfish • Framework auto-detection > Need just one command 'glassfish' • Details at: http://glassfishgems.rubyforge.org/ 15
  16. 16. Demo – GlassFish Gem • Demo screencast > http://mediacast.sun.com/users/vivek.pandey/media/gemdemo 16
  17. 17. Groovy on Grails 17
  18. 18. Groovy on Grails • An MVC frameworks • Based on Groovy, Spring, Hibernate, SiteMesh > But hides all the complexity • Adopts Rails paradigms 18
  19. 19. Grails – Setup and Installation • Install Grails IPS package using updatetool > Grails package is installed inside 'glassfish' directory • Grails IPS package > Provides the following benefits over Grails distributions found elsewhere – grails shaed-war – Lightweight, efficient application WAR – Less prone to OOM due to lack of PermGen space on hot deployments – grails run-app – Runs GlassFish v3 Prelude in embedded mode – Develop and test your grails app on the same server you would deploy during production • Set GRAILS_HOME environment variable > export GRAILS_HOME=glassfish-install/grails 19
  20. 20. Groovy on Grails - Updatecenter • glassfish-install/bin/updatetool 20
  21. 21. Groovy on Grails • Development and production on the same server > Develop using GlassFish v3 embedded server – grails run-app 21
  22. 22. Groovy on Grails • Development and production on the same server > Develop using GlassFish v3 embedded server – grails run-app > Production deployment – asadmin deploy grailsApp.war 22
  23. 23. Groovy on Grails • Development and production on the same server > Develop using GlassFish v3 embedded server – grails run-app > Production deployment – asadmin deploy grailsApp.war • Efficient WAR packaging > grails shared-war – Creates smaller WARs ~200KB vs 18MB – asadmin deploy –-libraries $GRAILS_HOME/lib/glassfish- grails.jar grailsApp.war 23
  24. 24. Groovy on Grails • Development and production on the same server > Develop using GlassFish v3 embedded server – grails run-app > Production deployment – asadmin deploy grailsApp.war • Efficient WAR packaging > grails shared-war – Creates smaller WARs ~200KB vs 18MB – asadmin deploy –-libraries $GRAILS_HOME/lib/glassfish- grails grailsApp.war • For details > http://wiki.glassfish.java.net/Wiki.jsp?page=GrailsGettingStarted 24
  25. 25. Groovy on Grails – Screencast • From Zero to Grails in 5 minutes with GlassFish v3 Prelude > https://slx.sun.com/1179271912 25
  26. 26. Jython on Django • Jython 2.5 nearing release > Jython 2.5 beta out > Being developed at – http://www.jython.org/Project/ • Currently WAR deployment approach > Using Django-Jython project – http://django-jython.googlecode.com/ • Native Django application deployment in works 26
  27. 27. PHP 27
  28. 28. PHP • Quercus (Caucho) > Open Source (GPL) PHP 5 implementation in Java > WAR packaging > WordPress, MediaWiki, phpBB, Joomla • PHP/Java Bridge > Open Source (LGPL) > XML based network protocol for native PHP > Faster, easier than JNI > Java native threads used for concurrent requests > PHP and JSP session sharing 28
  29. 29. Scala on Lift 29
  30. 30. Scala on Lift • Lifts apps packaged as WAR > asadmin deploy liftApp.war • For details on developing and deploying Lift applications see > http://wiki.glassfish.java.net/Wiki.jsp?page=GettingStartedWithLiftOnGlassFish 30
  31. 31. References • GlassFish > https://glassfish.dev.java.net • GlassFish Scripting Project > https://glassfish-scripting.dev.java.net • Scripting Wiki > http://wiki.glassfish.java.net/Wiki.jsp?page=Scripting • Mailing List > webtier@glassfish.dev.java.net • IssueTracker > https://glassfish.dev.java.net/servlets/ProjectIssues • TheAquarium > http://blogs.sun.com/theaquarium 31
  32. 32. Q&A 32
  1. ¿Le ha llamado la atención una diapositiva en particular?

    Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

×