kinode-dao / kinode-book

"Rust Book"-style introduction and documentation for Kinode OS
Apache License 2.0
12 stars 9 forks source link

Section 2.2. Networking Protocol #175

Closed jurij-jukic closed 6 months ago

jurij-jukic commented 6 months ago

Made minor formatting changes. Will skip trying to grok WS stuff for now

jurij-jukic commented 6 months ago

Let's keep this PR open and hammer out some more stuff here.

Some more questions:

  1. In 3.4. only closing a connection due to errors is mentioned, but is there a situation where one node might want to just close a WebSocket connection intentionally? I feel like something should be said about that

  2. 'If a peer is direct, i.e. they have networking information published onchain, determining their offline status is simple: try to create a connection and send a message; it will throw an offline error if this message fails.'

    • 'if this message fails' means what exactly?

@dr-frmr can you:

  1. tell me specifically which parts of the doc should be treated as "just works" by most devs? I assume it's a subset of section 3.1.
  2. link the correct parts of Noise Protocol Framework docs which explain the XX Pattern?
dr-frmr commented 6 months ago
  1. In 3.4. only closing a connection due to errors is mentioned, but is there a situation where one node might want to just close a WebSocket connection intentionally? I feel like something should be said about that

You can close a connection at any time, but that's implementation-specific so I don't see a need to go into too much detail at the protocol description. Maybe include a sentence to that effect in 3.4.

  1. 'If a peer is direct, i.e. they have networking information published onchain, determining their offline status is simple: try to create a connection and send a message; it will throw an offline error if this message fails.'
  • 'if this message fails' means what exactly?

If at the transport protocol level we get a failure. This takes on various forms depending on transport protocol used. Can rephrase to "try to create a connection and send a message; if the underlying transport protocol experiences any errors while doing so, throw an offline error."

@dr-frmr can you: 3. tell me specifically which parts of the doc should be treated as "just works" by most devs? I assume it's a subset of section 3.1. 4. link the correct parts of Noise Protocol Framework docs which explain the XX Pattern?

I can't edit your branch so let's merge this after changes from 1/2 and I can commit changes that make the noise protocol stuff more clear.

jurij-jukic commented 6 months ago

@dr-frmr please confirm the changes in the following comments and then merge