Hi, --- Using WebDAV you are able to attach Metadata to a document by calling PROPPATCH and you can get this Metadata by calling PROPFIND ... Zope saves these Properties in the ZODB. Properties are handled by OFS.PropertyManager.PropertyManager and for the Presentation OFS.PropertySheets.PropertySheet is used ... --- I think it should be possible to "redirect" this Metadata, so a PROPPATCH would save the Metadata to 'MY' MySQL-DB and a PROPFIND would get it from 'MY' MySQL-DB ... Has anybody ever done something like this before? Any ideas how to manage this (in a product ...)? -- Thanks, Holger
Holger Schmidt wrote at 2003-6-11 17:36 +0200:
... Using WebDAV you are able to attach Metadata to a document by calling PROPPATCH and you can get this Metadata by calling PROPFIND ...
Zope saves these Properties in the ZODB.
Properties are handled by OFS.PropertyManager.PropertyManager and for the Presentation OFS.PropertySheets.PropertySheet is used ... ---
I think it should be possible to "redirect" this Metadata, so a PROPPATCH would save the Metadata to 'MY' MySQL-DB and a PROPFIND would get it from 'MY' MySQL-DB ...
Has anybody ever done something like this before?
I did something like this but for general attributes (not WebDAV properties). A word of warning: You get lots of nasty problems when you distribute attribute storage between ZODB and something external. Moving and copying must be treated carefully. Export/Import is likely to break. Undo and Versions will bring your system in an inconsistent state. Apart from that, it is not too difficult: Attribute access can be handled by letting "__getattr__" fetch the attributes from the database on demand. For modification, the "PropertyManager" methods can be overridden to update the values in the database (be careful, if you delay update until transaction commit (for efficiency). It may be too late then to register the DA.). Dieter
Wednesday, 2003-07-11 21:10 Dieter Maurer wrote: DM> Holger Schmidt wrote at 2003-6-11 17:36 +0200: DM> > ... DM> > Using WebDAV you are able to attach Metadata to a document by calling DM> > PROPPATCH and you can get this Metadata by calling PROPFIND ... DM> > DM> > Zope saves these Properties in the ZODB. DM> > DM> > Properties are handled by OFS.PropertyManager.PropertyManager and for DM> > the Presentation OFS.PropertySheets.PropertySheet is used ... DM> > --- DM> > DM> > I think it should be possible to "redirect" this Metadata, so a DM> > PROPPATCH would save the Metadata to 'MY' MySQL-DB and a PROPFIND DM> > would get it from 'MY' MySQL-DB ... DM> > DM> > Has anybody ever done something like this before? DM> I did something like this but for general attributes DM> (not WebDAV properties). DM> A word of warning: DM> You get lots of nasty problems when you distribute attribute DM> storage between ZODB and something external. DM> Moving and copying must be treated carefully. DM> Export/Import is likely to break. DM> Undo and Versions will bring your system in an inconsistent state. DM> Apart from that, it is not too difficult: DM> Attribute access can be handled by letting "__getattr__" DM> fetch the attributes from the database on demand. hmm ... this works as far as I do not change any attributes via WebDAV or the "Zope Management Interface" ... If I change these attributes every later WebDAV-Request returns the values i changed the attributes to even if i return some other value in my __getattr__-Method: def __getattr__(self, name): # if one of my attributes return "MyValue :)" if (name[:5]=='LIRA_': return "MyValue :)" # none of my attributes => use __getattr__ of PropertyManager return PropertyManager.__getattr__(self, name) # def __getattr__ is only __getattr__ called when webdav returns properties or are there even some more functions that are touched by this operation? DM> For modification, the "PropertyManager" methods can DM> be overridden to update the values in the database DM> (be careful, if you delay update until transaction DM> commit (for efficiency). It may be too late then to DM> register the DA.). Holger
I need some information about how the zope's database works. I know that this ones can be found in /home/Zope/var. My questions is how I can visualize this. In fact, I need all technical information about Zope that you can provide me. For exemples, the "images" objets, where are they saved? Thanks for your help. Mireia ___________________________________________________ Yahoo! Messenger - Nueva versión GRATIS Super Webcam, voz, caritas animadas, y más... http://messenger.yahoo.es
In Spanish. Estimada Sra. Mireia, Hasta donde yo le puedo ayudar: - Toda la BD se encuentra en el archivo Data.fs - El Data.fs.index es un índice creado dinámicamente sobre esta BD. - El Data.fs.lock manejas los locks. En una Base de Datos orientada a objetos.... Nada que ver con una relacional. Para esto me sirvió de mucho consultar aquí y también en el chat IRC de Zope. Busque en www.zope.org documentos que traten sobre la oprganización interna, pero lo que le puedo decir es que el ZMI (Zope Management Interface), o sea el manage web, sirve para visualizar y manejar de manera excelente esta BD. Puede instalar en Linux el RPM Zope que puede encontrar en el sitio de Zope, o instalar en Windows el equivalente y chequear todo con el ZOpe Management Interface desde un navegador web. Ricardo Núñez Mensaje citado por Mireia Muñoz <xupinet@yahoo.es>:
I need some information about how the zope's database works. I know that this ones can be found in /home/Zope/var. My questions is how I can visualize this.
In fact, I need all technical information about Zope that you can provide me. For exemples, the "images" objets, where are they saved?
Thanks for your help.
Mireia
___________________________________________________ Yahoo! Messenger - Nueva versión GRATIS Super Webcam, voz, caritas animadas, y más... http://messenger.yahoo.es
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Saludos, Ing. Ricardo Núñez Webmaster de la DST Universidad Simón Bolívar E-Mail: rinunez@usb.ve
In spanish Se me olvidó aclararle que si desea que las imágenes no se encuentren en Data.fs, tendrá que usar productos Zope como el "ExtFile" (instálelo y pruebe ya que yo no lo he hecho). También pruebe "FileSystemSite" para ver si ayuda. On Thu, 3 Jul 2003, Ricardo Núñez wrote:
In Spanish.
Estimada Sra. Mireia,
Hasta donde yo le puedo ayudar:
- Toda la BD se encuentra en el archivo Data.fs - El Data.fs.index es un índice creado dinámicamente sobre esta BD. - El Data.fs.lock manejas los locks.
En una Base de Datos orientada a objetos.... Nada que ver con una relacional.
Para esto me sirvió de mucho consultar aquí y también en el chat IRC de Zope.
Busque en www.zope.org documentos que traten sobre la oprganización interna, pero lo que le puedo decir es que el ZMI (Zope Management Interface), o sea el manage web, sirve para visualizar y manejar de manera excelente esta BD.
Puede instalar en Linux el RPM Zope que puede encontrar en el sitio de Zope, o instalar en Windows el equivalente y chequear todo con el ZOpe Management Interface desde un navegador web.
Ricardo Núñez
Mensaje citado por Mireia Muñoz <xupinet@yahoo.es>:
I need some information about how the zope's database works. I know that this ones can be found in /home/Zope/var. My questions is how I can visualize this.
In fact, I need all technical information about Zope that you can provide me. For exemples, the "images" objets, where are they saved?
Thanks for your help.
Mireia
___________________________________________________ Yahoo! Messenger - Nueva versión GRATIS Super Webcam, voz, caritas animadas, y más... http://messenger.yahoo.es
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Saludos,
Ing. Ricardo Núñez Webmaster de la DST Universidad Simón Bolívar E-Mail: rinunez@usb.ve
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Saludos, Ing. Ricardo Núñez Webmaster de la DST Universidad Simón Bolívar E-Mail: rinunez@usb.ve
Mireia Muñoz wrote at 2003-7-3 15:18 +0200:
I need some information about how the zope's database works.
Search for "zodb3.html" or "zodb3.pdf" (respectively). Search for the ZODB guide.
I know that this ones can be found in /home/Zope/var.
Using the default "FileStorage", the data file is "Data.fs" in "<zopedir>/var".
My questions is how I can visualize this.
???? You can use Zope to see what is in your database...
In fact, I need all technical information about Zope that you can provide me.
See above.
For exemples, the "images" objets, where are they saved?
In the Zope database. Dieter
HolgerSchmidt wrote at 2003-7-3 15:07 +0200:
Wednesday, 2003-07-11 21:10 Dieter Maurer wrote: ... DM> > I think it should be possible to "redirect" this Metadata, so a DM> > PROPPATCH would save the Metadata to 'MY' MySQL-DB and a PROPFIND DM> > would get it from 'MY' MySQL-DB ... DM> > DM> > Has anybody ever done something like this before?
DM> I did something like this but for general attributes DM> (not WebDAV properties).
DM> A word of warning:
DM> You get lots of nasty problems when you distribute attribute DM> storage between ZODB and something external.
DM> Moving and copying must be treated carefully. DM> Export/Import is likely to break. DM> Undo and Versions will bring your system in an inconsistent state.
DM> Apart from that, it is not too difficult:
DM> Attribute access can be handled by letting "__getattr__" DM> fetch the attributes from the database on demand.
hmm ... this works as far as I do not change any attributes via WebDAV or the "Zope Management Interface" ... If I change these attributes every later WebDAV-Request returns the values i changed the attributes to even if i return some other value in my __getattr__-Method: ... DM> For modification, the "PropertyManager" methods can DM> be overridden to update the values in the database DM> (be careful, if you delay update until transaction DM> commit (for efficiency). It may be too late then to DM> register the DA.).
You should read my complete answer ;-) Apparently, you stopped reading after the "attribute access" section and ignored the "modification" section. Please try again. The "modification" section is quoted above... Dieter
participants (5)
-
Dieter Maurer -
Holger Schmidt -
HolgerSchmidt -
Mireia Muñoz -
Ricardo Núñez