Ruby VM’s, by Jason Seifer

I watched Jason Seifer’s QCon 30-min presentation on Ruby VM’s. He describes the main characteristics of most Ruby VM’s out there. A little note: his criterium to decide whether a VM is production-ready or not is based on its support (or lack of support) for Rails, since that’s a Ruby framework which touches on a lot of aspects of the Ruby implementation.

Here are my highlights.

Ruby Versions

  • Ruby 1.8.6 is the most widespread implementation
  • Ruby 1.8.7 is the current stable version of Ruby (middle ground between 1.8.6 and 1.9)
  • all VM’s focus on Ruby 1.8.6 (with the exception of JRuby, which has support for both Ruby 1.8.6 and Ruby 1.9)

MRI

  • the de facto standard
  • the only concise Ruby spec out there
  • supported by all major platforms
  • production-ready

YARV

  • Ruby 1.9.1 will have YARV as the default VM
  • not production-ready

MacRuby

  • Ruby 1.9 VM on OS X core technologies
  • mostly uses Objective-C and YARV C code
  • open source
  • early in development (< 1.0 release)
  • not production-ready

XRuby

  • first Ruby to Java compiler
  • last release: 0.3 in Nov 2007
  • not production-ready

MagLev

  • not released yet
  • made by GemStone
  • uses OODB (allow Ruby objects persistence)
  • not production-ready

Rubinius

  • “Ruby in Ruby” (since part of it is written in Ruby)
  • the VM proper is written in C++
  • the standard lib written in Ruby
  • Ruby objects mapped to a C++ object
  • migration from C to C++ was for lowering the barrier of entry for project contribution
  • slow
  • best of the MRI contenders
  • Ruby spec project came out of Rubinius
  • not production-ready

IronRuby

  • Microsoft’s implementation of Ruby
  • Ruby on .Net
  • released under MPL (Microsoft Public Library)
  • runs on the DLR (Dynamic Language Runtime), on top of the CLR
  • DLR supported languages: IronPython, IronRuby, Javascript, Dynamic
  • not production-ready

JRuby

  • big advantage: can use existing Java code
  • most performant Ruby implementation
  • multi-threaded (native ones, i.e. it threads in different processes)
  • introduced a compatibiltiy land (can start the VM with a Ruby 1.8 or 1.9 “compatibility flag”)
  • The solution for the enterprise-class Ruby applications
  • production-ready (!)
Advertisements

9 comments

  1. MacRuby isn’t written in Objective-C. It’s written in C and Ruby.

  2. MRI is: supported by all platformsHuh?

  3. MRI is supported on everything from Dos to windows mobile… I’d say that qualifies as “all platforms”

  4. What about Symbian S60?

  5. @ Ivizon: From what I understand from the MacRuby site, MacRuby uses mostly Objective-C, and YARV C code.@ Mr. Fru Stration: for your picky eyes, I added ‘ major’, so that it reads: “all major platforms”.

  6. Thanks for the concise summary.

  7. @martini grabbed the sources yesterday and there isn’t a single line of objective-c in the whole project. well, there’s no implementation files anyways.-lowell

  8. lol @ fru stration

  9. Thanks a lot for posting this! I guess I should clarify that the reason I used “running rails” as the production ready criteria is because this presentation was done for the “Ruby in the Enterprise” track at QCon. Also, I think some of the material is a bit dated at this point.

Got a comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: