On Tuesday, April 22, 2014 10:06:24 AM UTC-3, SMF wrote:
>
> Hi there
>
> I have a few basic questions 
>
> 1. If I have 1000+  Namespaces, how will they get displayed in the App 
> Engine Admin Console (Datastore Viewer), 
> Right now I have few and they are displayed in a dropdown box.
>

 I am curious about it too. I haven't a large number of tenants yeat but 
would be nice to know how to handle it. But I have a feeling that the UI 
will be the same and probably we will must to handle it developing the 
tools to make administrative tasks on each tenant.
 

>
>
> 2. I have a Multi-Tenant app where each tenant has its own namespace. the 
> model and entities related to the tenant is within their respective 
> namespace except for the User entities each tenant can have multiple users. 
> thats why all users are stored without any namespace.
>
> The user's  UserId ,name and TenantId (also used as namespace) is stored 
> in the Users Model 
>
> After user log's in through Google , We Query this Model to Find the 
> Namespace of the logged in User, Once found we set it and use it for 
> reading / storing entities in their respective  namespace.
>
> My Question is What could go wrong with this approach ?, and do we have 
> any better solution for handling Multiple Tenants with Multiple User 
> Accounts. 
> We need to do this without using Sub Domain Names and URL Paths 
> (Containing the namespace id or key)
>
>
 I have done things a litle different. I have created a unique user for 
login purpose on the empty namespace. After that i used this "universal" 
user id to make a link with a namespace aware user. So basicly i have 1 x N 
relationship without the need to keep the Tenants id on entities.

 Another thing I have done on empty namespaspace is keeping record for all 
of them. So I have a Namespace entity which stores namespace data. I two 
strategies to map tenants:

1) Google Apps. If client wants a personal domain, I use it to map to a 
desired namespace

2) My subdomain. So the foo.mydomain.com would make the client access the 
"foo" namespace

The only problem with this approach is that in both you must configure your 
subdomain on Google Apps, and maybe that is why you are avoiding this 
approach.
 

>
> 3. We also need to have (CRON) Jobs which will run at a minimum of 3 times 
> a day to Query Some Entities and Update Some and Send the Report to the 
> Tenants users. In this case we would have to Query the meta data to get 
> list of namespaces, and then for each namespace query the desired entities.
> This would increase the cpu and memory consumption, is there any better 
> way to run CRON on multiple namespaces.
>
>
I fact i use same approach. The only diffence is that my cron query 
namespace metadata and starts a Task Queue on each, once this api is 
namespace aware. Of course there is the cost of this cron job, but compared 
to tasks, it is little most of times.
 

>
> Any help will be highly appreciated.
>
> Thanks
> Sarfaraz
>
>
>
This is an excelent post and I will be reading further answers.

 Regards,
 Renzo
 

>
>
> .
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to