Question: Pliny and ActiveRecord
heavysixer opened this issue · 4 comments
Hi everyone,
I realize that the developers of Pliny must have made a strategic decision in not using ActiveRecord, I am just trying to understand what they are. Is it possible to use ActiveRecord instead or is there something I am not seeing about the use of Sequel.
Best Regards,
Mark
Hi Mark,
Exactly, there are certainly good arguments for going with either, but I personally tend to pick Sequel:
- Overall it is leaner and has no dependencies
- Amazing performance gains for Postgres thanks to sequel_pg
- It tends to receive support for new Postgres features faster (last I recall was jsonb)
- Sequel models have less callback hooks, making them a great fit for mediators – pattern we all love in Pliny.
- Jeremy Evans is the best open source maintainer I know. He's doing a great job keeping Sequel small and concise, and yet is really helpful and prompt in taking patches and responding to questions.
It shouldn't take too much work to adapt a Pliny app to use ActiveRecord instead, but keep in mind this will make updates harder, and things like pliny-generate model
are always going to assume you're on Sequel.
Hope this helps!
Hi @pedro thank you for the thoughtful and detailed response. I'll go through all of these links you provided and share them with my team.
Best Regards,
Mark
Jeremy Evans is the best open source maintainer I know
So so so so much this. Though, Sequel does have a low bus factor, which is worth considering...
@pedro one additional followup, does Pliny have a convention, best practice, or suggestion for how to get these various APIS communicating in a microservice architecture? I understand that Pliny is a tool for writing APIs following a collection of best practices, but my understanding was that Heroku did this as part of their transitions to microservices. What I am missing in reading through the documentation is how once they are deployed you string them together into the larger aggregation tier. It's possible I am missing some other took that Heroku also released in tandem, so apologies if this is documented elsewhere.