JRuby Q & A at RailsConf

Posted by Nick Sieger Sun, 01 Jun 2008 22:07:33 GMT

These are the notes I took during our “panelish” Q & A session on Sunday afternoon at RailsConf.

  • Exceptions (behavior between ruby and java)

    • Embedding: JSR-223 preferred, BSF fallback
  • Java integration, mocking, proxying, extension

  • Multiple VM support

    • multiple JRuby instances can be run in the same VM
    • JavaSand (google it) -- Ola’s port of _why’s (freaky freaky) sandbox
  • Startup time performance gain recently

    • -Xbootclasspath: VM does not verify classes in the “boot” classpath
    • -Xverify:none is not recommended because of runtime-generated code
    • Nailgun to keep VM running and “send commands” to it
  • Compiling Ruby code to JVM bytecode

    • Keep # of class files low
    • Walk AST and dump out high-level, abstracted operations (local variable access, dynamic invocation) and low-level bytecode is built for each of those
    • 4096 -- maximum # of methods to be compiled
    • Compiled methods are shared between runtimes
    • Future:
    • raise/eliminate overhead of compiled methods
    • share AST, reduce memory load
  • Community tasks/actions

    • Projects needing help (e.g., ActiveHibernate)
    • Adoption, acceptance, blogging
    • Documentation (http://wiki.jruby.org/ and others), screencasts
    • Who’s using it?
  • Sun’s commitment

    • Ruby vs. Groovy vs. Python vs. Scala vs. other langs
    • Rails vs. Grails vs. Lift vs. JSF vs. Struts 2 vs. ???
    • all of the above
    • improve the JVM’s support for all dynamic languages
    • JRuby is a full open source project, not owned or controlled by Sun, with history that extends years before main devs hired by Sun
  • Ruby programming language, JRuby is an implementation

    • community evangelism of Ruby the language vs. implementations
    • despite MVM, FFI and emerging areas that are not standard yet
  • How do you pitch JRuby/Rails in a legacy environment?

    • Consider demonstrating running application without discussing technology specifics
    • IBM and JDK 1.5 issues have been reported
    • Free support as long as these issues are new and help improve JRuby and the community!
  • Testing

    • JRuby enables more agile testing
    • Without production risks
    • Ceremony vs. Essence discussion
  • Terracotta/DSO

  • Windows/Mongrel/ImageMagick issues

    • ImageVoodoo is an imaging library using Java2D, comes with Java
    • MiniMagick also reportedly works
  • Rails benchmarks

    • Micro-benchmarks are problematic and usually don’t lead to measurable application speedups
    • Community needs a real-world, full application
    • Antonio Cangiano working on new application-level benchmarks?
    • “Richards” -- Smalltalk-originated application benchmark
  • JSR-292 (“invokedynamic”)

    • Actually extension of “invokeinterface” bytecode
    • Call site structure/method handles
    • Expose the dynamic nature of the JVM (get the Java-specific stuff out of the way)
    • Language-specific calling semantics, method invocation
    • “Punching a hole” through the JVM
    • Comments on JSR-292 Early Draft Review currently ongoing

Tags , ,  | no comments

RailsConf slides

Posted by Nick Sieger Sat, 31 May 2008 23:42:00 GMT

If you already saw my JavaOne slides, these aren’t too different, but I think they’re better and prettier, too.

JRuby at RailsConf

Get them here.

Update. The slides are pretty lean on explanation. Just in case you’re confused, the narrative goes like this:

  • What’s your deployment nirvana look like? (various existing options)
  • With JRuby, you can deploy Rails applications in a single operating system process instead of many.
  • However, there are a few configuration changes needed to accomodate JRuby. (Steps for converting existing apps, configuration code snippets.)
  • Now, JRuby-Rack helps with the configuration, because all of the logging/session/public path re-jiggering is taken care of for you. It’s now bundled with Warbler as of version 0.9.9.
  • Performance is good and getting better. You can scale up the number of requests you can handle really easily just by setting the number of runtimes to create inside Warbler’s config/warble.rb file.
  • Lots of new stuff is happening right now to make Rails better. JRuby will be able to leverage these changes and become an even more desirable deployment platform. Stay tuned!

Tags , ,  | 3 comments

JRuby Hackfest at RailsConf

Posted by Nick Sieger Thu, 22 May 2008 15:40:00 GMT

Thanks to our friends at LinkedIn, Joyent and Sun, we’re having a hackfest at McMenamins/Kennedy School on Thursday evening, May 29, starting at 6:30pm, complete with food and beverages!

Do stop by and hang out with us! Leave a comment over at Charlie’s announcement if you’re interested in joining us.


Kennedy School
Local: (503) 249-3983
Elsewhere: (888) 249-3983

View Larger Map

Tags , ,  | no comments