Skip to main content

Dynamic Languages support in GlassFish v3 Prelude

Posted by vivekp on November 6, 2008 at 6:33 PM PST

alt="icons.png"
src="http://weblogs.java.net/blog/vivekp/archive/images/icons.png"
height="144" width="200">

By now most of you might already know that  GlassFish v3
Prelude is   href="http://www.sun.com/aboutsun/pr/2008-11/sunflash.20081106.1.xml">released!
GlassFish v3 Prelude brings not only JavaEE support but also brings
in support for Dynamic Languages based platforms, such as Rails, Grails
and also tested to work for Scala/Lift, PHP (Quecus, Java-PHP
bridge). 



Read Jerome's href="http://blogs.sun.com/dochez/entry/glassfish_v3_prelude_debuts_today">post
on GlassFish v3 key architectural points that enables pluggable
containers.









Following dynamic languages based frameworks are supported on GlassFish
v3 Prelude:

JRuby on Rails

Ruby on Rails applications are supported in the pure native form using
JRuby runtime. There is Rails container in GlassFish v3 that deploys
and passes on the request and response to Rails using Grizzly. Since
Rails is single threaded, there is JRuby runtime pool, which can be
configured for scaling well.



There is also href="http://rubyforge.org/projects/glassfishgem/">GlassFish
Ruby gem. The GlassFish gem is
based on GlassFish v3 nucleus, this means you are running/testing your
Rails applications against the same GlassFish server bits. Read href="http://wiki.glassfish.java.net/Wiki.jsp?page=DeployAndRunRailsOnGlassFishGem">here
on how to use GlassFish gem.



Read href="http://weblogs.java.net/blog/vivekp/archive/2008/11/jruby_and_rails.html">here
for more details on how JRuby on Rails works and key features.



Also note that JRuby and Rails deployment on Glassfish v3 Prelude is
commercially supported by Sun.

Groovy on Grails

GlassFish v3 Prelude Update Center provides Grails package which is
Grails 1.0.3 plus value additions
from GlassFish. Here are some key points:

  • Development and deployment
    on the same server
    • grails run-app runs
      GlassFish v3 Prelude in embedded mode
  •  Efficient
    packaging and deployment
    • grails shared-war creates
      a smaller and efficient grails application
    • Hot deployment without
      OOM/PermGen href="http://jira.codehaus.org/browse/GRAILS-2544">issue 
      • Deploying war file
        created with 'grails war' command has certain issues with with respect
        to href="http://markmail.org/message/shjxg7lmulaptx7v">locks
        in groovy and HSQLDB's href="http://sourceforge.net/tracker/index.php?func=detail&aid=1922315&group_id=23316&atid=378131">issue.
        These issues cause OOM due to lack of PermGen space on multiple
        redeployments.
      • grails shared-war
        minimizes it in orders of magnitude

See href="http://wiki.glassfish.java.net/Wiki.jsp?page=GrailsGettingStarted">Getting
Started guide and don't miss
Alexis  screencast href="https://slx.sun.com/1179271912">From Zero to
Grails in 5 minutes with GlassFish v3 Prelude.

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

Scala/Lift

  • Lifts apps packaged as WAR
    • asadmin deploy liftApp.war
  • For details on developing
    and deploying Lift applications on GlassFish v3, see href="http://wiki.glassfish.java.net/Wiki.jsp?page=GettingStartedWithLiftOnGlassFish">here

Get href="https://glassfish.dev.java.net/downloads/v3-prelude.html">GlassFish
v3 Prelude and start developing
applications on it. As always let us know what you think through the href="webtier@glassfish.dev.java.net">mailing list
or report an issue on the href="https://glassfish.dev.java.net/servlets/ProjectIssues">issue
tracker.

Related Topics >>