Report on JRuby On Glassfish@Silicon Valley JUG
These are some of the questions asked during presentation and my answer to those
Q:This is cool that Rails applications can be deployed and run over GlassFish a JavaEE application server, but can the JavaEE features be invoked from inside a Rails application?
A:Yes we think it can be done, with JRuby you can call anything in Java. We know from one of the JRuby users that he is able to call in to EJB service form Rails. Having said that with Rails there are some known limitations, such as the ORM in Rails is not pluggable, so we can't plugin GlassFish JPA implementation in to Rails to take benefit of it. Merb allows such pluggable ORM. As a followup we would provide samples/blogs on Rails and JavaEE features.
Q:What is the performance comparison between JRuby vs Ruby?
Q:No formal performance study has been done. There are some blog posts that talk about it, such as this one by Nick, that shows with warm up JRuby/GlassFish as good as C-Ruby/Mogreal and there is another JRuby on GlassFish comparison to Ruby/Mogrel. We expect with GlassFish gem these numbers would look even better. In next few months the focus is going to be on performance and scalability, so stay tuned.
Q:Can you call in to Ruby from Java?
A:Yes, you can do it using JSR-223 APIs. JSR-223 scripting APIs are part of JDK6, with JDK 5 or earlier versions, you can get it from here.
Q:Does standalone JRuby programs can also get affect from PermGen issue?
A:It really depends on the application. For example, in a Rails application, because Rails being single threaded and so it results in to creating Rails for each of the concurrent requests and hence each Rails instance ends up consuming more of Permanent heap space.
There were more questions that I can't recall now. The talk was video recorded, I am not sure where and when it will be posted but when I get that link, I will add it to this blog.
Please use JRuby on GlassFish and send us feedback on GlassFish forums, dev@glassfish or gem mailing list. For the latest information about the gem and JRuby Update Center module can be found at GlassFish JRuby wiki.