So I've spent some time now reading more about the datastore and I
find it hard to get a complete picture about how it works from the gae
docs and articles.
In my case, I must make sure there is some implicit isolation of the
different team's data. So after reading more about entity groups, it
seemed like a good idea
to create a Team entity which is the root entity of an entity group
that contains all the team entities like players, matches, forum posts
etc.
But then I also read the article about datastore contention where it
is recommended that the entity groups are kept as small as possible.

It is likely that lots of forum/comment as well as matches/statistics
entities will be created over time, leading to quite a large entity
group in the case described above.
So now I'm thinking that team data should be divided into several
logical entity groups, BUT, there must still be some "owned"
relationship between all entities that belongs
to a team. Is is possible to have relationships between entity
groups?

I also read that you can specify an app-assigned ID as part of an
entity key. Would it be possible to use a unique team ID as part of
the entity keys?
The goal is of course to let the datastore take care of the security
restraints as much as possible using its build-in features such as
entity groups.
So I'm looking for the optimal way to enforce team data isolation and
avoid any performance/contention pitfalls such as with too large
entity groups.

If you can recommend any in-depth documentation/sample code on these
matters, I would happily look into it.

Thanks!

BR, Andreas



On Dec 2, 8:24 pm, "Ikai L (Google)" <[email protected]> wrote:
> Creating a database per team is a very heavyweight way to address the
> problem of data segregation. This is unnecessary and in general, not a
> recommended best practice, as you would provide data isolation at the
> application layer. The intuitive solution here is to create an entity group
> for a league or team (depending on your transactional needs) and place child
> entities in that group.
>
> On Tue, Dec 1, 2009 at 10:40 AM, andreas_b <[email protected]>wrote:
>
>
>
> > Hi all.
>
> > I'm working on a GWT/GAE project where the idea is to create a portal
> > for sport teams. Each sport team can sign up to get an account where
> > they can register players, keep track of leagues, matches, statistics
> > and so on. Each team should also be able to use their own domain,
> > which automatically should load the site with their configuration when
> > entered (basically just load the gwt-app with some url-parameter that
> > is forwarded to server-side).
>
> > So, coming from a normal SQL-environment, it seems to me that each
> > team that signs up should get their own private database for all their
> > data. As I understand it, this is not possible with GAE datastore?
> > There is a one-to-one mapping between an application and a datastore?
>
> > If this is the case, then what is the best way forward? I guess each
> > entity could have a team ID, but it really doesn't seem like a good
> > idea. There should be some kind of isolation between the different
> > teams' data.
>
> > Registering a new GAE app for each team is not an option either since
> > we expect at least hundreds of teams.
>
> > So, is there some way to isolate entities from each other within a GAE
> > datastore?
> > Also, would it be feasible from a performance point of view to do
> > this?
>
> > Or is simply GAE not the right way to go for this kind of web
> > offering?
>
> > Thanks in advance.
>
> > BR, Andreas
>
> > --
>
> > 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.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine

--

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