Archive for May, 2008

MagLev rocks and the planning of the next Ruby shootout

Antonio Cangiano May 31st, 2008

MagLevI’m not at RailsConf, which is being held in Portland, but it doesn’t take a great leap of faith for me to believe that the session on MagLev was the star of the conference. Avi’s demo created quite an echo and it’s currently the most discussed topic in the Ruby and Rails communities, despite the announcements of IronRuby on Rails and today’s release of Rails 2.1.

I had no doubt that this would be the case. For the past few days, and before RailsConf, I’ve been in touch with the nice people at Gemstone and witnessed, before most, the speed of the current implementation. My first comment truly was “Holy Shit!” and I don’t like to swear. ;) In a side-by-side comparison, it was like watching a race between an eight week old chubby bulldog (Ruby MRI) and a full grown jaguar (MagLev). Ruby MRI looked cute, I was almost cheering for it (”come on Ruby, you can do it”). It was so spectacular that you couldn’t help but think that they were pulling your leg.

MagLev is not complete yet, but it’s very remarkable that it accomplished so much, both in terms of tests passed and its speed - despite being only three months old. It speaks volume about the capabilities of the Gemstone platform (on which MagLev is based upon) and MagLev’s team work.

Let’s be clear about one point, this announcement changes everything; it has the potential to revolutionize the Ruby community. It’s not just a matter of a substantial speed increase, Ruby’s main weakness, it’s also a matter of scalability, paradigm shift and Enterprise perception.

When you get to use an object persistence model that can hold up to 17 Petabytes (that means 17 Million Gigabytes for you), with the ability to scale by simply adding instances, the whole “Ruby doesn’t scale” FUD starts to fade real fast. Also, aside from all the technical advantages brought by MagLev, selling a Gemstone based solution to environments that are typically harder for Ruby to penetrate into, becomes a no-brainer. It’s a newfound ticket for Ruby and Rails into many sectors of the Enterprise, and an easy entrance in the financial world as well.

MagLev is unconventional, but that’s because most impressive innovations tend to be so. That’s what the future looks like when seen through the eyes of the present. The reality is that MagLev’s OODB paradigm and architecture are quite a good fit for common Web development too, so if properly pulled off, MagLev could change the way we write Rails applications.

A few people objected that it won’t fly, because it’s going to be a commercial product. I don’t think that’s the case. The Rails community adopts Macs, TextMate, and other commercial software without blinking, so why would they have any issues with paying for a truly superior Ruby VM (if it proves to be so)? The terms of release for MagLev have not been finalized yet, but it’s clear that some part of it will be open and others (e.g. the actual VM written in C) closed source. It’s likely that there will be different pricing levels, including a free version with some limits in place. But price will mostly be irrelevant.

Planning the next Great Ruby Shootout

The great news is that the next edition of my shootout will include MagLev, so we’ll get to test it in a fair and controlled environment, against all the other major implementations. The results of the shootout will be published sometime in June. These are the implementations that I’ll most likely test:

  1. Ruby MRI
  2. Ruby 1.9
  3. JRuby
  4. Rubinius
  5. MagLev
  6. Ruby Enterprise Edition
  7. IronRuby
  8. IronRuby on Mono

I’ll probably test them on Ubuntu 8.04 (32 and 64 bit), Mac OS X Leopard and Windows Vista (32 bit). Please note that not all eight of them can be tested on each of the four platforms, so you won’t see MagLev on Windows or Linux 32 bit, for example. I’d like to test all four operating systems from the same machine (my MacBook Pro Core 2 Duo 2GHz SR, with 2GB of RAM) so that we can also compare how these major implementations behave on different operating systems, but I may have to opt for some native installations and carrying out others from VMware Fusion; I’ve yet to sort all the details out. ;-)

A criticism that I’ve often heard is that these micro-benchmarks are well known and specifically targeted for speed by the implementations’ authors. The new shootout will also include a set of tests that no one has seen before (I just started to write/put them together). They may still be synthetic benchmarks, but they’ll help us form a better idea of the actual speed of these VMs.

WordPress 2.5.1 breaks your Atom feed

Antonio Cangiano May 29th, 2008

I just realized that unfortunately WordPress 2.5.1 breaks the Atom feed located at /wp-atom.php or at /feed/atom, which I used as a source for my FeedBurner feed.

This issue has now been resolved, by replacing the source for FeedBurner with /?feed=atom. As a reader, you won’t have to do anything; the last three posts since my upgrade to WP 2.5.1 and new ones that I’ll publish in the future, will now show up in your feed reader as they should.

If you’re in a similar situation, edit FeedBurner’s source to point to http://antoniocangiano.com/?feed=atom (change it to your own domain name, of course). If you don’t use FeedBurner, but advertise your Atom feed in your blog, change the links accordingly.

I made this short post to alert other bloggers who may not even realize that their readers aren’t receiving any updates, and to apologize to the readers who follow my blog through its feed.

This Week in Ruby (May 29, 2008)

Antonio Cangiano May 29th, 2008

This is the 9th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.

Ruby

Two days ago JRuby 1.1.2 was released. Amongst several bug fixes and improvements, this release is characterized by a focus on performances. Startup time, threading, method calling and YAML symbol parsing have all been drastically improved.

Huw Collingbourne of SapphireSteel, has announced that he’ll be releasing a complete book on Ruby, chapter by chapter, free of charge online. After reading the first chapter, I can attest that it’s excellent. Keep an eye on it, as new chapters get added.

The Pragmatic Programmers put out a series of screencasts for sale. The most relevant series for Ruby programmers is Everyday Active Record. The first two episodes (a half an hour long, each) are out and can be purchased for just $5 a piece. The preview — and Ryan Bates’s reputation — lead me to believe that they are entirely worth their very reasonable sticker price. Speaking of screencasts, a new one about merb-slices was released on Merbunity, check it out if you’re into Merb.

There were two important releases last week, Mack 0.5.5 — which features a new rendering engine with support for Haml and Markaby — and DataMapper 0.9, a major reworking of the ORM. A third release, which is perhaps just as welcomed, was launched by _Why who included a few graphical improvements for Shoes, his GUI application toolkit. Definitely neat stuff, which I invite you to take a look at if you’re working on a Mac.

Peter Cooper published 21 Ruby Tricks You Should Be Using In Your Own Code. You probably know already most of the common ones at least, but they’re quick and fun, so if you haven’t checked out the post yet take a moment and do so. Other must-read tutorials and articles were Ruby && DTrace! (really neat results), Ruby EventMachine – The Speed Demon by one of my favorite Ruby bloggers, and Will’s Guide to Mashing-up Remote Databases using Page Scraping.

In a post made a couple of days ago, Robert Fischer opened up a can of worms by bringing up the issue of Ruby and XML libraries. As most of you know REXML is far from being issue-free (performance in primis), and in The Status of Ruby’s libxml Robert uncovers that the author of LibXml Ruby is unable to actively pursue the development of his extension. This issue concerns me, but if I’m working with databases, I prefer to take advantage of DB2 Express-C ’s fantastic pureXML features, which give me the sort of speed, flexibility and stability that I won’t find in a Ruby library anytime soon.

Before highlighting some of the news from Rails-land, I wanted to inform you that a new version of The Great Ruby Shootout will surface in June, as I intend to test a couple of special new entries.

Rails

Today, RailsConf 2008 started and it certainly stands a great chance of being dubbed an exhilarating event. A few people enquired to see if they could meet me there, but unfortunately I couldn’t make it. Chances are that you’re reading this post from RailsConf. If that’s the case, say hi for me and don’t forget to visit the nice fellas from Engine Yard, Morph (my sponsor), Phusion and GemStone. Oh and also, feel free to pass around the url of this entry. ;)

Rails 2.1 RC1 is out, so you’ll find this article on upgrading to Rails 2.1.0_RC1 useful. Fabio Akita released a new version of his popular tutorials, Rolling with Rails 2.1 (part 1 and part 2). And if you are looking for an advanced authentication/authorization system for Rails 2, take a gander at Lockdown on RubyForge.

My friends at SeeSaw implemented a series of Rails Widgets which can easily be installed as a Rails plugin. Feel free to use them and/or contribute, in order to add further support for simplifying and reusing common UI elements. Speaking of shiny things, check out this Ruby on Rails icon pack; very pleasing to the eye, in my opinion.

RubyInside published a list of 28 mod_rails / Passenger Resources To Help You Deploy Rails Applications Faster. As DHH forecasted, “this could definitely become very popular, very fast ;)”.

New Relic released their RPM solution for monitoring and improving the performances of Rails applications to the general public. You can get it here.

And finally, some great news just came in, IronRuby is running unmodified Rails. “Excellent” (said in Montgomery Burns’ voice, complete with characteristic hand gesture).

Next »