hi,
i'm working on a book review site in which users can have friends.
exactly like the facebook's 'like' function, we'll like to tell a user
which of his/her friends also like the book he's looking at. but i
can't figure out how to do that with datastore, if possible at all.
we're using relational indexes for friends and "likes" which works
like a charm, very fast fetch
currently we have:
class User:
friends = db.ListProperty()
likes = db.ListProperty()
class BookIndex: # parent=Book
users = db.ListProperty()
BookIndex.users lets get all the favorite books of any users, works
well. User.likes tells me all the users that have marked a certain
book as favorite, works well too.
The problem is, when a user is looking at book A, I could easily get
all the people that likes A but how am I able to filter out the
friends? I'm satisfied if I have to do some precals and maybe just get
"some of the friends" who likes A.
I don't know, it seems like i'm looking at a problem of intersecting
two lists. A book can be liked by 3000 ppl, a user could have 100
friends, how am I going to find out which of the 100 friends are in
these 3000 ppl?
Any thoughts would be greatly appreciated. Thank you!
(and how did the facbeook guys implement the "like" button?)
Herbert
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to
google-a...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.