Hey guys, what are the best ORMs to use with types...
# general
l
Hey guys, what are the best ORMs to use with typescript? Specifically because of the startup time, latency etc. There are number of reports that prisma is significantly slower on lambda, sequelize doesn't work well as per their docs... Not sure what is the best option here
t
what database are you using?
we strongly recommend kysely - it's not an ORM it's a query builder which imo is the right choice we added support for RDS data api so it doesn't need long lived connections
l
I'm experimenting with cockroach serverless atm
t
it works well with things like planetscale as well which can support a high number of connections
do you really need cockroach's global consistency? if not I'd strongly suggest planetscale if you're not doing RDS
l
Honestly, I prefer the pricing model of cockroach
thats the only reason
t
RDS serverless and planetscale both have serverless pricing
cockroachdb is really slow relatively and only worth it if you need the master-master replication across multiple regions
l
I didn't know about the performance impact tbh
I experimented with planetscale, but their "rows read" could quickly get away from you if not careful
r
I use
knex
+
Objection.js
. Knex is battle tested and Objection.js's Typescript support is a little confusing to me, but once it is set it up it works great for relational queries. Both have great docs as well.
are you the authors of
kysely
?
t
no we're not but we work closely with the author: https://github.com/koskimas/kysely
he wrote objection.js
we wrote the data-api integration
l
@Roberto Novelo What db are you using?
r
I’ll give it a run and see how it goes, I like that
kysely
integrates to the RDS construct. You guys are everywhere, kudos!!
@Luka Isailovic I use rds aurora + postgres, with the data-api as well~
s
Are you using aurora serverless @Roberto Novelo?
I got really excited by aurora serverless, but then I kept reading that it wasn't recommended for applications with frequent reads
interested to hear real world experiences though
r
I have run it with some crazy a$$ workloads and it has worked just fine. Of course it will always depend on your queries performance IMHO!
s
So hard to analyse the scale at which Amazon docs mean
Ta for the info.
Might honestly need to try and take it for a spin.
r
yeah, fwiw that only speaks about reducing capacity down to zero, maybe they could do some rephrasing there.