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

Explore how to Mitigate UI failures due to RPC issues #1110

Closed
charleslavon opened this issue Apr 12, 2024 · 5 comments
Closed

Explore how to Mitigate UI failures due to RPC issues #1110

charleslavon opened this issue Apr 12, 2024 · 5 comments

Comments

@charleslavon
Copy link
Contributor

charleslavon commented Apr 12, 2024

Problem

How might we mitigate the perceived total failure of Decentralized Frontends that occurs when there are significant issues with a gateway's RPC provider?

image (13)

Area to explore

  1. Create an RoC plugin that mitigates UI failures due to RPC issues by locally storing a 24hour snapshot of recently fetched components, such that this fallback can be used when there are significant # of failures in retrieving components via RPC. This would only mitigate the problem for returning gateway visitors. If new users land on a gateway while during RPC failures, they would not have a local component cache available for fallback.
  2. A more gateway specific solution - expose a configuration that shows a list of available RPC providers, their status/uptime, and the ability to switch to a user-selected RPC provider.
@charleslavon charleslavon changed the title Explore how to Mitigate UI failures due to RPC issues by maintaining a local store of recently viewed components. Explore how to Mitigate UI failures due to RPC issues Apr 12, 2024
@charleslavon charleslavon transferred this issue from near/bos-web-engine Apr 12, 2024
@charleslavon
Copy link
Contributor Author

relates to near/bos-web-engine#315

@calebjacob
Copy link
Collaborator

Hey @mpeterdev @pavelisnear, it seems like a component cache has already been implemented? near/bos-web-engine#387

How does this cache work when the RPC fetch for loading the corresponding component fails?

@mpeterdev
Copy link
Collaborator

Correct, we cache components after transpilation in IndexedDB and if a given component is in the cache we will not attempt to fetch it from RPC. This would only mitigate failures well if all the components are in the cache i.e. when users revisit the same dapp

@mpeterdev
Copy link
Collaborator

A more gateway specific solution - expose a configuration that shows a list of available RPC providers, their status/uptime, and the ability to switch to a user-selected RPC provider.

Unfortunately this won't be possible since any component with a blockID version (which will be all embedded components by default) can only be resolved by an archival node of which we are the only provider

@charleslavon
Copy link
Contributor Author

@mpeterdev That's great to hear. So this should be a reasonable enough mitigation of RPC failures (where there is a cache hit) such that this task can be closed for now.

Correct, we cache components after transpilation in IndexedDB and if a given component is in the cache we will not attempt to fetch it from RPC. This would only mitigate failures well if all the components are in the cache i.e. when users revisit the same dapp

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

No branches or pull requests

3 participants