On Wed, May 19, 2010 at 10:40 AM, Vincent Pelletier <vinc...@nexedi.com> wrote:
> Why not defining some kind of callbacks in Storage API, which would allow to
> plug such mechanisms in a storage rather than wrapping around it ?

Mainly because that would be a major change to the storage API.  The
majority of storage methods would be affected by such a change.  It
would require reimplementing all existing storages.

Also note that you often want to control where transfornations
are applied.  For example, when using ZEO, I want to normally
compress and decompress on the client, so methods like load
and store on the server shouldn't do any transformation, however,
packing and conflict resolution on the server does need to deal with
data transformations.  To handle this use case would require passing
4 callbacks.

If you want to combine transformation, for example compression and
encryption, you'd need to layer the callbacks.

Even with it's problems, a layered storage model seems cleaner to me.

Jim


--
Jim Fulton
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to