Skip to content

[Feature] Implment Counter in local cache #1338

@robocanic

Description

@robocanic

What would you like to be added:

Image The homepage of Dubbo admin is full of different metrics, these metrics are statistical analysis attributes of different Resource. We need to defined a Counter to count the number of these metrics in cache in case to support the homepage data query.

Below are the procedures to implement homepage data query:

  1. Define a unified CounterManager, which is responsible for managing different kinds of Counter.
  2. Subscribe the specific type of Resource Event through Event Bus.
  3. Create or update the number of Counter during event processing.
  4. Implement http handler of the homepage data query

Why is this needed:
The query of homepage data includes different kinds of resources. In the last version of admin, we list all the objects to get the metric like the number of application. It's really cumbersome. So we need to improve it. For now, using event bus we can easily catch a resource event and calculate the metrics. And metrics do not need to be completely precise and it's perfect for implmenting Counter in the event process.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions