I think that @gab should migrate to HYDRA Social gradually, one API endpoint at a time, by rewriting each endpoint in Node.js. Both services would run in production, both using the same Postgres database, and Nginx could proxy the endpoints to either HYDRA Social or Ruby on Rails, depending on what's been implemented.
For example, they could implement /api/v1/accounts in Node.js, deploy it, and then proxy the endpoint to it. Accounts could be fully implemented in Node.js and deployed to production before moving on to the next endpoint. This way it could be a gradual process, and there would be no downtime. Meanwhile everything starts to get faster.
There are many ORMs for Node.js that support both MongoDB and Postgres. If used, no code changes would be required to eventually migrate the database to MongoDB.
The downside is relying on Mastodon's database conventions, but it could always be migrated after the fact, and it is not a source of slowness. I actually believe it is a plus, because it means any existing Mastodon server could easily switch to HYDRA Social without needing to migrate their database, which could lead to greater levels of adoption.
@crockwave @alex @gab why using node instead of Django?
@alex @crockwave gotcha, thanks for the info. here are all (?) pleroma endpoints: https://docs-develop.pleroma.social/backend/API/pleroma_api/
@alex @crockwave maybe not updated or complete, the source is here (I think): https://git.pleroma.social/pleroma/pleroma-api/-/tree/master/src%2Fapi
@af Oh that's awesome, thank you! Didn't know that page existed but it will be really helpful. Been relying on: https://docs.joinmastodon.org/methods/accounts/ (Pleroma implements the Mastodon API plus the additional endpoints in your link)
@af @crockwave I love Django. I've built a lot of sites with it and I'd continue to recommend it for many types of sites. Node.js is a lot faster though. When Python hits a piece of slow code it has to wait for it to finish, while Node.js can move on and then come back to it. It's better for a complicated software with a lot of moving parts like a social media platform. Python has the same problems as Ruby, which is what we're trying to move away from.