Closed alrevuelta closed 2 years ago
Not sure if it was already in mind to implement a local database hosting the old PeerMetrics
. we might be interested in adding a badger db which allows fast reading and writing, and key-value-version searches. What do you think?
Thanks for the comments! One thing, were you checking the latest commit? I just see the diff between the first two ones. Perhaps you plan to review commit by commit?
Not sure if it was already in mind to implement a local database hosting the old PeerMetrics. we might be interested in adding a badger db which allows fast reading and writing, and key-value-version searches. What do you think?
Yep, thats an important feature. Let's move the discussions related to the db persistence to #18 since @kkhalil7 is working on that. I had in mind boltdb as its quite simple, also key-value and used by prysm software. However I don't have anything against badger-db.
Refactors the
metrics
module to be agnostic from the data source, so that its peer information can be fetched either from rumor in the case ofarmiarma-client
or via gRPC calls for thearmiarma-server
. This module should define all structs related to the information that we want to store for each peer and its operations.The goal is to make it a reusable module, that can be used by both the client and the server. This will allow to access both the aggregated metrics and single crawler metrics with the same interface. It's also important to decouple it from the rest of the code, making it also easier to unit test.
Work in progress:
metrics
folderpeerstore.go
and extra metrics. Same metrics can be achieved if needed but in a simpler manner.gossip-metrics
rumor agnostic.Clients
structs and make them more genericmetrics
control/actor/prometheus/start.go
PollPeerMetadata
and IP-API out of metrics.AnalyzeClientType
ping-metadata.go
out ofmetrics
as its not related.