Idea: Prisma Data Platfom DBaaS Hey team. I am pl...
# prisma-data-platform
f
Idea: Prisma Data Platfom DBaaS Hey team. I am playing with an idea that I've got for Prisma and I wanted to see how others feel about it. First, some context: • I see so many people reaching out for a CMS to avoid the burden of managing a database and have a fluent api to query and mutate the dataset. • I also see many others that opt for DBaaS like Hasura and Firebase that expose a managed database over the wire, but their sdk is not great to work with. • I think Prisma has the best DSL to interact with a db, and the strongly typed DX is something that has a lot of potential over-the-wire too. Since the introduction of Data Platform I've been wondering if I could just use it as a service without having to manage a local database, migrations, query engines etc. Let me expand on that: • Imagine a website (Prisma Data Platform v2) that lets you provision a PlanetScale db, create a
schema.prisma
, and manage migrations from the web UI or via a CLI. • You connect to this service via a client (Prisma Lite) via a URL + secure token and you select a branch to point to • Your Prisma Lite client downloads the typed definitions and typechecks your code. • Your queries and mutations are pure JSONs that are sent to the Data Platform (it might need tweaking the api a bit) ◦ Maybe something like
db({"projects": {"create": {"name": "foo" } } })
• Instead of managing migrations from your project, you manage them via the Data Platform. You create a new PlanetScale branch, migrate it and then you point your Prisma Lite client to it. Before deploying your client to production, you merge the DB branch. Every time you point to a different PlanetScale branch the client code pulls the new definitions and typechecks your code. Considerations: • Personally, I would love to use this kind of service. I'd be a much stronger offering than the other DBaaS because of the safe migrations / branching and type safe apis and I'd be more than happy to pay Prisma to abstract over the underlying db and the other features like Preview DB, Proxy etc. • The client side code would be extremely light (it's just JSON over the wire!) • Prisma DSL is so fluent that sending queries and mutations over http would just feel like using a graphql api, without the overhead of gql • What about security? We're basically sending type-safe SQL over the wire... Well, of course this should come from a server that you own (not the browser!) and maybe there's some ip restriction that needs to be put in place, but it wouldn't be that different from using a Postgres connection string in your server. I'm intrigued by this idea, and I'm curious to hear what do you think?
t
Hey so I literally joined this channel to try and find out what the Prisma Data Platform is exactly, and I was thinking maybe they are going back to be a DBaaS. You're aware that they were originally a DBaaS called graph.cool right? They then went to Prisma 1, and now Prisma 2, now to the Prisma Data Platform. Honestly that would be sweet if they came full circle, but there is probably a bottleneck that everyone originally was complaining about that they might be afraid of having again around flexibility and understanding how to make it work in tons of enterprise-like scenarios. This is just my overall impression of why they might be hesitant to go that route again. Curious to know where they are wanting to go with the PDP, and how it differs from the vision of a full fledged DBaaS.
🙌 1