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

[Feature request] a distributed database among instances to cache where most requested videos can actually be streamed from #4269

Closed
pezcurrel opened this issue Nov 16, 2023 · 2 comments
Labels
feature-request Request of a new feature

Comments

@pezcurrel
Copy link

One of the main problems why so many users, despite knowing of the existence of invidious, prefer to use youtube directly or link directly to videos from yotube in their social posts, etc., lies in the fact that it often happens that from an invidious instance a certain video cannot be streamed, so then the user would have to use the page that is accessible from the "switch invidious instance" link to search for the video on other instances until they find one that can stream it.

I think this problem could be mitigated, perhaps quite a bit, if it could be made that each invidious instance contributes to update a distributed database among all instances when a video is requested, with the status of "available" or not relative to that instance, and a timestamp of the check. Thus the distributed, constantly updating database would give each instance a way to know, with respect to the most requested videos, on which instances they are possibly available. At that point, when a user were to search, from any instance, for a certain video, if the video turned out to be available on the one on which he or she is searching, it would be streamed through that one; if it did not turn out to be available on that one, but turned out to be available on other instances that had checked it up to X amount of time before, a redirect would take place to the instance that had checked it as available most recently ("X" perhaps could be a constant, such as 1 day, or perhaps it could be evaluated according to more complex criteria); if it was not available on the initial instance and was not available on any others that had checked it up to X time before, or if no other instance had ever checked it before, it would work as it does now, i.e., the user would have to go to the page with the list of other instances accessible from the "switch invidious instance" link, and hope to find one where it is available (but the list could exclude those instances on which at the last possible check the video was found to be unavailable, if the last check had been done up to X time before).

I know little about distributed databases, however openpgp keyservers instances used to synchronize with each other (and some still do) a considerable amount of openpgp public keys, so perhaps it would be feasible.

@pezcurrel pezcurrel added the feature-request Request of a new feature label Nov 16, 2023
@pezcurrel
Copy link
Author

pezcurrel commented Nov 16, 2023

Also, the "switch invidious instance" page could query the other instances with the same query the user made on the first, and return only those that can stream it, or something like "no instance is currently able to stream that video"; or, maybe even better, the query would be done on the other instances as soon as the user sends it to the instance (s)he is using.

@unixfox
Copy link
Member

unixfox commented Nov 16, 2023

#92
#879

@unixfox unixfox closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request of a new feature
Projects
None yet
Development

No branches or pull requests

2 participants