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

Change the database #549

Open
goto-bus-stop opened this issue Jan 4, 2023 · 2 comments
Open

Change the database #549

goto-bus-stop opened this issue Jan 4, 2023 · 2 comments
Assignees

Comments

@goto-bus-stop
Copy link
Member

goto-bus-stop commented Jan 4, 2023

We have relational data and I've had to spend a lot of time making Mongo do the things that we need. It's a bad fit for this type of application but it's always seemed more trouble than it's worth to change. However there are more issues than just fit for purpose. Mongo requires an annoying amount of maintenance to keep up-to-date, which we've needed to do because they are still adding stuff that lets you simulate relational models every now and then. There also aren't many affordable managed options for small applications.

If we switch to anything SQL-based, we get many more guarantees, and probably much better performance too. As it is we only have a few 100K medias at most on wlk.yt but loading 1 page of a playlist can already take 500ms because of all the relations we need to look up using fancy mongodb pipelines and whatnot. We could also improve it by changing the data model (we really didn't design a data model for mongo back in the day), but at that point we are already doing a complicated migration, and we might as well make a similar-effort migration for much larger gains.

Maybe 2023 is the year for this. I would like to avoid using an ORM. I think it would be nice if we could even work with sqlite (though i would probably recommend postgres in docs).

@goto-bus-stop goto-bus-stop self-assigned this Jan 4, 2023
@goto-bus-stop
Copy link
Member Author

@goto-bus-stop
Copy link
Member Author

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

No branches or pull requests

1 participant