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

Balances cache worker #254

Open
vikiival opened this issue Feb 18, 2024 · 5 comments
Open

Balances cache worker #254

vikiival opened this issue Feb 18, 2024 · 5 comments
Labels

Comments

@vikiival
Copy link
Member

One idea for speed-loading balances on KodaDot app is to cache it on the worker in some KV storage.
Where <SS58(42), Balances>

Once user hits the endpoint it should refetch the balance from various RPC nodes.

@iMac7
Copy link

iMac7 commented Mar 23, 2024

@vikiival new worker to be built for this or extend existing one? I could use some pointers on how to implement this

@vikiival
Copy link
Member Author

@vikiival new worker to be built for this or extend existing one?

New one, if it was an extension of existing one, it would be labeled with the name of the worker

I could use some pointers on how to implement this

Can you please elaborate?

@iMac7
Copy link

iMac7 commented Mar 24, 2024

Can you please elaborate?

Answered for now if it's a new worker 👍

@iMac7
Copy link

iMac7 commented Mar 24, 2024

@vikiival I just tried implementing this. At first, I thought the balances api could be called from the worker but I see cloudflare doesn't support wasm code generation needed by the polkadot api.
If the balance should come from the frontend, how long is the ideal time to cache balances?

@vikiival
Copy link
Member Author

Hello, i do not have answer for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants