Comments (4)
@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.
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.
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.
#291 fixes this
from ipfs-cluster.
Related Issues (20)
- I can't disable unpin parameter for the ipfshttp in docker compose file? HOT 3
- Fetching files from IPFS-cluster using CID HOT 1
- How to listen on a WebSocket or WebTransport or WebRTC address, so that I can dial to the cluster from helia browser node HOT 7
- IPFS cluster client's add endpoint's response HOT 1
- Error while adding multiple files in the IPFS cluster based private network HOT 1
- Error in adding and removing files from IPFS nodes HOT 1
- Pinning multiple files when adding multiple files like Kubo HOT 1
- Pins not replicated, while clusters sees each other HOT 3
- Does ipfs-cluster support byzantine tolerance? HOT 2
- ipfs-cluster-ctl peers ls errors on unknown protocol HOT 1
- Support configurable pinning only on untrusted peers
- Docker image for ARM HOT 1
- v1.0.7 - [FATAL tini (7)] exec /usr/local/bin/custom-entrypoint.sh failed: Exec format error HOT 3
- feat: support enabling Helia on nodejs as a node in an ipfs-cluster HOT 3
- Failure of `ipfs-cluster-ctl ipfs gc` results in inconsistent storage files. HOT 1
- Connection to Kubo via Unix domain socket fails with HTTP error HOT 2
- ipfs-cluster doesn't maintain /dns4 ipfshttp.node_multiaddress entries as DNS addresses. HOT 3
- Pebble supports 32-bits now HOT 1
- Pebble datastore deadlocked HOT 15
- ipfs-cluster-follow does not report all informer metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipfs-cluster.