Ruby and Rails supported on 10gen


#1

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


#2

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

#3

On Thu, Dec 18, 2008 at 8:32 PM, Charles Oliver N.
removed_email_address@domain.invalid 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


#4

On Fri, Dec 19, 2008 at 10:35 AM, Charles Oliver N.
removed_email_address@domain.invalid 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


#5

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

#6

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

#7

On Fri, Dec 19, 2008 at 2:56 PM, Jim M. removed_email_address@domain.invalid
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


#8

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.


#9

Charles,

On Fri, Dec 19, 2008 at 2:13 PM, Charles Oliver N.
removed_email_address@domain.invalid 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


#10

On Sat, Dec 20, 2008 at 10:19 PM, M. Edward (Ed) Borasky
removed_email_address@domain.invalid 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


#11

On Sun, Dec 21, 2008 at 8:31 AM, Jim M. removed_email_address@domain.invalid
wrote:

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