You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HealthManager's role is to aggregate and provide data around individual protocols' health status (number of peers connected for a protocol) in the form of async methods: getProtocolHealth()/getOverallHealth().
On consumer-side, these methods allow access to information, but live updates are not available. Workaround has been to call these methods in intervals of time. This creates a delay and adds friction to promptly be able to respond to the node's state of connections.
Solution
Provide an events-based API for changes to the protocols' health statuses
Let's build a simple API around ConnectionManager and expose amount of peers per protocol.
Event based API can be build on top of libp2p events similarly to connection state on ConnectionManager.
Problem
HealthManager
's role is to aggregate and provide data around individual protocols' health status (number of peers connected for a protocol) in the form of async methods:getProtocolHealth()
/getOverallHealth()
.On consumer-side, these methods allow access to information, but live updates are not available. Workaround has been to call these methods in intervals of time. This creates a delay and adds friction to promptly be able to respond to the node's state of connections.
Solution
Provide an events-based API for changes to the protocols' health statuses
cc @vpavlin
The text was updated successfully, but these errors were encountered: