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

CoreApi.Offline #5654

Closed
magik6k opened this issue Oct 26, 2018 · 4 comments
Closed

CoreApi.Offline #5654

magik6k opened this issue Oct 26, 2018 · 4 comments
Labels
need/community-input Needs input from the wider community topic/core-api Topic core-api

Comments

@magik6k
Copy link
Member

magik6k commented Oct 26, 2018

Mentioned in #5649 (comment), it would be nice to have a way to tell CoreAPI that we want to be in offline mode.

There are a few ways to do this:

  • Context hints - [RFC] Add an offline hint to contexts #4009
    • Should be quite contained
    • Easy to implement global --offline flag
  • api.Offline()
    • Should also be quite contained
    • Easy to implement global --offline flag too
    • More visible?
  • Functional options on the constructor
    • Also not a bad option, should be decently small change
    • Also easy to implement --offline

We could also use this to expose sessions (and maybe other global options later?), so I'd say we should go with the more flexible option, which would be context hints

Opinions?

cc @Stebalien

@magik6k magik6k added need/community-input Needs input from the wider community topic/core-api Topic core-api labels Oct 26, 2018
@dokterbob
Copy link
Contributor

Trying to add large (150GB+) resources with a running daemon breaks for us (ipfs-search.com). Probably because the daemon crashes during the process.

I might share these resources using ipfs-pack. But due to the large resources required by an IPFS daemon, I would strongly prefer to only run one, and there's already one running on our server (eating about 10GB RAM with about 8k connections).

Hence, it would be ideal to be able to add these resources independently of the running (and regularly crashing, due to it hitting hard memory limits) and then adding them as a one-off operation. Hence, being able to do ipfs add as if there were no daemon running.

@Stebalien
Copy link
Member

@dokterbob I believe you're looking for the poorly documented ipfs --local add flag. This issue is about an offline option such that ipfs get ... doesn't use bitswap (although it will likely also imply --local).

@dokterbob
Copy link
Contributor

Poorly or not documented? Where might I find info on this one?

@Stebalien
Copy link
Member

ipfs --help will list the global options (including --local).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community topic/core-api Topic core-api
Projects
None yet
Development

No branches or pull requests

3 participants