Nick Sieger: JRuby Q & A at RailsConftag:blog.nicksieger.com,2005:TypoTypo2008-06-01T22:07:33+00:00Nick Siegerurn:uuid:b09ae6ba-f3b3-4624-a962-227b9646560e2008-06-01T22:07:33+00:002008-06-01T22:07:33+00:00JRuby Q & A at RailsConf<p>These are the notes I took during our “panelish” Q & 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) – Ola’s port of _why’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 “boot” classpath</li>
<li>-Xverify:none is not recommended because of runtime-generated code</li>
<li>Nailgun to keep VM running and “send commands” 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 – 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’s using it?</li>
</ul></li>
<li><p>Sun’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’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ér » Blog Archive » 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’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>“Richards” – Smalltalk-originated application benchmark</li>
</ul></li>
<li><p>JSR-292 (“invokedynamic”)</p>
<ul>
<li>Actually extension of “invokeinterface” 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>“Punching a hole” 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>