[google-appengine] Re: using ListProperty or using Relationship Model

2009-10-09 Thread Shailen
Thanks Stephen and Kevin, My original plan was to do what Stephen suggests, above, but the serialization costs are non-trivial. There's a lot more about that in Brett Slatkin's Building Scalable, Complex app... talk from google i/o 2009. In the examples that he uses, there is a 10x improvement w

[google-appengine] Re: using ListProperty or using Relationship Model

2009-10-09 Thread robean
Many thanks. Your reply is very helpful. - Shailen --~--~-~--~~~---~--~~ 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-appengine@googlegroups.com To unsubscribe from

[google-appengine] Re: using ListProperty or using Relationship Model

2009-10-09 Thread Kevin Pierce
That is perfectly valid too.The tradeoff is that when ever a url entity is returned the list is serialized. If you know you want the tag list most of the time then place it with the url. However if you are only interested in using the list for lookups, then you can place it as an IndexModel in the

[google-appengine] Re: using ListProperty or using Relationship Model

2009-10-09 Thread Stephen
On Oct 8, 9:00 pm, Shailen wrote: > > Option 2, use list properties: > >    class URL(db.Model): >        url = db.StringProperty() > >    class Tags(db.Model): >        tags = db.StringListProperty() > > Store a list of tags with a URL key as parent. Why not simply add the tags to the URL en

[google-appengine] Re: using ListProperty or using Relationship Model

2009-10-08 Thread Kevin Pierce
Option1 can be improved substantially by doing.db.put([Tag1, Tag2, Tag3,]) which is in turn a single datastore put. Option2 doesn't suffer from the assumption that the lists have to be traversed. In fact The ListProperty is indexed in a massively parallel fashion. Each value in the ListProper