Cheers guys, I have had quite a fun time over the course of this project trying to optimise the tree for various different things at different times. (It's a notes app, and people store the notes in a tree structure).
I have found a real tension between making it easy to get tasks (by storing various child and ancestor lists) and making it cheap to keep everything up to date. It's going to be quite write heavy, so I want to make writing and updating notes as cheap as possible. As Robert mentioned, if I can get the tree into a single entity, it is going to make writing and reading as cheap as possible. Hopefully most people will have a lot less than 1MB of notes. (not writing an evernote replacement!) Thanks again both! J. On Jun 26, 9:23 am, Tim Hoffman <[email protected]> wrote: > I would suggest the approach is dependent on the most likely access pattern. > > If you only use parts of the tree at a time (For instance url traversal of > the tree) then I would keep the nodes as seperate entities. > > I have done this for a simple CMS. All children have a reference property > pointing to the parent. And a list property describing the path elements > (names). > In addition each parent holds an ordered list of names (children) and keys > of the children. > > This way you can retrieve all immediate children in a single db.get. You > can get children of arbitrary depths by querying based on the path. > > Aggressive memcache use then means any re-use of parts of the tree on > subsequant requests hit cache pretty well. > > If one the other hand your using whole trees then ignore what I just said > ;-) > > Have fun. > > T -- 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.
