Search code examples
mongodbmongooseaggregation-frameworkmorphiaodm

MongoDB Morphia Compatibility Matrix


I have a project that whose mongo DB version is being migrated from 3.2 to 4.0. As mongo DB doesn't allow an ecosystem to jump directly from 3.2 to 4.0, so we migrated like this: 3.2 -----> 3.4 -----> 3.6 -------> 4.0

We use morphia ODM in our code. While we were using v1.1.1 till 3.4 and started using v1.3.2 for further upgrades which seems to worked, it caused a lot of experiments as to versions being compatible with mongo or not?

  1. Is there any reference from where i can get the compatibility matrix from mongo db with morphia?

  2. Since 3.6 Aggregation framework needs a batch size parameter, what is the reason for that? What is the underlying change that has been done in morphia?

  3. I see org.mongodb.morphia development is stopped since 2017, and dev.morphia has emerged, are they a new org now?


Solution

    1. There's not an official matrix, but you if you look at the .travis.yml file you can see what's being tested at least. There's an open issue to formalize this matrix but that's pending a probable rework of the entire documentation setup. For the most part, server compatibility is driven by the driver you use. Generally speaking, newer server versions should would just fine with the older driver/morphia releases and the backwards compatibility should go as far back as 3.0 easily and in many cases as far back as 2.4/2.6.
    2. I'm not sure what you mean about the batch size parameter. Are you saying that morphia is requiring that or the server? Neither way rings any bells for me. That API is somewhat deficient. It was begun as a prototype of sorts but I failed to make that sufficiently obvious and then ran out of time to fix it. (See the next bullet point.) I am, however, building out a much more complete, robust aggregation API in 2.0 which should be much easier to use and extend than the current one.
    3. As for the org.mongodb.morphia vs dev.morphia split, here's the history there: I was the engineer responsible for morphia for years while I worked at MongoDB. When I left the company to pursue other efforts, development on morphia effectively stopped. As an outsider, now, I didn't have the access I used to. After a while, I finally asked MongoDB if they'd be willing to hand the project over to me and let me continue it which they graciously did. So now morphia is a community driver project rather than an official (ish) MongoDB offering. Morphia is homed under a new github organization and is under as active of development as I can sustain. 2.0 is getting closer and closer all the time with aggregation being the primary blocker at this point and, to a lesser degree, geo support. I have pushed an ALPHA or 2 and will have a new one up once the agg framework is "done."