Skip to content
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

Store Item bytes in content-addressable store #93

Open
NfNitLoop opened this issue Nov 20, 2022 · 1 comment
Open

Store Item bytes in content-addressable store #93

NfNitLoop opened this issue Nov 20, 2022 · 1 comment
Labels
impl This is an implementation detail for this implementation of Feoblog, not the public protocol/API

Comments

@NfNitLoop
Copy link
Owner

NfNitLoop commented Nov 20, 2022

When a user uploads an Item, its bytes are currently stored directly into the item table for easy access. But, that means that if multiple users sign and upload the same Item, it gets stored multiple times. And with #92 we'll already be storing some items into the store.

Instead, we should always store the item's bytes into the content-addressable store.

Implementation details to update:

  • Initial Item uploads store the bytes in store.
  • DB migration of old item bytes into store
  • Fix db usage and prune to account for items stored in this way. (i.e.: don't prune rows from store that have a corresponding item entry!)
@NfNitLoop NfNitLoop added the impl This is an implementation detail for this implementation of Feoblog, not the public protocol/API label Nov 20, 2022
@NfNitLoop
Copy link
Owner Author

Additional things to consider:

For #92, we don't necessarily want to allow embedded items (or their attachments) to be served directly from a server at /u/:uid/i/:sig just because they've been "embedded". Do we need to have different places for storing an item that the server should serve vs. just a lookup of (uid, sig) to contentHash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impl This is an implementation detail for this implementation of Feoblog, not the public protocol/API
Projects
None yet
Development

No branches or pull requests

1 participant