Should namespace API be used in this situation?

47 views
Skip to first unread message

Chuck

unread,
Feb 13, 2015, 2:09:05 AM2/13/15
to google-a...@googlegroups.com
Dear all, 
So I am trying to create multiple domains like www.example.com, example.on.ca and es.example.com.  

The question is how to map each domain to the app. While the functionalities of the sites are the same, the datastore should be different (like different datas are stored and there can be different languages).  

In namespace API, I think it is suitable for multitenant application and I'm not sure if my situation is appropriate to use namespace api. Say you want to build es.example.com as a multi-tenant application, then you will need to compartmentalizing  each domain first then separate each namespace again for each user.  Correct me if I'm wrong. 

If anyone could advise what to use and how it should be approached, I'll be grateful. Thanks in advance.


Wolfram Gürlich

unread,
Feb 13, 2015, 3:15:51 AM2/13/15
to google-a...@googlegroups.com
Hi Chuck,

from our own experience I can say that namespaces work great for serving different domains from the same app. Haven't run into any issues with namespaces.

When building multi-tenant applications (which is what we do) it much depends on whether you need functionality that spans across tenants (like global reporting... etc.) 
If not and you're happy with each tenant living in its own little sandbox I would recommend using sub-namespaces to separate tenants. It's simple, secure and it scales...

If you need to act globally on tenant data I would suggest using composite indexes starting with the tenant ID to separate tenants while maintaining scalability.

Wolfram

Vinny P

unread,
Feb 16, 2015, 2:21:35 AM2/16/15
to google-a...@googlegroups.com
On Fri, Feb 13, 2015 at 1:09 AM, Chuck <foon...@gmail.com> wrote:
The question is how to map each domain to the app. While the functionalities of the sites are the same, the datastore should be different (like different datas are stored and there can be different languages).  
In namespace API, I think it is suitable for multitenant application and I'm not sure if my situation is appropriate to use namespace api. Say you want to build es.example.com as a multi-tenant application, then you will need to compartmentalizing  each domain first then separate each namespace again for each user.  Correct me if I'm wrong. 
If anyone could advise what to use and how it should be approached, I'll be grateful. Thanks in advance.


The approach you outlined is a perfectly good use of namespaces.

In your post you mention different languages - I would suggest reading up on how App Engine handles text encoding, such as this issue: https://code.google.com/p/googleappengine/issues/detail?id=2219
 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Reply all
Reply to author
Forward
0 new messages