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

feat: pub-sub cache update logic #7

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

AmanRaj1608
Copy link
Collaborator

Describe your changes

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics?
  • Will this be part of a product update? If yes, please write one phrase about this update.

@AmanRaj1608
Copy link
Collaborator Author

  • Using Rwlock over Mutex - Because
  • Using StreamExt as unable to use async with map
  • Using Arc to share same instance as RoutingEngine so each request handler will have access to the RoutingEngine without running into ownership issues. Sharing it between pub sub task, service controler, api

Comment on lines +168 to +171
// match indexer.run::<LinearRegressionEstimator>().await {
// Ok(_) => info!("Indexer Job Completed"),
// Err(e) => error!("Indexer Job Failed: {}", e),
// };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

@ankurdubey521
Copy link
Collaborator

  • Using Rwlock over Mutex - Because

Makes sense

@AmanRaj1608 AmanRaj1608 merged commit c064ee0 into feat/cache-decode Jun 25, 2024
0 of 2 checks passed
@AmanRaj1608 AmanRaj1608 deleted the feat/pubsub-cache-update branch June 25, 2024 12:46
AmanRaj1608 added a commit that referenced this pull request Jun 27, 2024
* feat: Implement a configuration parser

* test: Add Tests for Uniqueness

* Create pull_request_template.md

* chore: Add Sample config.yaml

* feat: init bin and api crate

* feat: LinearRegressionEstimator

* feat: storage and api updates

* chore: Refactor mongodb and user apis

* feat: RouteSource Implementation for BungeeClient

* test: BungeeClient

* feat: Token Price Provider and Utils

* fix: Replace BigInt by Ruint

* test: Fix Bungee Tests

* feat: Build Estimators in Routes Indexer

* fix: Add BUNGEE_API_KEY in github action

* feat: refactor engine

* fix: add display in all structs

* feat: added chainning instead of options

* Update test.yml

* Update test.yml

* feat: Estimator Flow

* feat: Redis Model Store

* chore: refactor of storage and AAS

* fix: conflict resolve

* temp: fix build

* chore: remove code

* edit readme

* feat: Redis Publish Subscribe

* fix: Migrate to thiserror

* feat: Token Price Provider Integration

* feat: decode cached data for engine

* add tests

* add best path test

* fix: Indexer

* fix: Tests

* temp: broken indexer

* feat: pub-sub cache update logic (#7)

* feat: Add COVALENT_API_KEY to test environment

* fix comments

* refactor: storage (#8)

* feat: add error handling

* fix: take the solver x and y from config parameter

* fix: tests

---------

Co-authored-by: Ankur Dubey <[email protected]>
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