status of Mongo Mapper

73 views
Skip to first unread message

Jamie Orchard-Hays

unread,
Jul 7, 2015, 11:17:35 AM7/7/15
to mongo...@googlegroups.com
Hey Mongo Mapperers:

I’m curious about the status of MM. Any current plans for the future? Is conversion to Mongo Ruby driver 2.x on the horizon?

Cheers,

Jamie

Chris Heald

unread,
Jul 7, 2015, 2:36:30 PM7/7/15
to mongo...@googlegroups.com, jami...@gmail.com
The 2.x driver is kind of a mess, IMO. It is very clearly designed to serve Mongoid and it's pretty obvious that only web apps were considered when writing it (you can only talk to one database per client instance, it has a single global logger that doesn't permit separate logging levels per client/database), and as a result it breaks a lot of the conventions from the 1.x driver that would have substantial implications for MongoMapper. It's also fairly unstable (I've run into thread cross-talk bugs) and incomplete (no ability to set cursor flags, for example, really awful logging mechanisms); I've done a few small projects with it, and I've had to use my own forked version just to get parity with 1.x features. It's improving, but right now, my personal opinion is that it's a pretty substantial regression from the 1.x series driver. I imagine that rebuilding MM against it would be quite painful. It's also, curiously, extremely slow for me under MRI, though JRuby performance is pretty decent. I haven't yet dug into why.

I'd like to do a new major version of MM for Rails 5 and mongo-ruby 2.x eventually, but that is a huge undertaking which I don't have any time for at the moment, personally. It's something I've started to poke at a few times, but it's a deep project.

Jamie Orchard-Hays

unread,
Jul 7, 2015, 2:44:18 PM7/7/15
to mongo...@googlegroups.com
Thanks for the exposition on 2.x. I had no idea. I was partly motivated to ask based on a bug report I filed on the 1.12.x driver:


Jamie


--
You received this message because you are subscribed to the Google
Groups "MongoMapper" group.
For more options, visit this group at
http://groups.google.com/group/mongomapper?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "MongoMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongomapper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Heald

unread,
Jul 7, 2015, 2:47:28 PM7/7/15
to mongo...@googlegroups.com, jami...@gmail.com
Yeah, the op_timeout addition was kind of annoying - it bit me too. You can provide `options: {op_timeout: 3600}` (or some other substantially-high value) if needed when you set up MM.

Jamie Orchard-Hays

unread,
Jul 7, 2015, 3:31:16 PM7/7/15
to mongo...@googlegroups.com
Is that all I need? In an initializer, I assume?

Jamie

Chris Heald

unread,
Jul 7, 2015, 3:33:53 PM7/7/15
to mongo...@googlegroups.com
If you're using mongo.yml, you'd just add it there:

    production:
      host: localhost
      database: my_app
      options:
        op_timeout: 3600

If you're doing your own MongoMapper.setup call, then you'd add it to the config hash passed in.

Jamie Orchard-Hays

unread,
Jul 7, 2015, 3:38:50 PM7/7/15
to mongo...@googlegroups.com
Cheers, Chris!

Jamie
Reply all
Reply to author
Forward
0 new messages