Issue #10 wontfix

MongoDB backend: switch to MongoEngine?

Andy Mikhailenko
repo owner created an issue

Currently we use the default [[http://pypi.python.org/pypi/pymongo|PyMongo]] which is a moderately low-level library.

Other options: [[http://pypi.python.org/pypi/pymongo-bongo/|MongoBongo]] ([[http://github.com/svetlyak40wt/pymongo-bongo/|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; [[http://pypi.python.org/pypi/mongokit/|MongoKit]] ([[http://bytebucket.org/namlook/mongokit/wiki/html/index.html|docs]], [[http://bitbucket.org/namlook/mongokit/src/|code]]) which is really interesting but incompatible with PyModels as it best deals with nested JSON schemata, not plain documents; [[http://pypi.python.org/pypi/Ming/0.2|Ming]] ([[http://merciless.sourceforge.net/|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; [[http://hmarr.com/mongoengine/|MongoEngine]] ([[http://hmarr.com/mongoengine/apireference.html|docs]], [[http://github.com/hmarr/mongoengine|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