do people want a SQL DB over HTTP?
The PlanetScale serverless driver for JavaScript
41–50 of 56 posts
Re: The PlanetScale serverless driver for JavaScript
#42Very cool and lightweight way to talk to PlanetScale but for now I'll stick with Prisma. Prisma is much heavier (engine weighs in at ~50MB) and that can be a non-starter for serverless in some cases but it works for me on AWS Lambda. The nice thing about PlanetScale is you get nearly unlimited connections (soft limit of like 250K IIRC) so making 1 connection per active lambda isn't a problem at all. I've been using P…
We didn't talk much about this yet, but the underlying tech for this will help you within Lambda too reduce latency even over normal MySQL. This specifically is targeting environments where a MySQL client isn't able to run.
Re: The PlanetScale serverless driver for JavaScript
#43This is great! Potentially the missing piece in the world of "serverless": a serverless SQL database accessible over HTTP with no minimum price. I saw AWS Aurora has a Data API but currently that does have a minimum monthly cost. Fauna is possibly the closest, but that appears to involve translating SQL to its FQL. How stable is the beta?
It's 90% there... but not allowing foreign keys [1] (=cascading delete) means that this solution becomes equal with DynamoDB (Serverless + Scale to 0 as well) because products will either be built for it from day one or never support it with a full fledged DB server instance that is 100% up in mind. Unfortunately, didn't find a lot in-between. [1] https://planetscale.com/docs/learn/operating-without-foreign...
Re: The PlanetScale serverless driver for JavaScript
#44Earlier quoted context omitted.
We didn't talk much about this yet, but the underlying tech for this will help you within Lambda too reduce latency even over normal MySQL. This specifically is targeting environments where a MySQL client isn't able to run.
Is the HTTP API technically a wrapper of the vtgate's grpc interface?
Re: The PlanetScale serverless driver for JavaScript
#45While this is cool tech and convenient, I worry about run-away costs and what happens if the company goes down? Seems like a LOT of risk.
It's open-source. What's your concern now?
Re: The PlanetScale serverless driver for JavaScript
#46import { connect } from '@planetscale/database'
const config = { host: '', username: '', password: '' }
Re: The PlanetScale serverless driver for JavaScript
#47Curious what the performance impact is of replacing TCP with HTTP for this kind of thing
Great question! Author of a lot of the infrastructure surrounding this here. I plan on following up with a more technical deep dive on some of these aspects, but it's quite a bit hard to do a 1:1 comparison. While, obviously, HTTP also uses TCP, I'm going to assume you're asking more about the binary MySQL protocol vs HTTP. On the surface, yes, HTTP is going to have more overhead with headers and the other aspects th…
Re: The PlanetScale serverless driver for JavaScript
#48Re: The PlanetScale serverless driver for JavaScript
#49Please forgive my ignorance. Is it right if I say the password seems to be available on the client side? import { connect } from '@planetscale/database' const config = { host: ' ', username: ' ', password: ' ' } https://github.com/planetscale/database-js
Re: The PlanetScale serverless driver for JavaScript
#50Please forgive my ignorance. Is it right if I say the password seems to be available on the client side? import { connect } from '@planetscale/database' const config = { host: ' ', username: ' ', password: ' ' } https://github.com/planetscale/database-js