Changes between Version 21 and Version 22 of NoSqlSupport


Ignore:
Timestamp:
12/03/2013 05:45:41 PM (15 months ago)
Author:
aburgel
Comment:

Update status on tickets, add links to tickets and update URLs

Legend:

Unmodified
Added
Removed
Modified
  • NoSqlSupport

    v21 v22  
    88}}}
    99
    10 The [http://www.allbuttonspressed.com/projects/django-nonrel Django-nonrel] branch of Django already provides support for NoSQL and it requires only minimal changes to Django's ORM. However, for the more interesting features like `select_related()` Django's ORM needs to be refactored and simplified in several areas. Many of the sections in this page are described from the point of view of Django-nonrel since a lot of experience required for official NoSQL support has been integrated in the Django-nonrel project.
     10The [http://django-nonrel.org/ Django-nonrel] branch of Django already provides support for NoSQL and it requires only minimal changes to Django's ORM. However, for the more interesting features like `select_related()` Django's ORM needs to be refactored and simplified in several areas. Many of the sections in this page are described from the point of view of Django-nonrel since a lot of experience required for official NoSQL support has been integrated in the Django-nonrel project.
    1111
    1212For the record, Django-nonrel has quite a few backends, already:
    1313
    14  * App Engine: [http://www.allbuttonspressed.com/projects/djangoappengine djangoappengine]
    15  * MongoDB: [https://github.com/django-mongodb-engine/mongodb-engine django-mongodb-engine]
     14 * App Engine: [https://github.com/django-nonrel/djangoappengine djangoappengine]
     15 * MongoDB: [https://github.com/django-nonrel/mongodb-engine django-mongodb-engine]
    1616 * !ElasticSearch: [https://github.com/aparo/django-elasticsearch django-elasticsearch]
    1717 * Cassandra: [https://github.com/vaterlaus/django_cassandra_backend django_cassandra_backend]
     
    4545= select_related() =
    4646
    47 [https://code.djangoproject.com/attachment/ticket/16385/0ad3af376503d32dab0adb8c9aaa57bd389ea0b2.diff Patch]
     47Tickets: #17335
    4848
    4949 Problem:: Django's internal representation of `select_related()` depends on JOINs, which aren't supported on NoSQL DBs.
     
    5151 Solution:: Django needs to provide a simpler internal representation of `select_related()` which allows the backend to easily retrieve the related models and their selected fields (so deferred fields aren't loaded unnecessarily).
    5252
    53  Implementation status:: Django-nonrel merely provides a `connection.feature.supports_select_related` flag which tells `QuerySet` that the backend won't return additional data for the related data in the result rows (otherwise `select_related()` causes bad results full of `None` values). All NoSQL backends set this flag to `False`.
     53 Implementation status:: This has been merged. Django now provides a `connection.feature.supports_select_related` flag which tells `QuerySet` that the backend won't return additional data for the related data in the result rows (otherwise `select_related()` causes bad results full of `None` values). All NoSQL backends set this flag to `False`.
    5454
    5555= !AutoField =
    5656
    57 [https://code.djangoproject.com/attachment/ticket/16385/043f2c08b87dda585d40a1ab225106543909f4a6.diff Patch]
     57Tickets: #17337
    5858
    5959 Problem:: Currently, `AutoField` assumes that it's always an integer. However, in several NoSQL DBs (MongoDB, SimpleDB, etc.) the primary key is a string.
     
    6969= INSERT vs UPDATE =
    7070
    71 [https://code.djangoproject.com/attachment/ticket/16385/2885579c6f8a2f41422788b0abdee3da816144f8.diff Patch]
     71Tickets: #17340
    7272
    7373 Problem:: Currently, `Model.save_base()` runs a check whether the pk already exists in the database. This check is necessary for SQL, but it's unnecessary and inefficient on many NoSQL DBs which have an "upsert" operation that inserts or overwrites the entry in the DB. App Engine also doesn't allow to run queries within (optimistic) transactions, so the current `save()` method doesn't work on App Engine.
     
    119119This is already implemented in Django-nonrel.
    120120
    121 == !ImageField ==
    122 
    123 Currently, !ImageField depends on PIL. It might be necessary to provide a backend API for sandboxed platforms (like App Engine) that don't provide PIL support.
    124 
    125 This is not implemented in Django-nonrel.
    126 
    127121= Serializers =
    128122
     
    135129For optimization purposes it's very important to allow batch-saving and batch-deleting a list of model instances (which, in the case of batch-deletion, is not exactly the same as `QuerySet.delete()` which first has to fetch the entities from the DB in order to delete them).
    136130
    137 This is not implemented in Django-nonrel, but Vladimir Mihailenco has implemented a patch which could be integrated.
     131This is not implemented in Django-nonrel, but [http://vladimir-mihailenco.appspot.com/articles/1001/batch-operations-support-for-django-nonrel/ Vladimir Mihailenco] has implemented a patch which could be integrated.
    138132
    139133= Transactions =
     
    158152= Auth password reset URLs =
    159153
    160 #14881, [https://code.djangoproject.com/attachment/ticket/16385/c9f97bd7397a39ebcb9f8831b28d5ab3b4e57038.diff Patch]
     154Tickets: #14881
    161155
    162156 Problem:: `django.contrib.auth`'s password reset URLs contain a base36-encoded user ID (`/reset/<user-id>/<token>/`). Several NoSQL backends (MongoDB, SimpleDB, etc.) use string-based primary keys. The password reset feature breaks if the user ID (the primary key) is not an integer (because base36 can only express integers).
     
    164158 Solution:: Encode the user ID in a URL-safe variant of base64. This is a backwards-incompatible change that breaks "old-style" password reset URLs, but backwards compatibility should be very easy to implement if required.
    165159
    166  Implementation status:: This is already implemented in Django-nonrel, but it's not yet backwards-compatible.
     160 Implementation status:: This has been merged.
    167161
    168162= Minor issues =
Back to Top