Nick Sieger: JRuby Q & A at RailsConf http://blog.nicksieger.com/articles/2008/06/01/jruby-q-a-at-railsconf en-us 40 do what you love JRuby Q &amp; A at RailsConf <p>These are the notes I took during our &#8220;panelish&#8221; Q &amp; A session on Sunday afternoon at RailsConf.</p> <ul> <li><p>Exceptions (behavior between ruby and java)</p> <ul> <li>Embedding: JSR-223 preferred, BSF fallback</li> </ul></li> <li><p>Java integration, mocking, proxying, extension</p></li> <li><p>Multiple VM support</p> <ul> <li>multiple JRuby instances can be run in the same VM</li> <li>JavaSand (google it) &#8211; Ola&#8217;s port of _why&#8217;s (freaky freaky) sandbox</li> </ul></li> <li><p>Startup time performance gain recently</p> <ul> <li>-Xbootclasspath: VM does not verify classes in the &#8220;boot&#8221; classpath</li> <li>-Xverify:none is not recommended because of runtime-generated code</li> <li>Nailgun to keep VM running and &#8220;send commands&#8221; to it</li> </ul></li> <li><p>Compiling Ruby code to JVM bytecode</p> <ul> <li>Keep # of class files low</li> <li>Walk AST and dump out high-level, abstracted operations (local variable access, dynamic invocation) and low-level bytecode is built for each of those</li> <li>4096 &#8211; maximum # of methods to be compiled</li> <li>Compiled methods are shared between runtimes</li> <li>Future:</li> <li>raise/eliminate overhead of compiled methods</li> <li>share AST, reduce memory load</li> </ul></li> <li><p>Community tasks/actions</p> <ul> <li>Projects needing help (e.g., ActiveHibernate)</li> <li>Adoption, acceptance, blogging</li> <li>Documentation (http://wiki.jruby.org/ and others), screencasts</li> <li>Who&#8217;s using it?</li> </ul></li> <li><p>Sun&#8217;s commitment</p> <ul> <li>Ruby vs. Groovy vs. Python vs. Scala vs. other langs</li> <li>Rails vs. Grails vs. Lift vs. JSF vs. Struts 2 vs. ???</li> <li>all of the above</li> <li>improve the JVM&#8217;s support for all dynamic languages</li> <li>JRuby is a full open source project, not owned or controlled by Sun, with history that extends years before main devs hired by Sun</li> </ul></li> <li><p>Ruby programming language, JRuby is an implementation</p> <ul> <li>community evangelism of Ruby the language vs. implementations</li> <li>despite MVM, FFI and emerging areas that are not standard yet</li> </ul></li> <li><p>How do you pitch JRuby/Rails in a legacy environment?</p> <ul> <li>Consider demonstrating running application without discussing technology specifics</li> <li>IBM and JDK 1.5 issues have been reported</li> <li>Free support as long as these issues are new and help improve JRuby and the community!</li> </ul></li> <li><p>Testing</p> <ul> <li>JRuby enables more agile testing</li> <li>Without production risks</li> <li>Ceremony vs. Essence discussion</li> </ul></li> <li><p>Terracotta/DSO</p> <ul> <li><a href="http://jonasboner.com/2007/02/05/clustering-jruby-with-open-terracotta/" title="Jonas Bon&#233;r &raquo; Blog Archive &raquo; Clustering JRuby with Open Terracotta">Jonas Boner blogged about it over a year ago</a> </li> </ul></li> <li><p>Windows/Mongrel/ImageMagick issues</p> <ul> <li><a href="http://blog.nicksieger.com/articles/2008/03/27/imagevoodoo-0-1-released" title="ImageVoodoo 0.1 Released">ImageVoodoo</a> is an imaging library using Java2D, comes with Java</li> <li>MiniMagick also reportedly works</li> </ul></li> <li><p>Rails benchmarks</p> <ul> <li>Micro-benchmarks are problematic and usually don&#8217;t lead to measurable application speedups</li> <li>Community needs a real-world, full application</li> <li>Antonio Cangiano working on new application-level benchmarks?</li> <li>&#8220;Richards&#8221; &#8211; Smalltalk-originated application benchmark</li> </ul></li> <li><p>JSR-292 (&#8220;invokedynamic&#8221;)</p> <ul> <li>Actually extension of &#8220;invokeinterface&#8221; bytecode</li> <li>Call site structure/method handles</li> <li>Expose the dynamic nature of the JVM (get the Java-specific stuff out of the way)</li> <li>Language-specific calling semantics, method invocation</li> <li>&#8220;Punching a hole&#8221; through the JVM</li> <li>Comments on <a href="http://blogs.sun.com/jrose/entry/dynamic_invocation_in_the_vm" title="dynamic invocation in the VM : John Rose @ Sun">JSR-292 Early Draft Review</a> currently ongoing</li> </ul></li> </ul> Sun, 01 Jun 2008 22:07:33 +0000 urn:uuid:b09ae6ba-f3b3-4624-a962-227b9646560e Nick Sieger http://blog.nicksieger.com/articles/2008/06/01/jruby-q-a-at-railsconf jruby railsconf railsconf2008 http://blog.nicksieger.com/articles/trackback/420