Skip to content

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

Open
hschiau wants to merge 3 commits into
feat/analytics-indexerfrom
SERVICES-2655-migrate-code-from-mx-exchange-analytics-indexer
Open

[SERVICES-2655] Migrate code from mx-exchange-analytics-indexer-repo#1515
hschiau wants to merge 3 commits into
feat/analytics-indexerfrom
SERVICES-2655-migrate-code-from-mx-exchange-analytics-indexer

Conversation

@hschiau
Copy link
Copy Markdown
Contributor

@hschiau hschiau 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
@hschiau hschiau 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