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

[SERVICES-2655] Migrate code from mx-exchange-analytics-indexer-repo #1515

Open
wants to merge 3 commits into
base: feat/analytics-indexer
Choose a base branch
from

Conversation

mad2sm0key
Copy link
Contributor

@mad2sm0key mad2sm0key commented Oct 23, 2024

Reasoning

  • provide a way to recompute historical analytics persisted in TimescaleDB using data from Elastic Search

Proposed Changes

  • compute historical prices and locked values for tokens and pairs by processing events generated by SCs. Pairs state is maintained in memory at processing time, and USD values are computed using the data from the WEGLD/USDC pair
  • by keeping pair state in memory, the computation can be performed in a synchronous manner. Getting the initial state, fetching the events from ES and persisting computed data are still performed asynchronously

How to test

  • N/A

- rename services and entities
- use ES events index when querying
- make all code relying on in-memory data run in a synchronous manner
- add 1 day caching to values fetched durring init operations
@mad2sm0key mad2sm0key marked this pull request as ready for review October 24, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants