Mongoid 3 storage

24 views
Skip to first unread message

Reed Law

unread,
Apr 12, 2013, 2:41:15 PM4/12/13
to openwfe...@googlegroups.com
Because our application needs features in mongoid 3.x I have begun implementing a new storage based on John Mettraux' ruote-mon storage. Mongoid 3 is using it's own mongodb driver, called moped, instead of 10gen's mongo-ruby-driver.

Unfortunately I haven't been able to successfully implement the storage yet due to issues that seem to stem from multi-threading. I've got up to 33 out of 35 tests passing (while running ruote's test/functional/storage.rb against my storage).

If anyone else needs this I would greatly appreciate some feedback on what I may be doing wrong or possible alternatives:

Thank you,
Reed Law

John Mettraux

unread,
Apr 12, 2013, 6:05:33 PM4/12/13
to openwfe...@googlegroups.com
Hello Reed,

I tried to run with Ruby 1.9.3p327 and MongoDB 1.4.4-3 on an 64bits
Debian GNU/Linux. It crashed:

https://gist.github.com/jmettraux/5375516

Probably my archaic Mongo.

What are you running on?


> If anyone else needs this I would greatly appreciate some feedback on what
> I may be doing wrong or possible alternatives:

An alternative would be to use ruote-mon and use Mongoid for the features you
need (if they're read-only feature it may be a match).


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

John Mettraux

unread,
Apr 12, 2013, 6:20:00 PM4/12/13
to openwfe...@googlegroups.com

On Fri, Apr 12, 2013 at 11:41:15AM -0700, Reed Law wrote:
>
> Because our application needs features in mongoid 3.x I have begun
> implementing a new storage based on John Mettraux' ruote-mon storage.
> Mongoid 3 is using it's own mongodb driver, called moped, instead of
> 10gen's mongo-ruby-driver.
>
> Unfortunately I haven't been able to successfully implement the storage yet
> due to issues that seem to stem from multi-threading. I've got up to 33 out
> of 35 tests passing (while running ruote's test/functional/storage.rb
> against my storage).
>
> If anyone else needs this I would greatly appreciate some feedback on what
> I may be doing wrong or possible alternatives:
>
> https://github.com/reedlaw/ruote-moped

Hello,

sent pull request with better "how to run tests" explanation (yes I have to
upgrade ruote-mon as well :-) )

https://github.com/reedlaw/ruote-moped/pull/1

Reed Law

unread,
Apr 13, 2013, 11:23:34 AM4/13/13
to openwfe...@googlegroups.com
Hello John,

I get crashes too, but they are intermittent leading me to suspect concurrency-related issues.

I am running this version of mongodb:
db version v2.4.1
Sat Apr 13 11:20:15.687 git version: 1560959e9ce11a693be8b4d0d160d633eee75110

Thank you for the pull request. I am looking into your suggestion of using both the 10 gen driver and moped driver in my application. I would rather just use one, so on Monday I will continue investigating ruote-moped storage issues.

Thanks,
Reed
Reply all
Reply to author
Forward
0 new messages