-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to external file content from metadata #50
Comments
One remaining question to resolve: What does should happen if some process writes to the file that doesn't know about the mechanics behind that metadata. An example:
What should happen? Should the new revision inherit all metadata from the previous revision or should the new revision not have metadata associated? Perhaps it makes sense to have two types of metadata:
Updating a file clears revision metadata, but keeps file metadata. These things would/could be file metadata:
These would/could be revision metadata:
|
@matheus23 and I discussed this, but just to capture here: I would suggest always copying all metadata and not introduce any distinctions. Leave it up to the file writer to properly account for metadata that should be cleared or updated. My argument is that the writer always has to know about the metadata in order to handle it correctly. If the web-drive editor doesn't know about thumbnail metadata, a thumbnail for the new version will still be missing, which is just a different kind of wrong. To handle the case described above with thumbnails, the file's metadata could have a |
Do you mean here that the "thumbnail_for_cid" would be a hardcoded field in the metadata, or is it possible to add whatever is needed? In Capyloon the thumbnail case is just one example of the generic concept of "variants" for a resource. |
Yeah, I'm pretty sure "thumbnail" was just illustrative from Jess. We're exploring designs for the case when a process that doesn't understand file variants makes a write. Are file variants transferred from old revision to new revision? If so, how would we detect that they're outdated? (One option may be for them to refer to the CID they were generated from, if that's how it worked.) |
I think variants need to be transferred to the new revision in general. You're right that in some cases this will lead to out of sync variants, but not always:
In Capyloon VFS I'm finalizing the work to automatically run "transformers" when the default representation of a resource is modified to address these use cases without involving the clients. Do you want to bring compute to wnfs? 😃 |
I know you're joking but... maybe? :P |
Goal: Solve issues raised in discussions #18 and #49.
The use case is a file system that supports more than just a single byte array as a file's data. E.g. storing thumbnails of images.
On the public file system this can be supported with adding
CID
s that point to more (unixfs) data into metadata, but on the private file system this doesn't work as expected: The CID isn't "discoverable", it needs to be added to the private forest to be syncable. It also needs to be encrypted.Thus the need for linking to external encrypted bytes from the metadata.
This would be pretty much supporting the same type that
.content
supports, but within metadata.For the private side that means that metadata may include content that looks like this:
For example, this could be a file's metadata (here represented as JSON) with a link to some thumbnail:
We should also specify that implementations support operations like
read_metadata_linked(file, metadataKey: string): Bytes
.The text was updated successfully, but these errors were encountered: