GAE memcache is limited.
I'm about to crash so here is how I'd do it really fast. User A posts update. All Subscribed users get marker to check for updates If UserB has Marker to check for updates he does. If no marker last "report" is repeated. Marker is a single byte you can keep lots of them in memcache. GAE is going to be expensive because you basically have to plan on 1 read and write per update from the user and 1 read for each updated online friend, and 1 write for the final version If average user is online 1 hour a day, and during their hour they see 20 updates. That is 40 reads and 20 writes And you can't very well miss stuff, though Fb and twitter do. but they have as much memcache as they want. We don't. Brandon Wirtz BlackWaterOps: President / Lead Mercenary Description: http://www.linkedin.com/img/signature/bg_slate_385x42.jpg Work: 510-992-6548 Toll Free: 866-400-4536 IM: [email protected] (Google Talk) Skype: drakegreene YouTube: <http://www.youtube.com/blackwateropsdotcom> BlackWaterOpsDotCom <http://www.blackwaterops.com/> BlackWater Ops <http://www.cloudonastring.com/> Cloud On A String Mastermind Group From: [email protected] [mailto:[email protected]] On Behalf Of Kaan Soral Sent: Wednesday, February 08, 2012 11:14 AM To: [email protected] Subject: [google-appengine] How to achieve Twtter of FB-like dynamism on Appengine I have searched "twitter" in this group and went back 1 year in posts but couldn't find anything but I remember a discussion like this before Problem: On both Twtter and FB, when you visit their Homepage, you see a summary of what your friends or interests are doing. You might have up to 1000 of these on average. How to combine this information? Some thinking: a) A naive approach would be to query for everyone, every time = impossible-ish b) To make this naive approach work we might determine popular friends of a user and achieve a query once, construct a callback for near time updates approach (to achieve real time info) c) Another approach is to not query at all but update everyone who are subscribed to a user, when that user posts an action This would work for FB I guess, but for Twtter, considering some people have 1Ms of followers, this may be a problem But the complexity is the sum of all followers over the network, and this number may be low, considering not everyone has that many followers, so this might be worth it I am leaning over the (c) method, what do you guys think, how would you implement these Social Networks? (I combined these 2 networks in the problem definition, but you may provide separate solutions) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/1WEnOApSj4sJ. 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. -- 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.
<<image003.jpg>>
