Nick Sieger: JRuby Q & A at RailsConf http://blog.nicksieger.com/articles/2008/06/01/jruby-q-a-at-railsconf en-us 40 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&#46;</p> <ul> <li><p>Exceptions (behavior between ruby and java)</p> <ul> <li>Embedding: JSR&#45;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) &#45;&#45; Ola&#8217;s port of _why&#8217;s (freaky freaky) sandbox</li> </ul></li> <li><p>Startup time performance gain recently</p> <ul> <li>&#45;Xbootclasspath: VM does not verify classes in the &#8220;boot&#8221; classpath</li> <li>&#45;Xverify:none is not recommended because of runtime&#45;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&#45;level, abstracted operations (local variable access, dynamic invocation) and low&#45;level bytecode is built for each of those</li> <li>4096 &#45;&#45; 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&#46;g&#46;, ActiveHibernate)</li> <li>Adoption, acceptance, blogging</li> <li>Documentation (http://wiki&#46;jruby&#46;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&#46; Groovy vs&#46; Python vs&#46; Scala vs&#46; other langs</li> <li>Rails vs&#46; Grails vs&#46; Lift vs&#46; JSF vs&#46; Struts 2 vs&#46; ???</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&#46; 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&#46;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&#46; 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&#45;benchmarks are problematic and usually don&#8217;t lead to measurable application speedups</li> <li>Community needs a real&#45;world, full application</li> <li>Antonio Cangiano working on new application&#45;level benchmarks?</li> <li>&#8220;Richards&#8221; &#45;&#45; Smalltalk&#45;originated application benchmark</li> </ul></li> <li><p>JSR&#45;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&#45;specific stuff out of the way)</li> <li>Language&#45;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&#45;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