-
Notifications
You must be signed in to change notification settings - Fork 49
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
File management in Atomic-Server (with Commits) #72
Comments
Old usecase (removed from top level issue)I'd like to manage how static pages look in my Atomic Server. Now, I could do this using git and all, but one of the core ideas for Atomic Data is that you don't need git - the Atomic Commits model kind of offers enough abstractions to properly manage stuff like web pages. Personally, I'd simply like to use the existing cli and do something like this: |
One option (also since atomic-data already generally speaks http(s) to its users) is to use the Micropub standard. |
API design thoughts
Implementation thoughts
|
Here's an implementation example: https://github.com/saiumesh535/actix-server/pull/14/files |
Discussion about spec in docs
Requirements:
I currently use
actix-files
for static file hosting. Not sure how this could be replaced. It does a lot of fancy stuff, such as setting mimetype, checkingmodified_at
,etag
...Some approaches:
Use existing filesystem for storage
Files as Resources in the Atomic Data Store
We could add a new type of resource, which has a
filename
,size
,bytearray
/string
,mimetype
. This would mean that we could use existing Resource logic - including things like commits and the TPF index.However, including the bytearray would make things very slow for uploading / using the data, as it needs to be (de)serializes as base64 to appear in JSON-AD.
Store files in the DB
Files are a new datatype, which contains just a big u8 array + a MIME type or something
Use an S3 like external object storage system
Instead on relying on Atomic server itself to deal with storing stuff, we can use some external object storage service. Mimio is an interesting open source contender.
Persist using IPFS library / addon / instance
IPFS #66 could be used as an addon / crate to atomic-server that deals with the complexities of IPFS (connecting to peers, hashing, resolving identifiers to binary arrays).
Maybe
ipfs-embed
is a nice option for this. Contrary torust-ipfs
, this one seems to support adding (insert
ing) byte arrays to IPFS.The text was updated successfully, but these errors were encountered: