Re: [ZODB-Dev] request on restrictedTraverse
Daniel wrote at 2005-10-31 09:52 +0100: ... It seems that the restrictedTraverse method changes the request, doesn't it? It uses locally its own request object. You will see it only in __bobo_traverse__ methods during the restrictedTraverse. All objects (in the standard acquisition context) can access the true request object as obj.REQUEST. -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB for context objects
Andre Meyer wrote at 2005-10-25 23:12 +0200: I am not sure whether ZODB is the right thing to use for my needs. So, what do I want? 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. 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? I hope that my question is clear, otherwise, please ask. I fear, the ZODB is not optimal for your application: Its normal usage mode expects that each thread opens its own ZODB connection. Each connections maintains (lazyly) an independent copy of the persistent objects. Synchronization happens at transaction boundaries (only). If you can formulate your application is these terms (context objects come from different connections per thread), then the ZODB may be viable (and easy to use). Otherwise, you probably should look for something else. Note also, that the ZODB is a bit weak when the same persistent object is written by concurrent threads. Such situations result in a ConflictError for all but the first affected transaction. The application should abort and retry the transaction in this case. If such conflicts are expected to happen often, the ZODB is not optimal. -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] oids, numbers, hex and 8-byte strings
Chris Withers wrote at 2005-10-25 13:11 +0100: ... The alias I suggested is purely to mirror that of the oid_repr function, and I would include it directly above of below the oid_repr function with bigger documentation clues for blind people like me ;-) Does anyone have any non-pedantic reasons for not including this alias? The name is far less than optimal. How about something more informative such as oid_to_hex and oid_from_hex? -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZConfig Extension?
Chris Withers wrote at 2005-10-25 12:29 +0100: Dieter Maurer wrote: And I posted a ZConfig extension that allows to read the environment (thus using environment variables in the configuration file). Did you talk to the ZConfig maintainer about merging this? I announced it and I think I have put it into the collector. And, from time to time, I mention it in the mailing lists... I know he wasn't keen but I think it's great extra functionality to have... Then, maybe, you lobby a bit? Because we maintain our own Zope version, we are not dependent that useful features move into the official code... -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZConfig Extension?
Dieter Maurer wrote: I know he wasn't keen but I think it's great extra functionality to have... Then, maybe, you lobby a bit? That's what I'm doing. Fred Drake is Mr ZConfig, no? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev