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

Allow to store data as references in the store - hackish version #687

Closed
wants to merge 707 commits into from

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Jan 12, 2023

Actually not as hackish as expected. The provenance stuff is probably good to go with a few more tests.

Still, not quite sure how to proceed with this.

Do we increase the quality of this and merge it to main, meaning that we now implement experimental features of ipfs like the file store pattern / nocopy in addition to the ability to store stuff directly in the store, which we still need to retain for content from remote nodes?

Does this end up a deltachat exclusive?

  --nocopy                   bool   - Add the file using filestore. Implies raw-leaves. (experimental).

Implements n0-computer/beetle#14

Arqu and others added 30 commits October 14, 2022 23:48
* feat: range request support

* cr

* tests & fixes

* fix etag range headers

* rebase cleanup
…iroh` commands (#348)

* docs: add full help text for `lookup`, `connect`, `get`, `p2p`, and
`iroh` commands

* move long descriptions into constants

Co-authored-by: b5 <sparkle_pony_2000@qri.io>
flub and others added 24 commits December 21, 2022 15:48
This not fully fix beta clippy right now yet because par-stream
breaks.

Part of #626
To use the serde feature from Url you must request the feature, which
can only be done by directly depending on the Url crate instead of
pulling it in via reqwest.
fix(deps): We use the serde feature from Url
Newer clippy wants the identifiers in the format string when
possible.  Boring change but why not.
This makes sure to await the future from async_channel::Sender::send.
When not awaiting this only makes a struct and noting is ever sent.

Caught by clippy really.
Updates the requirements on [sysinfo](https://github.com/GuillaumeGomez/sysinfo) to permit the latest version.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
Updates the requirements on [rlimit](https://github.com/Nugine/rlimit) to permit the latest version.
- [Release notes](https://github.com/Nugine/rlimit/releases)
- [Changelog](https://github.com/Nugine/rlimit/blob/master/CHANGELOG.md)
- [Commits](Nugine/rlimit@v0.8.3...v0.8.3)

---
updated-dependencies:
- dependency-name: rlimit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](marshallpierce/rust-base64@v0.13.1...v0.13.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
The store does not use the RPC client at all.  Remove it.
We used to use the same config for the service and server (aka the
binary).  This is confusing when creating configs to use with
e.g. iroh-one, iroh-embed or iroh-share because some fields are not
used.

This splits off the config structs to avoid this problem, services now
have a Config and binaries a ServerConfig.  This allows creating the
services standalone without all the baggage a server needs.

While this isn't many fields yet, this will get worse as we add more
features (this is split off from another PR where this seemed useful).
This removes the use of mockall which is causing a lot of trouble with
the cargo features intricacies it brings with it.  A lot of the
tooling struggles with these different versions of the structs which
also behave differently in surprising ways.

The tests affected by this will be converted into end-to-end tests as part of
is now unused.  This is possibly only temprorary and that might come
back when the end-to-end tests are added.
@Frando
Copy link
Member

Frando commented Jan 12, 2023

Even though this adds some complexity and there certainly are a few challening integration and abstraction questions still to go through, I think this would be a great feature to have independently of Deltachat and iroh-share. Here's why: I regularily work with large collections of media files from community media publishers with limited infrastructure resources. We are working towards better tools to share and replicate these libraries. A nocopy mode makes this much simpler, faster and cheaper to try out with iroh. Copying 10-20TB of mp3s takes a long time and needs a lot of spare server capacity to try things out.

@Frando
Copy link
Member

Frando commented Jan 12, 2023

(maybe this fits better into an issue, but adding here for now)
I've been thinking about the tradeoffs between different approaches to sync local files trees with p2p file stores, both when I worked more with hyperdrive and also with IPFS, for the reasons mentioned above. There's several strategies:
a) store has file references (pro: cheap, con: universal mutability is hard)
b) copy from local fs to store (pro: simple, con: double storage, long import time, dealing with updates&conflicts)
c) all data in store plus FUSE for local fs integration (pro: allows tailored interfaces, con: creating a good and high perf impl is quite some work)
for a) and b) there can also be repo-like interfaces through dotfiles in any directory to allow a "log" and "commit" workflow from the local fs
In my experience, tradeoffs between the different approaches are real and matter in practice when working with larger existing file collections, especially a no-copy mode vs full copy, and fuse impls becoming a pain if not working well enough. So take this as a motivation to enable iroh to work well in constrained environments by enabling different storage patterns to evolve for different situations :)

@ramfox
Copy link
Contributor

ramfox commented Feb 20, 2023

Hello! The code that was previously hosted in this repository has been moved to n0-computer/beetle. beetle is in maintenance mode, but will still accept PRs.

If you are still interested in getting your PR merged, please re-open your PR on n0-computer/beetle.

Check out our blog post for more info on our new direction for iroh: https://n0.computer/blog/a-new-direction-for-iroh/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.