prisma / prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
https://www.prisma.io
Apache License 2.0
38.87k stars 1.52k forks source link

Provide Option to Self-Host Data Proxy / Accelerate #19551

Open ebg1223 opened 1 year ago

ebg1223 commented 1 year ago

Problem

There are obvious issues with using prisma in a serverless environment that are significantly improved by the data proxy. Unfortunately, for those in enterprise or high security / compliance environments, giving external access to a database is not a simple matter, and until Prisma is able to offer enterprise-grade security options, completely impossible.

Suggested solution

A docker container to self-host a simple version of the data proxy, allowing enterprise customers, or anyone concerned about serverless issues, to use prisma without compromise and deliver a great serverless experience.

This would enable continued use / greater adoption of prisma in these environments. As serverless databases expand into enterprise, and if Prisma were to expand their service offerings to meet enterprise use cases, it would also allow for a simple starting point with a clear migration path to lots of great features (i.e. pulse, accelerate) and potential prisma customers.

Alternatives

There have been some open source solutions for exactly this problem, which clearly shows the benefit and potential value of such a feature. Ex: https://github.com/aiji42/prisma-data-proxy-alt However, as they are not using supported APIs, they are not up to date with all the features / capabilities of the ORM, and not exactly stable in production.

Additional context

To successfully address this issue, I believe it is only required to replicate the Data-Proxy in a self-hosted environment. Features like Pulse, Accelerate, etc.. are awesome, but are added value above and beyond a typical ORM. Unlike a value-add serivce, the inability to use Data Proxy in a serverless environment creates a compromise over other ORMs, making it more difficult to deliver an optimal service, and reducing the adoption of prisma in new projects when other alternatives are available.

ebg1223 commented 1 year ago

My specific use case: I work in healthcare, specifically in enterprise environments, where we have to work in the client's AWS/GCP instance, primarily due to HIPAA compliance. We build unique solutions, and are often taking advantage of serverless tech. We love the experience of using prisma, but are unable to address any of the compromises with the available services due to compliance issues.

dbrxnds commented 2 months ago

This is really interesting, I hope they come up with something as we are in a similar boat.