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

Doubts / questions regarding upstreaming debug panel changes #1764

Closed
prathamesh0 opened this issue May 19, 2023 · 5 comments
Closed

Doubts / questions regarding upstreaming debug panel changes #1764

prathamesh0 opened this issue May 19, 2023 · 5 comments
Labels
kind/stale need/author-input Needs input from the original author

Comments

@prathamesh0
Copy link

Here are a few questions that will help us with upstreaming the debug panel changes:

  • Where do the debug panel React components belong in libp2p?
    • On the js-libp2p open maintainers call on 16th May, it was discussed that it’ll be better to have the debug panel in it's own separate repo
    • It'll be a monorepo having packages:
      • react-libp2p-debug: holds all the React components
      • libp2p-util: holds some util code that will eventually get upstreamed to js-libp2p
      • example-libp2p-app: an example app that uses the debug panel
    • What should be the names for repo and packages above?
  • We are tracking latency from last 5 pings to each connected peer to display it in the debug panel
    • Currently implemented on the user side in libp2p-util package mentioned above; but can be integrated upstream behind a config option
    • Where does this belong in libp2p/js-libp2p?
  • Upstreaming custom metrics implementation (from fork) to libp2p/js-libp2p-prometheus-metrics:
    • Currently used prom-client does not support browser environments; in the fork we are using promjs for getting the metrics in browser; is it fine to switch to promjs as a client library?
      • The usage on the user side is a little different for both client libraries, so it may be a breaking change
    • Can methods be added to the Metrics interface (@libp2p/interface-metrics) that allow users to access metrics without keeping a reference to some global singleton / metrics instance?
      • An additional method in the Metrics interface to get data as JSON (instead of string) will also help in debug panel as we won't have to parse the string result on the UI side
  • debug protocol implementation for network graph
    • Using this protocol, we get some info from connected peers (peers it's connected to, etc.) which is used to form the network graph in debug panel
    • Currently, we are doing it over a pubsub topic on the user side
    • We would like it to be implemented as a protocol in libp2p/js-libp2p that nodes can enable with a config option
    • Is there an existing protocol that does something similar? Or any implementation we can refer to for the same?
  • Human readable pseudonyms for peer ids
    • We are using three-word pseudonyms (created using unique-names-generator) to make the displayed peer ids more human readable
    • Where does this belong in libp2p/js-libp2p? Can it be added as an additional property in the PeerId type / interface?
@prathamesh0 prathamesh0 added the need/triage Needs initial labeling and prioritization label May 19, 2023
@p-shahi
Copy link
Member

p-shahi commented May 30, 2023

What should be the names for repo and packages above?

You can create the repo and keep it in your own organization. Feel free name it whatever.

We are tracking latency from last 5 pings to each connected peer to display it in the debug panel
Where does this belong in libp2p/js-libp2p?

Our inclination is to not bundle this with the js-libp2p framework, it can be part of a module that you expose.

is it fine to switch to promjs as a client library?

Suggestion is to publish a new impl of inteface-metrics that uses promjs instead.

Can methods be added to the Metrics interface (@libp2p/interface-metrics) that allow users to access metrics without keeping a reference to some global singleton / metrics instance?

@libp2p/interface-metrics is an intf for storing metrics data, impls of the interface can impl additional methods to extract metrics from the store

An additional method in the Metrics interface to get data as JSON (instead of string)

This can be added to your promjs impl of interface-metrics

debug protocol implementation for network graph

post 0.45.0 you can add a new service as a custom protocol

Where does this belong in libp2p/js-libp2p? Can it be added as an additional property in the PeerId type / interface?

This is better kept in the application space, we don't want to add this property to PeerId

@p-shahi
Copy link
Member

p-shahi commented Jun 6, 2023

@prathamesh0 did this help?

@achingbrain achingbrain added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels Jun 6, 2023
@github-actions
Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@github-actions
Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

This issue was closed because it is missing author input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

3 participants