Hi Lynge,

Storing a List of keys of users who may view a profile on the profile's
entity is probably the best way to do this.

-Nick Johnson


On Tue, Nov 3, 2009 at 12:54 AM, Lynge <[email protected]> wrote:

>
> Hi
> The app I am about to build is going to have some kind of profile page
> for each user. The user will then be able to select other users that
> is able to view his/her profile. (Like facebook, I guess)
>
> My question is, how should I store these permissions?
> Each user will most likely be giving permission to under 20 other
> users.
>
>
> Solution #1:
> Have one model looking something like this:
>    viewer =user.id
>    can_view = user.id
>
> And then simply look there to see if one user can view the other users
> profile.
>
> Solution #2:
> Since it is most likely be less than 20 users per user, then maybe one
> could just store it as CSV or a tuple, or something along with the
> users profile.
> I am thinking this wont be good for the (freakish) users that will
> have 200 users with permission, but would it be faster that solution
> #1? As that first model would eventually be huge, but does that matter
> on GAE?
> This is my first app, so I am still thinking like I am developing for
> en RDBM backend so that is why I am asking here.
>
> So to recap. 1st solution is more elegant in term of scaling
> permissions per user, but creates a huge datapile.
> The other solution solves this, but creates problems for the few users
> that will have more than normal amount of permitted "friends"
>
> Of course if you have an even better solution, then by all means,
> share it :)
>
> Many thanks in advance.
>
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
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