whitesoup12 / remote-falcon

Remote Falcon Monorepo for all things RF
GNU General Public License v3.0
12 stars 5 forks source link

Move from MySql to MongoDB #115

Closed whitesoup12 closed 3 months ago

whitesoup12 commented 9 months ago

Moving from MySql to MongoDB for several reasons:

  1. As it is today, the RF MySql database doesn't utilize any relational data, which kind of defeats the purpose of using a relational database. Moving to a document based database makes more sense.
  2. MongoDB is more flexible in terms of scalability.
  3. While both MySql and MongoDB support indexes for reads, MySql tends to have slower write times than MongoDB.

During this transition a lot of data will be renamed to make more sense based on how it's used. Eg. Playlist is used when it's actually sequence.

kentstroker commented 8 months ago

Have you considered using a graph database instead? There are certain relationships between objects and with a graph DB performing the "join" at WRITE (rather than SQL doing the JOIN at READ), the database would be really fast - easily under 8ms if not as fast as 2ms. I may be biased since I work for Neo4j, and I would be happy to take a look at what you are solving for and provide advice. I have been in the database business for 30+ years and can be a sounding board.