GithubHelp home page GithubHelp logo

Connectivity graph about ipfs-cluster HOT 4 CLOSED

ipfs-cluster avatar ipfs-cluster commented on June 15, 2024
Connectivity graph

from ipfs-cluster.

Comments (4)

ZenGround0 avatar ZenGround0 commented on June 15, 2024

@hsanjuan @dgrisham Below is a proposal of one way this could be done. @hsanjuan I know you have been thinking about this for a relatively long time so I am interested to hear your thoughts and suggestions for improvement. Send me your feedback!

Drawing out the full connectivity graph in ascii art of a varying number of cluster and ipfs nodes is difficult. I propose that the connectivity display instead show very simple responses in the case where everything is healthy. Then in the case where nodes are unexpectedly disconnected it should show the connectivity graphs and broken links for each of these nodes one at a time. Furthermore I propose breaking down the prompts into describing cluster node and then ipfs node connectivity. For example in the case where everything is connected:

> ipfs-cluster-ctl graph
All cluster peers are connected
All ipfs daemons are connected

And in the case where nodes are disconnected:

> ipfs-cluster-ctl graph
2 cluster peers not fully connected: QmAAAaaa, QmCCCccc
______________________________________________________________________________
IPFS daemons                                               IPFS Cluster Peers
______________________________________________________________________________

Qmasdfasdf <------->X-------------X <---------------------> QmBBBbbb
                    |  QmAAAaaa   | <---------------------> QmDDDddd
                    X-------------X <----\          \----->  QmCCCccc

______________________________________________________________________________

Qmhjklhjkl <-\   \->X-------------X <---------------------> QmBBBbbb
                    |  QmCCCccc   | <---------------------> QmDDDddd
                    X-------------X <----\          \----->  QmAAAaaa

1 IPFS daemon not fully connected: Qmhjklhjkl
______________________________________________________________________________
IPFS daemons                                               IPFS Cluster Peers
______________________________________________________________________________

Qmasdfasdf <--------->X-------------X <----\          \-----> QmCCCccc
Qmyuioyuio <--------->|  Qmhjklhjkl | 
Qmertyerty <--------->X-------------X 

The command could further take a peer id as an argument e.g. ipfs-cluster-ctl graph QmAAAaaa and only display the connectivity graph of that peer in the same fashion as above.

Note that the general approach above could also just list out connected peers and disconnected peers in a table, but I think that visually showing connections and links leads to smoother processing of the information.

from ipfs-cluster.

hsanjuan avatar hsanjuan commented on June 15, 2024

As I see this, the command should generate a DOT file (https://en.wikipedia.org/wiki/DOT_(graph_description_language)). This format can then be used by existing programs (graphviz suite) to print the graph in whatever format is appropiate.

For example, once you have the graph definition with all existing connections you can do something like a 'complement' operation to see which paths are missing. Probably it makes sense to provide 3 graphs :

  • ipfs-cluster peers connections to other peers
  • ipfs-cluster peers connections to their ipfs daemons
  • ipfs daemons connections to other ipfs-daemons in the cluster

I am not sure how much of this is server-side work or ctl side (the server could provide the necessary lists of connections).

Implementing yourself an ascii graph representation might be a greater time sink than this issue deserves...

from ipfs-cluster.

ZenGround0 avatar ZenGround0 commented on June 15, 2024

Thanks for the feedback, I see your point of view and will ease up on a full blown ascii graph in favor of making a dot file. I'll be working on branch: https://github.com/ipfs/ipfs-cluster/tree/feat/connectivity-graph if anyone is interested in taking a look.

from ipfs-cluster.

hsanjuan avatar hsanjuan commented on June 15, 2024

#291 fixes this

from ipfs-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.