Borasky Research Journal Google+ Page

Borasky Research Journal Amazon Store


Data Journalism Developer Studio 2012LX Blog

Jun 222008
 

There’s a concept in systems theory called, in the popular vernacular, “life on the edge of chaos”. I’m sure a Google search for that phrase will turn up plenty of speculation and perhaps even some valid math. :-)

Ruby seems to me to be very close to life on the edge of chaos at the moment. It started a few weeks ago when some of the implementations other than the mainstream Ruby (aka MRI) started running Rails. If my count is correct, in addition to MRI, the John Lam/Microsoft IronRuby and Rubinius now run Rails, and Sun’s jRuby has been running Rails for quite a while. I don’t remember if Ruby 1.9 runs Rails or not — perhaps someone can fill me in on that in a comment.

Another indication of life on the edge of chaos is the fact that the main Ruby implementation teams have started having regular IRC meetings to make sure there is some kind of communication about the syntax and semantics of the language, test suites, benchmark suites, and other trappings. There is a Ruby benchmark suite being built (http://antoniocangiano.com/2008/06/01/help-me-create-the-ruby-benchmark-suite/). I’ve contributed my MatrixBenchmark to it, and will probably also be doing some of the statistical work as well.

Then there’s Ruby 1.8.7. I haven’t had a chance to experiment with it yet, but my understanding is that some of the syntax and semantics of 1.9 have been backported to the 1.8 MRI implementation. I think there are also some performance patches.

Then there’s Maglev. (http://headius.blogspot.com/2008/06/maglev.html) Then there’s the recent discovery of a security issue that affects all know MRI and KRI versions (http://www.rubyinside.com/june-2008-ruby-security-vulnerabilities-927.html) and the subsequent discovery that the patched versions segfault under some circumstances.

Finally, there is the continued brouhaha about whether Twitter scales or not. And if it doesn’t, is it Rails’ fault? I don’t know enough about either Twitter’s architecture or Rails to be able to join the debate, and given the fact that I’m a performance engineer for a living, it’s unlikely anybody will tell me enough to even make an informed guess without an NDA. :-)

So … if this is indeed, as I think it is, “life on the edge of chaos”, what does that mean? Well, for openers, let’s look at the “chaos” part. A lot of people are doing a lot of work that in the end will be discarded. That’s how this chaos thing works. I was very glad to hear that both IronRuby and Rubinius now run Rails, because if they couldn’t do that, there was no hope that they’d survive. None. Zero. Zip. Nada. Now at least there’s a chance that the work of those two teams won’t be discarded.

And if the claims of the Maglev team are true, I think the Ruby 1.9 and Ruby 2.0 efforts are in great peril. Dave Thomas is still hacking away at Pickaxe 3, and I think there are probably a couple more Ruby 1.9 books in the works, but I just don’t see the “industrial strength” support building for that branch of the Ruby evolutionary tree.

So what about the “life” part? Well, I think you will end up seeing Rails becoming a language itself, with its own “virtual machine”, independent of Ruby. Sure, it has a Ruby core, but it doesn’t use all of Ruby. There’s no reason on Earth why someone couldn’t take the internal domain-specific language(s) in Rails and turn them into external domain-specific languages — build compilers and run-times to run those languages an order of magnitude faster by eliminating the MRI/jRuby/Rubinius/IronRuby layer. The only question in my mind is whether such a project will be open-source or not.

  2 Responses to “Ruby, Rails and Life on the Edge of Chaos”

  1. Hey Ed, glad to see you’re back.

    I’m finally playing with Ruby now that I have a Rails project coming up. Coming from Python/Django, I appreciate that Ruby is a more flexible, Lisp-like language… and Rails has a few things like database migration that are sorely lacking in Django.

    But the chaos! It looks like developers are having a field day with 1.9, and the various 1.8.x versions aren’t even compatible with each other. That’s crazy. And people are building production software on this stuff! On the other hand, I’ve always said prototyping is a good thing, and you can’t always know how well new ideas will work until you try them in the real world. Call it wasted effort, call it practice, it’s par for the course in IT…

    I just hope that whenever it arrives, Ruby 2.0 brings some sanity and stability. Can Matz resist the temptation to add all the new features proposed for it? If he does, will the Ruby community ignore him? :-)

  2. So by chaos you mean rapidly changing?

    Also as a note I saw one of those weekly ruby surveys where people asked “which VM do you think you’ll beusing in a year’ and something like 70% thought they’d be on 1.9. Jruby has existed ‘rails compatible’ for something like a year and…it’s my hunch that most people haven’t adopted it, despite its benefits. So I’d say that the “chaos” will follow some stream or other. They’ll follow maglev if it ends up being super fast, and they’ll probably follow MRI until something shows up that is super faster than it–but that’s all guessing.

    And, of course also fascinatingly–it seems like all the code for existing Ruby projects existed in some form or other years ago in Perl modules or in Java libraries. Now we’re redoing more code. Maybe it’s an inevitable cycle. Or maybe there will end up being “one clear winner.” I hope so.

© 2011 Borasky Research Journal Suffusion theme by Sayontan Sinha