MagLev, Ruby VM on Gemstone OODB, Wows RailsConf 132
murphee ends along a report from InfoQ: "Gemstone demoed [MagLev,] their Ruby VM built on their GemStone S64 VM, to an ecstatic audience. Gemstone's Smalltalk VM allows OODBs of up to 17 PetaBytes, with none of the old ActiveRecord nonsense: the data is persisted transparently. The Gemstone OODB also takes care of any distribution, allowing the Ruby VM and data to scale across many servers (Cheerio, memcached!). There's also an earlier quite technical interview with Gemstone's Bob Walker and Avi Bryant about MagLev."
Ruby Shootout (Score:5, Interesting)
Ruby 1.9: 3.32x
XRuby: 1.43x
JRuby: 1.32x
Ruby 1.8: 1.0x
Rubinius: 0.73x
Ruby.NET: 0.56x
What is cool is how well the Java-based Ruby implementations do: JRuby and XRuby. JRuby was the only Ruby implementation that did not have any tests error. For a VM that is supposedly so hostile to dynamic languages, those implementations were faster and more reliable than the actual Ruby VM and cleaned the floor with the CLR/.NET implementation. And the next version of Java should have stack allocations and invokedynamic bytecode and other optimizations.
What this shows to me is, first do one thing well (Java), then figure out how to grow it. In contrast to
Re:Talk really did wow the conference (Score:2, Interesting)
OODB, oh oh (Score:3, Interesting)
Re:Sounds cool, but not open (Score:2, Interesting)
Re:Ruby Shootout (Score:4, Interesting)
Adding a simple global+=1 to the method body makes Java only 16,000 times faster than Ruby 2.8.
Replacing the +1 with global*=5 makes the Java version only 536 times faster than Ruby 2.8.
These are the kinds of optimizations MagLev is doing, and they don't translate into anywhere near the gains in actual code. So you see, you really need to rethink your tests. Even for something seemingly ok like modifying a global can depend on how it is modified and what the VM can optimize (+1 vs *5). Frankly I would just test these different Ruby implementations using the regular shootout [debian.org] code, since these have been designed not to be optimized out.
Re:OODB, oh oh (Score:2, Interesting)
The question is, what powerful primitives does an OODBMS offer you? What efficiency advantages do they have over naive 'fetch record; do something; fetch another record' procedural code for dealing with large amounts of data? How can they take advantage of indexing or optimize cache usage to reduce disk seeks?
Re:I'm sorry... (Score:2, Interesting)
Don't know the specifics of what they do in Maglev for ruby.
Because the runtime of an OODB program is measured in years, not hours, the layout of its objects tends to change a lot. And the libraries and runtimes tend to support this, whereas in plain old programs it is not supported.
In GemStone/S, they support this amongs other things by allowing you to have "previous versions" of a Person class. So, to add birthdate to a Person, you'd load a new version of the Person class, loop over all instances of the previous version, frob their data, and continue running.
But the frobbing code would be plain old Smalltalk (or Ruby, in the case of Maglev; or Java, in the case of GemStone/J) code.
Look, here's pseudocode for a non-persisten Person object constructor (I'l spare you the Smalltalk syntax):
createPerson(aName, aSurname)
name
surname
Here's pseudocode for the equivalent code inside a persistent OODB:
createPerson(aName, aSurname)
name
surname
commit()
Compare this to using a relational database in as a backing store for objects intended to be used in an OO program.
Re:news that matters? (Score:3, Interesting)
Evidently not.
You can download GemStone/S 64 Web Edition for free, and use it free (for commercial use, too!). Only when your database grows beyond about 2 gigs, you need to get a license, which is about $7000 a year.
It's that sort of bullshit that killed systems like Smalltalk in the market. Companies like Gemstone will still be able to extract money from their captive audience for a couple of decades, but mainstream platforms are eating away at their market share, year after year.
The only chance platforms like this have is to go open source and sell high-end add-ons and support.
They haven't incorporated ruby into GemStone/S to make it attractive; they haven't incorporated it into GemStone/S at all.
Well, then you can add to all their other problems an unfocused product strategy and lack of integration across their product line.
Re:Sounds cool, but not open (Score:3, Interesting)
What I'm objecting to is the loss of SQL and PL-SQL that occurs with OORDBMS's. Relational programming is an extra tool in the toolbox, and a very valuable one for the issues that surround large or complex datasets. Relational programming provides a proof/set theory/mathematical view of your data that is mostly orthogonal to how Object systems want you to think about data. Using an OORDBMS eliminates a whole way of thinking about data. Exactly my point. Don't wedge yourself into a corner down the road where an integration that requires SQL can't possibly work just because you chose an OODBMS.
Re:OODB, oh oh (Score:2, Interesting)
Efficiency I don't know. But with a good OODB you do not "fetch record, do something, write start over". You just do it. In your typical ZODB application there is no difference between doing something on objects in memory and doing it on objects stored in the database. The only difference is that the objects inherit from a persistent subclass.
The benefit of this i that you no longer have to design the database. You design your objects as you would use them, and that's it. The database part is completely transparent. You don't have to care that there is a database there. This speeds up development something fantastically.