MongoDB backend: switch to MongoEngine?

Issue #10 wontfix
Andy Mikhailenko
repo owner created an issue

Currently we use the default [[|PyMongo]] which is a moderately low-level library.

Other options: [[|MongoBongo]] ([[|code]]) which is arguably too simplistic: it a) defines models as property-agnostic objects bound to collections (that's irrelevant for us as PyModels' greatest feature is natural identification within a single collection, so we interpret collections as distinct storages), and b) leaves intact the PyMongo's major wart, the query syntax; [[|MongoKit]] ([[|docs]], [[|code]]) which is really interesting but incompatible with PyModels as it best deals with nested JSON schemata, not plain documents; [[|Ming]] ([[|docs]]) which is in some crazy way close to our API, provides MongoDB-specific validation tools (a bit like MongoKit but the latter does that in a more elegant way) and even migration tools, but leaves the above-mentioned wart intact; [[|MongoEngine]] ([[|docs]], [[|code]]) which somewhat duplicates our model API and provides a decent query API; I think we could reuse/wrap some of its functionality to provide a solid backend-independent API without hiding away the backend-specific implementation of properties and queries.

Comments (5)

  1. Andy Mikhailenko reporter

    Reviewed and decided that switching is not needed. MongoKit, MongoEngine, MongoBongo and Ming add too much logic. The storage/query adapters would have to ignore most features because the Docu core already implements them in a backend-agnostic way. Pymongo is just enough.

  2. Log in to comment