Skip to content

Review architecture for loading data from network and consider refactor to follow stale-while-revalidate pattern #506

@mattyg

Description

@mattyg

We want locally stored data to be rendered as quickly as possible. Thus we would ideally be following something like the stale-while-revalidate pattern: load local data and render it, then fetch network data, then replace the rendered data with the received network data if stale.

I believe we may having something similar to this already implemented. Because we are using full-arc nodes, all peers are an authority for all data, and thus peers never fetch from the network, even for get_links requests with GetOptions::Network, instead waiting to ingest data via gossip. This should be confirmed.

If not, we should consider implementing like a stale-while-revalidate pattern by making 2 redundant calls when loading data: the first with GetOptions::Local, the second with GetOptions::Network.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions