Ive been looking at the priniciples of fan out of messages as described in the google IO "building scalable complex apps"
In it it suggests that using a list property for say a list of receivers is a scalable solution. In this scenario how does one update the list property so that contention issues don't step in, If the app is handling many users using the IO example: class message(db.model) sender = db,stringproperty() body=db.textproperty() class messageindex(db.model) receivers=db.stringlistproperty() To adapt their example i would also need class followers(db.model) user=db.userproperty() followers=db.stringlistproperty() (code is just in for an example and is not typed correctly - sorry) The concept is if someone follows you, you add their key to your followers list in the followers model, If you make a message, you store your followers list in the message list - and using a simple query all users get the message - pretty simple stuff. The issue is updating someones list of followers. Assuming that some accounts could have millions of followers - if i simply update the entity their is going to be contention issues - One would also need more than one entry as i think their is a limit of like 5000 entries per list. And of course requests may be sent to "add" or "remove" a person. What would be the best way to do this. I was thinking about using the task_queue service. I was thinking about a work model that stores each follow request and triggers a task to run in say 60 seconds. The task gets all the work to be done for a persons followers list - and builds the new list. Not sure how this would work - but it would stop contention issues as only one thread could execute in one min. Does anyone have any code examples good advice,help on how i can do this in a scalable manner - i don't think m cache can be used in the method as any loss would mean a follow request could be lost. 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: l.denardo <[email protected]> To: Google App Engine <[email protected]> Sent: Tue, 6 July, 2010 8:03:31 Subject: [google-appengine] Re: Using Google Accounts AND Google Apps accounts for authentication Thank you for the pointer: I think that would at least be good news for developers, since App Engine seems to have trouble handling Google Accounts created from an Apps address (there's much on the group about this). Regards Lorenzo On Jul 6, 12:27 am, Uros Trebec <[email protected]> wrote: > Thanks for all suggestions! I'll try to make it work... > > On the same note, does anyone know anything about > this:http://smarterware.org/6394/google-apps-vs-google-accounts-resolution... > > Regards, > Uros > > On Jul 5, 9:25 am, "l.denardo" <[email protected]> wrote: > > > You should use the Users API using the OpenID option. > > > Then you can log in both accounts passing different parameters to the > > createLoginURL method > > >https://www.google.com/accounts/o8/id -- >for > >gmailhttps://www.google.com/accounts/o8/site-xrds?hd=$DOMAIN --> > > substituting your domain name to $DOMAIN > > > A good guide is > > athttp://super-easy.blogspot.com/2010/05/using-openid-in-java-on-gae.html > > > Regards > > Lorenzo > > > On Jul 3, 9:18 am, Robert Kluin <[email protected]> wrote: > > > > About the only way would be OAuth. > > > > There are several items in the issue tracker related to this topic. > > > And it comes up on the forum from time-to-time as well. > > > > Robert > > > > On Thu, Jul 1, 2010 at 6:52 PM,UrosTrebec <[email protected]> wrote: > > > > Hello everyone! > > > > > I apologize in advanced if this topic was already covered, I couldn't > > > > hunt it down. > > > > > So, to the point: > > > > I'm developing a public application that requires users to log in at > > > > some point. Currently my application's Settings are set to use "Google > > > > Accounts API" for authentication. This has a less desirable effect of > > > > not being able to use my Google Apps account (not the same domain as > > > > the application) to authenticate as a user. > > > > > I wonder if there is _any_ way to enable both "users" to authenticate? > > > > Maybe using OAuth authentication option? > > > > > Thanks for reading and I hope someone can help. > > > > > Best regards, > > > >UrosTrebec > > > > > -- > > > > 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 > > > > athttp://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. -- 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.
