[Twisted-Python] twisted.vfs issues - metadata
Andy Gayton
andy at thecablelounge.com
Thu Sep 29 08:47:46 EDT 2005
> On Sep 28, 2005, at 3:49 PM, Andy Gayton wrote:
>> There's getMetadata. That let's you return arbitrary attributes.
>> Would that cover what you're thinking?
James Y Knight wrote:
> No -- one problem is that extended metadata can be potentially very
> large (just as large as the file's normal contents). Another is that
> there may be potentially a large number of such attributes.
> I think it may be best to model it as a special kind of child, as it
> seems as if that's the way people are moving their thinking anyhow.
> IFileSystemNode.xattrContainer() -> IFileSystemContainer
>
> That returned object would then allow the use of the same createFile/
> child/remove/rename/open/read operations as on normal children. It
> would have to throw errors if you try doing excessively "interesting"
> things, like trying to create directories in it, but I think that's
> probably okay.
How about getMetadata for simple data (size, content-type) and a
container as you describe for potentially huge its of data?
hrm, .getattrs, .setattrs, .xattrsContainer ?
There definately should be a way to query what metadata a backend can
provide, and to pass which particular data you are requesting for
performance. Namespaces might be useful to? It'd be good to see a use
case to show that they are.
I'm keen to just let WebDAV's requirements drive the design here. None
of our uses up till now have had a great demand on metadata.
Andy.
More information about the Twisted-Python
mailing list