lukechampine/us

PseudoFS without the local filesystem

Closed this issue · 4 comments

PseudoFS stores metafiles with the local filesystem. However, it might not work on some IoT devices and browsers because they might not have a writable filesystem.

It'd be nice if it uses some filesystem abstraction library such as https://github.com/spf13/afero instead of calling functions in os package. With such a library, we can use a memory-based filesystem on the case where we don't have access to the OS based filesystem.

Without a writeable filesystem, how do you store uploaded files persistently? I can understand download-only usecases on a read-only filesystem, but that should work already.

Do you mean the source of the uploading files? Those can be given with other API. For example, a device, which doesn't have a writable filesystem, receives sensor data as a byte stream and uploads them to the Sia network. In that case, we need to store metafiles on memory instead of local storage.

No, I mean, where do you store the metafiles? Perhaps the metafiles could be uploaded to a StoreWise server? If you store them in memory, they will be lost when the device is restarted, so the files will become inaccessible.

I see. Yes, all metafiles are managed on our server.