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

Solve Feed lookup delay #494

Open
asabya opened this issue May 19, 2023 · 1 comment
Open

Solve Feed lookup delay #494

asabya opened this issue May 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@asabya
Copy link
Collaborator

asabya commented May 19, 2023

Everything In fairOS depends on the epoch based feeds. But we don't keep track of the feed updates. For this reason we have "noclue" of the feed updates and the latest feed lookup take a while to get the latest update.

With the above case downloading a 30kb file can take upto 8-10 seconds to download (4-5 seconds for the feed lookup alone). Note: We do the feed lookup for getting the file metadata and references of the data blocks of the file.

We need a way to either lower the lookup time or store the latest epoch to make fairOS ecosystem faster.

@asabya asabya added the enhancement New feature or request label May 19, 2023
@asabya
Copy link
Collaborator Author

asabya commented May 19, 2023

Solution 1: We use any other kv store to map "topic:epoch" and keep the kv store files inside or outside user account.

Case 1: we store the feed-epoch map in user account.

we can actually store these store related files outside any pod space with the root feed api that is initialised at user login in fairOS. We load these files after login and initialise the kv store and flush the files into swarm after logout (or at some interval or after every write).

This will increase the login and logout time but a using kv store that has support for go and js will make things even for fairOS and fdp-storage.

With some initial testing of this above said implementation the same 30kb file can be downloaded in 4-5 seconds to download (1-2 seconds for the feed lookup) making the total download speed 2x faster.

Case 2: We use a kv store outside user account that will be local.

This will be even faster than case 1 theoretically.

But on the other hand we compromise with interoperability. If we are using a local fairOS server with cli and FDA, we need to keep the store files in sync manually. Thats just only fairOS ecosystem, we have fdp-storage aswell. Syncing the files manually will be a nightmare.

On the down side, accessing a outdated kv store might create confusion returning old data.

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