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

[Enhancement]: Switch to Postgres #15

Open
1 task done
mrjvs opened this issue Feb 25, 2025 · 1 comment
Open
1 task done

[Enhancement]: Switch to Postgres #15

mrjvs opened this issue Feb 25, 2025 · 1 comment
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase
Milestone

Comments

@mrjvs
Copy link

mrjvs commented Feb 25, 2025

Checked Existing

  • I have checked the repository for duplicate issues.

What enhancement would you like to see?

Mongodb has it's issues and it's starting to show on Juxt.

We will be using the Prisma ORM, used only on the new Juxt-API project.

This is going to be an incremental change, slowly collections will be moved. Not all in one release.

Any other details to share? (OPTIONAL)

The main problems that we have encountered:

  • You can't relate data properly in mongodb and juxt needs to maintain a lot of relationships, a few examples:
    • A post has likes, which has a user.
    • A post has a reply, which has a user
    • a community has posts, which has replies, which has users
    • All of these relationships are very hard to join together efficiently - the solution to this has been to just copy paste the data you need joined also in the other datatype (copy paste user data into a reply). But this gets out of sync, you can no longer update a mii image by changing one field.
  • Schema-less data easily gets out of sync, especially when running it in two separate services (miiverse-api, juxtaposition-ui)

Mongodb performs well in terms of speed, but it comes at the cost of development speed and data consistency. It's not a good fit for juxt.

@mrjvs mrjvs added approved The topic is approved by a developer enhancement An update to an existing part of the codebase labels Feb 25, 2025
@mrjvs mrjvs added this to the Juxt refactor milestone Feb 25, 2025
@jonbarrow
Copy link
Member

Mongodb has it's issues and it's starting to show on Juxt.

Can you provide any examples of this which aren't user error? Mongo has been working just fine in arguably higher traffic servers like the account server, and nearly every issue we've had with Mongo has been user error or some other issue unrelated to the database itself

@jonbarrow jonbarrow mentioned this issue Feb 26, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase
Projects
None yet
Development

No branches or pull requests

2 participants