Ruby and Rails supported on 10gen

http://www.10gen.com/blog/2008/12/ruby-support-on-10gen

It’s official: the 10gen open source cloud computing platform
(http://www.10gen.com) now supports Ruby and Rails. See the blog post
for details and links to documentation, the SDK, mailing lists, and
more.

The 10gen platform includes a multilingual app server and distributed
document database. You can grab the source or download a pre-built
SDKs from the Web site.

Note: the Rails support does not yet include ActiveRecord. We’re
working on it. In the mean time, you can access the database via an
AR-like set of classes or “raw”.

Jim

Jim M. wrote:

Note: the Rails support does not yet include ActiveRecord. We’re
working on it. In the mean time, you can access the database via an
AR-like set of classes or “raw”.

I hope we can help you upgrade to JRuby 1.1.6 :slight_smile: Much faster for many
cases, and some key leaks have been resolved.

  • Charlie

On Thu, Dec 18, 2008 at 8:32 PM, Charles Oliver N.
[email protected] wrote:

I hope we can help you upgrade to JRuby 1.1.6 :slight_smile: Much faster for many cases,
and some key leaks have been resolved.

Thanks. I briefly tried upgrading to JRuby 1.1.5, but ran across some
nasty JRuby bugs that weren’t scheduled to be fixed until 1.1.6.

Also, the Java interfaces to core classes are different enough that
I’m going to have to be careful. Some of my core classes inherit from
RubyArray and RubyHash.

Jim

On Fri, Dec 19, 2008 at 10:35 AM, Charles Oliver N.
[email protected] wrote:

We have hopefully not broken any methods on RubyArray or RubyHash that
you’re using; let us know if we have. Our intention has always been to keep
methods available until we deprecate them for several revisions, though we
occasionally slip up.

The mods to my RubyArray and RubyHash subclasses were pretty
painless—mostly supporting the new *19 methods and adding a context
to an arg list here and there.

However, I’m having problems with invokeSuper(). I used to use
invokeAs() and pass in the superclass, but the signature of invokeAs()
has changed. When I call invokeSuper() I’m seeing a NPE. It’s because
context.getFrameKlazz() is returning null.

I’ve written up this description in much more detail on the JRuby list.

I think the performance improvements and bug fixes alone will be worth
making the move at any rate.

I want to do it, really. I just have to get past this invokeSuper()
NPE…and then see what’s next, of course.

Jim

Jim M. wrote:

I’m going to have to be careful. Some of my core classes inherit from
RubyArray and RubyHash.

We have hopefully not broken any methods on RubyArray or RubyHash that
you’re using; let us know if we have. Our intention has always been to
keep methods available until we deprecate them for several revisions,
though we occasionally slip up.

I think the performance improvements and bug fixes alone will be worth
making the move at any rate.

  • Chrlie

Jim M. wrote:

to an arg list here and there.

I want to do it, really. I just have to get past this invokeSuper()
NPE…and then see what’s next, of course.

We should probably talk a bit more about how you’re using the core JRuby
classes. We have plans in the future that could more drastically change
some of the core classes, and it sounds like you would certainly be
affected by such changes.

  • Charlie

On Fri, Dec 19, 2008 at 2:56 PM, Jim M. [email protected]
wrote:

BigDecimal object. (I’ve described this in a separate email to the
By the way, the source code is open source. See
http://github.com/10gen/babble/tree/master/src/main/ed/lang/ruby for
the directory containing most of the code I’m talking about.

By “the source code”, I mean the source code to the 10gen app server
that uses JRuby.

Jim

Jim M. wrote:

Note: the Rails support does not yet include ActiveRecord. We’re
working on it. In the mean time, you can access the database via an
AR-like set of classes or “raw”.

Jim

Am I the only one who thinks “supports Rails” and “does not yet include
ActiveRecord” are an oxymoron? ActiveRecord is the core of Rails, is
it not?


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC§, WOM

I’ve never met a happy clam. In fact, most of them were pretty steamed.

Charles,

On Fri, Dec 19, 2008 at 2:13 PM, Charles Oliver N.
[email protected] wrote:

However, I’m having problems with invokeSuper().

Fixed, thanks to an answer in the mailing list.

My next problem: seeing an assertion error when trying to create a
BigDecimal object. (I’ve described this in a separate email to the
JRuby list).

We should probably talk a bit more about how you’re using the core JRuby
classes. We have plans in the future that could more drastically change some
of the core classes, and it sounds like you would certainly be affected by
such changes.

That would be great. What would be the best communications channel for
such a discussion?

By the way, the source code is open source. See
http://github.com/10gen/babble/tree/master/src/main/ed/lang/ruby for
the directory containing most of the code I’m talking about.

Jim

On Sat, Dec 20, 2008 at 10:19 PM, M. Edward (Ed) Borasky
[email protected] wrote:

Am I the only one who thinks “supports Rails” and “does not yet include
ActiveRecord” are an oxymoron? ActiveRecord is the core of Rails, is
it not?

Actually, you can run Rails without ActiveRecord just fine. Rails has
been designed that way. For an example app that uses the Mongo
database (http://www.mongodb.org), see
https://github.com/jimm/rorob/tree/master.

On the other hand, internally we have a subset of ActiveRecord working
already and are working on supporting as much of it as makes sense
with a non-relational database. I already have the Rails app from
“Agile Web D. With Rails” running unchanged.

On the gripping hand, you can run the 10gen cloud yourself, in which
case you can run it with MySQL or any other relational database. In
that case, you can use ActiveRecord unchanged.

Jim

On Sun, Dec 21, 2008 at 8:31 AM, Jim M. [email protected]
wrote:

https://github.com/jimm/rorob/tree/master.
Oops. That should be http://github.com/jimm/10gen-rorob/tree