OpenBankProject / OpenBankProject/OBP-API

feature: add cache to Metric endpoints

Open
#1,244 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

In order to reduce frequently query metrics related db table, add cache to metrics endpoints.
Accept criteria:

  1. Get Aggregate Metrics
  2. Get Connector Metrics
  3. Get Metrics
  4. Get Top APIs
  5. Get Top Consumers

questions:

  1. "Search API Metrics via Elasticsearch" also need add cache?
  2. If it is ok to add cache to MappedMetrics object? or add to ApiMethods300.scala?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Metric endpoint implementations, the MappedMetrics object, and ApiMethods300.scala, then trace how the five listed endpoints query the metrics database. Check how the Elasticsearch metrics search fits into the scope and determine where caching belongs. Done means the caching scope and placement are resolved for all five accepted endpoints, with the Elasticsearch question addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, scala
Domain
api, backend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.