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

Disambiguating nodes/peers/instances vs daemons #245

Closed
Mr0grog opened this issue Jul 25, 2018 · 7 comments
Closed

Disambiguating nodes/peers/instances vs daemons #245

Mr0grog opened this issue Jul 25, 2018 · 7 comments
Assignees
Labels
dif/easy Someone with a little familiarity can pick up effort/days Estimated to take multiple days, but less than a week good first issue Good issue for new contributors kind/enhancement A net-new feature or an improvement to an existing feature P3 Low: Not priority right now status/inactive No significant work in the previous month topic/docs Documentation

Comments

@Mr0grog
Copy link

Mr0grog commented Jul 25, 2018

The term “node” is used in very different ways in different contexts around IPFS. At the Berlin developer summit, we decided adding a concept doc describing this might be helpful (it would also be a good idea to try and avoid using the general term “node” in the future 😛).

Here was the original draft:

Node

You might see the term “node” used all over in discussions, issues, and IPFS-related code. It is a very general term, so its meaning depends on context, but you’ll see it used in two main ways around IFPS:

  1. IPFS Nodes (aka IPFS daemons aka DHT nodes) are copies of IPFS that are running on a computer and can exchange data with other IPFS nodes.

  2. DAG Nodes, UnixFS Nodes, Data Nodes, etc. are actual pieces of data on IPFS. When you add a file with the ipfs add myfile.txt command, it gets broken up into several nodes that each contain a chunk of the file and are linked to each other.

Some concerns:

  • Equating an IPFS node and a daemon is not quite correct (an IPFS node doesn’t have to be the only thing running in a process, it might not also have a gateway, etc.). Can we be more accurate without descending into arcana?

  • What about Libp2p Nodes (kinda like IPFS nodes)?

/cc @Stebalien @hsanjuan who were also in this session


Concept docs are concise, high-level descriptions of various core concepts in IPFS. They should strive to answer:

  1. What is this?
  2. How does it relate to the rest of IPFS?
  3. How can (or should?) you use it? (Note: sometimes the answer is that you should understand it, but not use it. Bitswap is probably a good example.)
  4. Where do you go to learn more?
  5. What is the current state of affairs?
@vmx
Copy link
Member

vmx commented Jul 26, 2018

As I work in the IPLD world, I often use the word "node" in my context (I'm not aware of a proper replacement). I try to talk about "peers" whenever I talk about "IPFS Nodes" as I think that's a proper substitute.

@Mr0grog
Copy link
Author

Mr0grog commented Jul 30, 2018

See also this discussion: ipfs/js-ipfs#1269 (comment) — we should make sure we cover the idea of instances and daemons when correcting for the concern above node vs. daemon (node and instance are synonyms in this case).

As I work in the IPLD world, I often use the word "node" in my context (I'm not aware of a proper replacement).

@vmx I think “node” is pretty reasonable language there, but it’s important to make sure you contextualize it in any documentation by calling it an “IPLD node” (not just “node”) when you first introduce it in a paragraph or section of a document (after that, you can probably switch to just “node” in the rest of the doc because you’ve provided needed context already, similar to how you might write out a complicated term the first time you use it and abbreviate it for the rest of the doc).

@Stebalien also suggested that we should try and not use the term node in code to refer to an “IPFS node” anymore. It’s easier and more sensible to say something else for that (e.g. ipfs, ipfsNode, ipfsInstance, instance) than it is to not use node when referring to graphs of data nodes.

I try to talk about "peers" whenever I talk about "IPFS Nodes"

Yeah! We should make sure to mention that here, too. I think some people have a little trouble with “peer” because it sounds odd when referring to yourself/your own local instance.

@Mr0grog Mr0grog changed the title Write concept doc about “Node” Write concept doc about “Nodes” Aug 23, 2018
@jessicaschilling jessicaschilling changed the title Write concept doc about “Nodes” Concept Doc: “Nodes” Jul 26, 2019
@jessicaschilling jessicaschilling changed the title Concept Doc: “Nodes” Write concept doc disambiguating nodes/peers/instances vs daemons Sep 19, 2019
@jessicaschilling jessicaschilling changed the title Write concept doc disambiguating nodes/peers/instances vs daemons [NEW CONTENT] Disambiguating nodes/peers/instances vs daemons Dec 16, 2019
@johnnymatthews johnnymatthews changed the title [NEW CONTENT] Disambiguating nodes/peers/instances vs daemons Disambiguating nodes/peers/instances vs daemons Apr 17, 2020
@hsanjuan hsanjuan transferred this issue from ipfs-inactive/docs May 22, 2020
@johnnymatthews johnnymatthews added dif/easy Someone with a little familiarity can pick up effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or an improvement to an existing feature P3 Low: Not priority right now status/inactive No significant work in the previous month topic/docs Documentation labels Sep 8, 2021
@Annamarie2019
Copy link
Contributor

Annamarie2019 commented Jan 25, 2022

@johnnymatthews Is this general understanding correct:

  • Node is an individual element on the distributed web (copy of IPFS running on a computer).
  • Peer is the relationship each node has to other nodes (can exchange data with other nodes).
  • Daemon refers to the node status (running and available for data exchange...listening for requests).

Edit: Questions:

  • As soon as we add a file to IPFS, is that the point at which we become a node?
  • If I close the IPFS Desktop, does the daemon stop running?
  • Is there a concept of capacity for a node? (The description of IPFS Desktop seems to suggest so. https://ipfs.io/#how "ready for heavy-duty hosting and development")

It might be useful to discuss these terms in respect to the UI/CLI and what each causes. For example:

  • Become a node and a peer upon adding a file to IPFS.
  • See peers with the IPFS Desktop (I guess a CLI command as well, yes?).
  • The node is only a daemon when IPFS Desktop is open or a daemon is running in CLI.

@johnnymatthews
Copy link
Contributor

Node [...] - @Annamarie2019

Yes. Except, each node isn't running a copy of IPFS. IPFS isn't a blockchain, or something with a specific state. We could both be running IPFS on our machines, and what our nodes contain could be completely different.

Peer [...] - @Annamarie2019

Correct!

Daemon [...]

A daemon is a program that runs in the background.

As soon as we add a file to IPFS, is that the point at which we become a node?

No. As soon as the ipfs daemon starts, your computer becomes a node - even if you're not hosting any files. Your node is still working with other nodes to figure out where data is stored.

If I close the IPFS Desktop, does the daemon stop running? - @Annamarie2019

Yes, but make sure that it's properly closed (right click on the IPFS icon in the status bar and click Exit, or whatever it says in MacOS).

Is there a concept of capacity for a node? - @Annamarie2019

Do you mean how much data a node can store? Not really, but there are upper limits for various bits and bobs within IPFS. @lidel can probably clarify though.

@johnnymatthews johnnymatthews added the good first issue Good issue for new contributors label Jan 31, 2022
@Annamarie2019
Copy link
Contributor

Annamarie2019 commented Feb 3, 2022

I'll take this one. (I'll also take 683 and 334....to really get into nodes.)

@Annamarie2019
Copy link
Contributor

In progress....

@Annamarie2019
Copy link
Contributor

This issue was resolved with PR #1031 . I included these changed files in that PR before I knew how to properly separate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/easy Someone with a little familiarity can pick up effort/days Estimated to take multiple days, but less than a week good first issue Good issue for new contributors kind/enhancement A net-new feature or an improvement to an existing feature P3 Low: Not priority right now status/inactive No significant work in the previous month topic/docs Documentation
Projects
None yet
Development

No branches or pull requests

4 participants