Re: [google-appengine] appengine datastore model for twitter like showing posts from users followed

2017-06-16 Thread Suresh Jeevanandam
Thanks, Alex. I will do this. I will also read about caches. Thinking of something like the list of users could be cached for the current-user. When the rare event of user follows/unfollows someone, it will invalidate the cache if it is present for the current user. - Suresh On Friday, 16 June

Re: [google-appengine] appengine datastore model for twitter like showing posts from users followed

2017-06-15 Thread 'Alex Martelli' via Google App Engine
I would recommend denormalizing your data model -- a common optimization in non-relational DBs (like the datastore) and frequently useful in relational DBs as well. Just have user entities, with the user id as their key's name, containing a list of the authors the user follows. This will make addin

[google-appengine] appengine datastore model for twitter like showing posts from users followed

2017-06-15 Thread Suresh Jeevanandam
I am working on a web system where a feature is similar to Twitter's concept of following a list of users and seeing their posts as a list. The simple model I came up with requires join operation which is not available in datastore. class Post(Model): author = reference to user id conte