>From reading your first post it seems you know how to do the SQL statements >for your cause but your issue is you must use list properties. The solution i proposed handled >5000 list properties and a way to update them very fast using multiple tasks/threads and pipes. Which an issue at this point you have not hit. But you will. The stream solution would allow you to create a saved query of all the books, users, and tags that you and your friends have read. I see this as a kind of activity wall. but it shows just the books read by you and your friends. Of course you don't display it my point is you have the data! Your issue was how do you get the data. That is easy - by fan out. If i read a book the book title, id, and tags are sent to my stream. (which is a table of same) How you query that data is down to you Am i on track?
stream martins activity and his freinds would be like this - a log of the books we have read 3 blind mice, nursery, childrens, martin, 10/10/09 how to use app engibe, programming,python, steven, 01/01/10 10 quick recipes for tastyfood, cooking, self help, steven, 10/01/10 10 quick recipes for tastyfood, cooking, self help, martin, 20/03/10 Meet the parents, comedy,humor,stan,01/04/10 enjoy better sex, living,adult martin,03/04/10 enjoy better sex, living,adult stan,06/04/10 enjoy better sex, living,adult steven,18/04/10 is that the data you want ? Regards Martin Webb The information contained in this email is confidential and may contain proprietary information. It is meant solely for the intended recipient. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. No liability or responsibility is accepted if information or data is, for whatever reason corrupted or does not reach its intended recipient. No warranty is given that this email is free of viruses. The views expressed in this email are, unless otherwise stated, those of the author ________________________________ From: Martin Webb <spydre...@yahoo.co.uk> To: google-appengine@googlegroups.com Sent: Thu, 8 July, 2010 8:33:26 Subject: Re: [google-appengine] Re: list-property, many to many, 5000 indexes...HELP! Steven - hi can i just clarify what you want to do. I assume the goal is for each user to have a list of all the tags that are relevant to books they have read and people they are friends with have read is that correct? Regards Martin Webb The information contained in this email is confidential and may contain proprietary information. It is meant solely for the intended recipient. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. No liability or responsibility is accepted if information or data is, for whatever reason corrupted or does not reach its intended recipient. No warranty is given that this email is free of viruses. The views expressed in this email are, unless otherwise stated, those of the author ________________________________ From: stefoid <stevenmath...@yahoo.com> To: Google App Engine <google-appengine@googlegroups.com> Sent: Thu, 8 July, 2010 8:19:28 Subject: [google-appengine] Re: list-property, many to many, 5000 indexes...HELP! hmmm, yet to watch that video (no flash at work), but streams/ followers doesnt sound what Im after. My app is more about data mining than tweeting, so rather than a 'what are you currently reading' type of question its more like 'what is everything have you ever read?" repeated again every time someone asks the question. So I can get what one user has ever read in a query OR I can get which users are my friends in a query, but I cant join those queries - I cant think of any way of storing that in a single table that wont explode. Unless there is something that Im missing, I think my best bet is to pull in the list of friends first, as that is likely to be the smallest list, then pull in lists of friend-read books, friend by friend, sorting as I go. Trouble is, if I have 1000 friends, thats 1000 queries? ugh..... On Jul 8, 4:55 pm, Martin Webb <spydre...@yahoo.co.uk> wrote: > Yes thats it - perhaps the word stream is not the most appropriate. > > If i read a book which is say horror - in your app that can auto subscribe me >to > books that are of the horror type. which again is just following a book type. > But the streams and subscribers principle works for lots of solutions. email or > chat, and activity logs. comments. just use your imagination. > > Assuming that perhaps your plan is the have activities and share them with > followers - which might just be what books they are reading all you do is > send >a > message to a stream. > "hello world" to " user/martin/stream/public_activities - if public facing >users > are subscribed they will get the message. Or "Hello World" mail/martin/inbox". > Of course in a real world mail system you would put a copy in the senders sent > and a copy in the recipients inbox - but thats easy. > [mail/steven/sent,mail/martin/inbox] > > # just a simple message class with subscribers - this can be far more > imaginative > class message(db.Model): > sender = db.StringProperty() > body = db.TextProperty() > > class message_index(db.Model): > receivers = db.StringListProperty() #streams > > def put(stream): #puts a stream list in a message receivers list > #should start a worker to append the past list > return > def move(from_stream,to_stream): #replaces a stream with a new stream > inbox----.spam > #should start a worker > return > def delete_stream(stream): #removes a stream - this is useful for > unsubscribe > #should start a worker > return > > As simple as this approach is it just about covers - activity walls, > email,comments and so on - one concept is lets say I want to flash messages to > my users "your are now following martin". I just have my Ajax or static page > "listen" to 'user/martin/flash' and send info messages to 'user/martin/flash' >so > when someone unsubscribes, a message is flashed to inform them the request was > completed. Of course you would need to add some security measures to the >stream > class and a mechanism to remove messages - i.e spam folders would clear say > every 7 days, flashed messages once read clear instantly, in-box messages may > live forever. Of if you want to save memory and have millions of users have a > "mail/martin/saved" stream and then add a save message button to emails (all > that does is use the message.move(...) method and then set in-box to keep > messages for say 90 days and the save box to be 'permanent' As you can see the > stream method now has some very useful functionality from just a small amount >of > api. > > Well that's how i am thinking, maybe this can work for you. > > Regards ://groups.google.com/group/google-appengine?hl=en. -- 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.