[ZODB-Dev] DBTab mounts

Adrian van den Dries adriand@flow.com.au
Thu, 20 Feb 2003 10:28:33 +1100


On February 19, Shane Hathaway wrote:
> >But again, I feel it necessary to give you great thanks for making such an
> >extremely flexible and powerful product.
> 
> You're welcome.  Hopefully, Zope 2.7 will integrate DBTab's functionality.

This would be fantastic, but I'd like to make a couple of suggestions.

Because there is a 1:1 relationship between [Storage] and [Database]
clauses, why not just merge them into one clause?  These are really
two parts of one configuration and you really want to enforce
proximity.  Separating them would suggest that you can reuse a Storage
for another Database or vice versa.  This would more closely follow
the fstab analog, where the Storage options are like the
filesystem-specific options:

  [MyDatabase: FileStorage]
  Mounts: /Foobarbaz/Bazbarfoo;
          /Foobarbaz/Barbazfrob
  CacheSize: 5000
  FileStoragePath: /path/to/data.fs
  FileStorageCreate: yes

Secondly, and more importantly, Storages should be modular, allowing
the user to add her SooperDooperInhouseStorage without having to hack
on the product, probably just by registering the storage:

  from Product.DBTab import StorageTypes
  StorageTypes.addStorage('MyStorage',
                           'MyStorage.MyStorage'
                           convertMyStorageArgs)

a.

-- 
 Adrian van den Dries                           adriand@flow.com.au
 Development team                               www.dev.flow.com.au
 FLOW Communications Pty. Ltd.                  www.flow.com.au