pdr-backend icon indicating copy to clipboard operation
pdr-backend copied to clipboard

[Lake][Subgraph][App] Update app/ & drop: PredictSlot and subgraph. Use Slot & lake.

Open idiom-bytes opened this issue 1 year ago • 1 comments

Background / motivation

There are various functions inside app + subgraph, that are queryng directly from subgraph + are using an object/data schema called PredictSlot.

This was causing some conflicts w/ lake, and the object that we're using there: "Slot".

Generally, we want to be building functionality that queries from the lake... and wherever that's not possible, to query from an API (that is yet to be built).

In the current cases:

  • pdr-backend/app

Is still using PredictSlot, and it looks like all hooks/information, is there to mainly support app/ which to-this-day, still powers the predictoor.ai frontend.

TODOs / DoD

  1. Reconcile these two things so we have 1 object: Slot
  2. Move everything to query/get data from the lake (or a remote API)
  3. Port/Update all the work inside of app/elsewhere that's using Subgraph + Predict Slot => To use Lake + Slot
  4. Remove/Drop all usage of PredictSlot
  5. Have all exterior facing systems querying from the lake

Tasks:

  • [x] Stop using PredictSlot and drop it from code
  • [x] Stop querying the subgraph for answers related to Slots, use the lake instead
  • [x] Update APP to query from the lake's "Slot" table, to provide information
  • [x] Update other APIs in app/ to serve the correct information from the lake
  • [ ] Write README.md on how to deploy server, update lake, and leave lake updating
  • [ ] Write README.md for how to test the server, to make sure that it's working and updating correctly
  • [ ] Make sure that predictoor.ai FE is still working using latest implementation that's serving from lake

idiom-bytes avatar May 14 '24 20:05 idiom-bytes

Please close when https://github.com/oceanprotocol/pdr-backend/issues/1048 is complete

idiom-bytes avatar May 21 '24 16:05 idiom-bytes

@idiom-bytes IMO we should not keep 2 tickets if only #1048 is relevant. It crowds the workspace. If the pending TODOs have been abstracted into #1048, I believe we can close this.

calina-c avatar Jun 10 '24 06:06 calina-c

Tracking outstanding items (including this) in #1299 and closing this to cleanup the backlog, until we have it resolved.

idiom-bytes avatar Jun 25 '24 16:06 idiom-bytes