What's up with Scripting support on Glassfish?
Scripting is becoming ever popular among web application developers. Glassfish
supports Ruby on Rails with JRuby,
Phobos brings in solid support for
jMaki and all of these with excellent NetBeans tooling. There are other
scripting languages such as PHP and Python, which are very popular among
developers too. How nice would it be to deploy your PHP or Python based web
applications on Glassfish? Well, we know that marrying Java and scripting
languages has it's own challenges.
JSR-223 let you execute dynamic languages from inside Java. However the
interpreters for such languages are written in Java and generate bytecodes and
at runtime deal with all the dynamic types and method dispatching and what not.
This is because JVM is designed to be used for statically typed language such as
Java where you know the types at the compile time and to take care of
types at the runtime the dynamic language interpreters use complex mechanism,
which results in to uses of more memory, performance etc. JRuby overcomes these
by doing JIT ahead of time, but then this poses limitation specially on the
server side considering Rails which is single threaded.
good news is that there are efforts in place in JVM to support Dynamic
Languages, such as JSR -292 is
going to add a new bytecode,
invokedynamic, that supports efficient and flexible execution of method
invocations in the absence of static type information. There is also a new
project Da Vinci Machine
that is going to bring in support for dynamic languages (or any other language)
You might wonder why I am talking about all the scripting stuff! Well, I have
taken up the role of Scripting Lead in
Glassfish. I will ensure that Glassfish is home to many of the popular
scripting languages out there and in fact will try to bring best of both worlds
to Glassfish. JAX-WS will be lead by very capable
I am working on wrapping up implementing some new features for upcoming Metro
1.2 or JAX-WS RI 2.1.4 and starting to take on Scripting Lead. Stay tuned, you
will be hearing more form me in coming days...