[google-appengine] Re: memcache entities without ReferenceProperty

2009-07-20 Thread Vince Stross

How are you sure the referenced entities are being stored too?

I always assumed that it's just a query object waiting to be
referenced.

If this is true, I am REALLY interested in a solution as well!


On Jul 20, 4:21 am, Benedikt benedikt.e...@gmail.com wrote:
 Hi,
 I have a list of entities which I want to store in the memcache. The
 problem is that I have large Models referenced by their
 ReferenceProperty which are automatically also stored in the memcache.
 As a result I'm exceeding the size limit for objects stored in
 memcache.

 Is there any possibility to prevent the ReferenceProperties from
 loading the referenced Models while putting them in memcache?

 I tried something like

     def __getstate__(self):
         odict = self.__dict__.copy()
         odict['model'] = None
         return odict

 in the class I want to store in memcache, but that doesn't seem to do
 the trick.

 Any suggestions would be highly appreciated.
--~--~-~--~~~---~--~~
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 this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Optimal tree structure with datastore

2009-07-13 Thread Vince Stross

I use the following structure:

class Tag (db.Expando):
  label = StringProperty()
  parent_ = SelfReferenceProperty(collection_name='children')

This is a simplified for illustration purposes, but it works well
enough for us because we just grab all Tag entities and build the tree
in memory with a single simple function. Of course, we will never be
more than 3-4 deep and always have less than 100 tags total.


On Jul 13, 5:17 am, Nick Johnson (Google) nick.john...@google.com
wrote:
 Hi Peter,

 On Sun, Jul 12, 2009 at 8:31 PM, Peter Cicmanpcic...@gmail.com wrote:

  I had spend some time today with building tree structure using
  datastore. I need a real tree, for real world, so there must be a
  possibility to move node with all descendants. There must also be a
  quick way to find all ancestors, children and descendants.

 I'm not aware of any tree structure that fits both those requirements
 - in fact, I'm fairly sure it's not possible.

 There are two basic approaches to representing trees: Ones that
 encompass the node's position in the entire tree, such as materialized
 path and nested set notation, and ones that only encompass the node's
 relationship to neighbouring nodes, such as adjacency lists. The
 former permit easily querying all descendants, while the latter make
 it easy to move entire branches. I don't think it's possible to have
 both at once.

 If moving a branch is less common than querying, and your trees are
 relatively shallow (Say, less than 100 levels deep), I would recommend
 using the materialized path approach: Have a ListProperty that lists
 all the ancestors of the node.

 -Nick Johnson



  So, datastore keys can not be used for tree like this - because key
  can not change, and i would like to prevent node copying/deletion,
  because this must be always done on node and all its descendants which
  may end up with tons of sql queries.

  Design i made should fit for me, but maybe there is some common
  solution for this problem... Anybody knows about some optimal
  solution? (i can not use serialization)

  Thanks a lot!

 --
 Nick Johnson, App Engine Developer Programs Engineer
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
 Number: 368047
--~--~-~--~~~---~--~~
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 this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: http://code.google.com/status/appengine Error: Server Error

2009-07-02 Thread Vince Stross

I broke it... I just know it!

I tried to vacuum an index that was in a Building state and now it's
been in an Error state for nearly 24 hours.

I did it everyone... I killed the App Engine. :)

*bold* Err-hemm... I think it's related to the Datastore Index Robot,
start looking there) *bold*

On Jul 2, 12:53 pm, Tom Wu service.g2...@gmail.com wrote:
 2009/7/2 Tom Wu service.g2...@gmail.com

 http://code.google.com/status/appengine  Error: Server Error

  And I *can't*  appcfg.py update my app.

  Best Regards
  Tom Wu
--~--~-~--~~~---~--~~
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 this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---