Heyo, I have a nooby web dev question, hope someone wouldn't mind shedding some light for me:
When it comes to many old school SSR frameworks like PHP, databases are always on the same server as the main server which hosts websites. I assume this is because of the minimal latency to talk between DB and SSR app. Why are so many of the popular services now orientating on being a DB, but in another location than the web server (Fauna, Firebase etc.)? What is the advantage of this solution compared to DBs right next to the web server?
A project lead dev asked me to develop a js module that would act as a music library/DB for our small music player component. The app is made in Svelte, and runs on workers. The idea is that svelte can also act as an API point to itself, and that's where the module would live.
I have a very bad feeling about asking javascript to act as a database, even if it won't be that huge and very local. I am trying to propose using another service which already was developed to be a database, but I don't know at which point it is worth switching from a local Json file and parser to an actual DB service. What is usually the approach here?
Thanks for any input!