Hi Laurent,

On Tue, Aug 3, 2010 at 5:27 PM, Laurent d'Escrivan <
[email protected]> wrote:

> Hi all,
>
>
> I'm experimenting with the datastore 'namespace' option, which seems to be
> the datastore "Multitenancy" feature announced for prerelease SDK 1.3.6.
>
> (Issue http://code.google.com/p/googleappengine/issues/detail?id=945 )
>
> I managed to successfully isolate data by setting current namespace with
> google.appengine.api.namespace_manager.set_namespace.
>
> When a current namespace is set, datastore operations (and other APIs too,
> it seems) cannot reach other namespaces, except when it is overridden via
> the namespace="my_namespace" option (available for Model.all(), Query(),
> etc.)
>
>
> That being said, I would have some questions:
>
> 1. Is this going to be the official way of segmenting data for 2.3.6 ? Is
> it frozen or subject to future changes ?
>

The feature isn't yet officially released, but this is our current plan,
barring significant problems with it.


>
> 2. When instancing a model, I cannot override namespace via options
> keywords 'namespace' or '_namespace'. I can, however, override using
> _app=('myapp', 'my_namespace'). Why is the usage different from other
> functions ? (I would think _namespace would fit as well). Maybe there is a
> constraint I don't see.
>

Most likely this is because providing a separate _namespace parameter would
provide two different ways to override the namespace, without a clear
indicator of which supersedes the other.


>
> 3. Is there a way to list the different namespaces used ?
>

Not currently, no.


>  Or a way to fetch entities across every namespaces ?
>

Not to the best of my knowledge.


>  If I store data in a random namespace, and then forget about it, it looks
> like it lost forever and uses quota (like a memleak). A way of listing the
> namespaces would be great to prevent such "forgotten" data, and to show what
> is really in the datastore instead of what the app think there might be.
>

This is a good point. Please do file a feature request for this; in the
meantime your best option is probably to explicitly record the namespaces
you use - which is probably a good idea anyway, since you're likely to want
to store some per-namespace data.

-Nick Johnson


>
>
> Thanks,
> --
> Laurent d'Escrivan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to