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

[ENHANCMENT] Migrate Marketplace/Pricing feature off of Firebase #119

Closed
3 tasks done
r0adkll opened this issue Nov 11, 2019 · 1 comment
Closed
3 tasks done

[ENHANCMENT] Migrate Marketplace/Pricing feature off of Firebase #119

r0adkll opened this issue Nov 11, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@r0adkll
Copy link
Owner

r0adkll commented Nov 11, 2019

Migrate the TCGPlayer/Marketplace pricing functionality from the scheduled cloud function + Firestore storage to its own server/database to reduce the Firebase cost + Read usage.

Due to usage limits with Firestore, it would be costly to increase the # of times the function pulls all of the card prices and stores them in Firestore. This limitation leads to inaccurate or stale pricing data later in the day (since, currently, prices are only updated at 6 am EST every day.

With a dedicated server devoted to the polling and storage of the pricing data we can update it to do this much more frequently, say like ~1-2 hrs, as well as doing some efficiency optimizations by analyzing which cards prices don't fluctuate that often (like commons, or older cards) and reduce their polling rate to once every day or few. Then we can devote more frequently polling to cards with a more volatile market.

Tasks

  • Build ktor + postgres server to periodically pull price information and serve with lightweight API
  • Build caching integration in-app to replace the current Firestore backed implementation
    • The API returns the timestamp of when the server should run it's price check again and this mechanism should use that to invalidate pricing data.
@r0adkll r0adkll added the enhancement New feature or request label Nov 11, 2019
@r0adkll r0adkll self-assigned this Nov 11, 2019
@r0adkll
Copy link
Owner Author

r0adkll commented Dec 15, 2019

Will be included in v1.10.1

@r0adkll r0adkll closed this as completed Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant