I'm faced with the tenant term a little time ago in context of Stormpath and after in context of Google Cloud Datastore. And what made me crazy about this, is why we where need to introduce new term to define a namespace? Or maybe I'm missing something that describes tenant's specific qualities that namespace doesn't have?
And although, in this whole concept I'm still can't get the concept of the multitenancy here? What the point of multitenancy? It just looks like multinamespaces thing, but with the same structure.
So, what the difference betwen this two terms?
In Datastore, one would use Namespaces to create a multitenant structure.
Let's say you want to create a social network, like Facebook, but simplified. You'd have users, posts, and comments.
Instead of declaring a 'post' entity as a child of 'user' entity, you can assign a namespace (user-ID) to the 'post'.
In terms of data structure, it might seem there's no difference, but in terms of performance, it does. When you declare an entity as a child of a parent, Datastore will need to store all children together and assure consistency of data within that parent. When you assign a namespace to an entity, it can distribute the data and doesn't guarantee absolute consistency.
That's why Datastore limits to 1 write per second (on average) within each Parent, but doesn't impose write limits within a namespace.
In this example, let's say Jack published a post right now. Mary and John are his friends. If Mary and John access Jack's posts right after Jack posts, is it 100% guaranteed that both will see this new post?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With