[ZODB-Dev] ZODB for context objects

Chris Withers chris at simplistix.co.uk
Thu Oct 27 11:55:48 EDT 2005


Andre Meyer wrote:
> I am not sure whether ZODB is the right thing to use for my needs. So, 
> I have a number of threaded objects that have a context as a separate 
> entity. The object and context need to be separated to allow for the 
> threads to run asynchronously while their context aspects are shared in 
> an environment model. The context aspect contains attributes that are 
> perceivable from other objects, such as location, speed, colour etc.

Can you express this in terms of python objects?

> Now, my question is this: can I use ZODB to store my context objects and 
> retrieve them by various attibutes. For example, can I look up easily 
> all objects that have x and y coordinates within a given range? Or all 
> objects of a given colour without knowing their names or paths?

You can do whatever you want provided you build the right data structures...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list