mongoDB와 prisma2의 상태는 무엇입니까?

7306 단어 prismamongodb
참고: 이 게시물은 더 이상 최신 상태가 아닙니다. MongoDB 커넥터가 .

Prisma은 관계형 데이터베이스에 놀라운 데이터베이스 툴킷이며 Postgres, MySQL, MariaDB, SQLite 및 Aurora 간에 쉽게 이식할 수 있습니다. 그러나 현재 Prisma는 현재 MongoDB 또는 DynamoDB와 같은 비관계형 데이터베이스를 지원하지 않습니다.

다른 많은 개발자들이 이 격차를 해소하는 데 관심이 있다는 것을 알고 있으며 이 문제에 대해 이미 어떤 작업이 수행되었으며 내가 어떻게 기여할 수 있는지 궁금했습니다. 1월 6일에 열렸고 58개의 댓글이 달린 긴 문제MongoDB support for Prisma 2를 찾았습니다.

나는 모든 의견을 읽고 다른 사람들을 위해 상황을 요약하기 위해 최선을 다했습니다.

1월 - 3월



2020년 초 Nikolas Burk는 Prisma가 MongoDB와 같은 다른 유형의 데이터베이스를 작업하기 전에 주로 stabilizing their relational drivers에 집중할 것이라고 말했습니다. 다음 달에 그는 MongoDB가 MongoDB 커넥터의 기반을 제공할 Rust driver 작업을 하고 있다고 언급했습니다.

4월 - 5월



MongoDB의 Saghm Rossi는 드라이버 내부를 비동기식으로 다시 작성하는 프로세스가 완료되었으며 베타가 곧 출시될 것이라는 업데이트를 April 23에 제공했습니다. 베타는 May 5 에 출시되었습니다.

Prisma의 Søren Bramer Schmidt는 next day Prisma Query Engine에서 사용되는 Rust 드라이버를 사용하여 이제 MongoDB 커넥터에 대해 작업 중이라고 응답했습니다.

6월



Saghm은 June 8의 MongoDB 블로그에서 Rust 드라이버 버전 1.0.0 릴리스를 발표했습니다. Nikolas Burk는 사용자next day에게 MongoDB로 무엇을 만들고 있고 보고 싶은 몇 가지 기능에 대한 자세한 정보를 요청했습니다.

다음은 몇 가지 관련 의견입니다.

ppxb

In my application I used Nest.js and MongoDB with @nestjs/graphql. It's a little bit difficult to organize the codes.



Nicklas Reincke

Am doing something similar to . I am using Nest.js as an API gateway (with Apollo Federation) to other microservices also written with Nest.js (with GraphQL endpoints).

The gateway and the services are deployed to Google Cloud Run while the services can communicate over Cloud Pub/Sub topics.

The microservices each should use Prisma 2 and have their own database, preferably MongoDB. But to work with Mongoose is a bit of a headache when it comes to structure the code correctly.



Adam Duro

Having Prisma support Mongo aggregation pipeline in at least some fashion (either as a raw query type function, or with some kind of generic to be able to describe the expected output) as well as have support for geo queries, would be a huge win.

There are many other "ORMs" that claim to have cross SQL/Mongo support often leave these features out, which drives people back to Mongoose, which is a pain to use in this new TypeScript heavy world we now live in.



Bradley Bain

Having access to the aggregations pipeline through Prisma would be great (no need to get super fancy with it, even just a straightforward and barebones way to perform an aggregation with raw mongodb aggregation syntax would be miles ahead of existing solutions).

Also another feature that would be great to have is multi-tenancy/clustering support.

Mongoose didn't originally build with multi-tenancy in mind, so even though they technically support it now, it's not very pretty (having to explicitly switch the connection and then reload in the models after switching, since all mongoose schemas are scoped to a single connection). Something like:



// prisma schema file

datasource mongdob {
  url      = env("DEFAULT_DB_URL") // or CLUSTER_URL?
  provider = "mongodb"
}



// main.js

const client1 = new PrismaClient()
const client2 = new PrismaClient('DIFFERENT_DB_URL')

const [ db1, db2 ] = await Promise.all([ client1.connect(), client2.connect() ])


칠팔월



7월과 8월의 이 문제에 대한 전체 의견은 Alejandro Morales가 August 8에 요약했습니다.

I AM SAD I NEED PRISMA MONGO



많은 사람들이 좌절한 것처럼 보였으나 Prisma를 변호하고 댓글 작성자에게 그들의 놀라운 무료 도구가 얼마나 형편없는지에 대해 불평하는 대신 스스로 기여할 수 있을지 생각해 보라고 격려한 사람들도 많이 있었습니다.

다른 사람들은 Rust를 배우는 것이 이 문제에 대한 진입 장벽이 높다고 지적했습니다. 문제는 더 이상 실행 가능한 정보 없이 시작됩니다.

루소토



Harry Manchanda는 DynamoDB 커넥터 문제에 대한 가능한 솔루션으로 Rusoto를 제안했습니다#1676.

I read this comment at mongoDB issue #1277 and seems like you would be looking for a Rust Driver for connecting to dynamoDB (similar to mongoDB)

⏬ So would like to point to these links below ⏬

https://rusoto.org/index.html
https://crates.io/crates/rusoto_dynamodb



Rusoto에 대해 더 조사해야 할 것이지만, 언뜻 보기에는 AWS SDK이기 때문에 DocumentDB와 같은 MongoDB와 동등한 것을 지원하는 것처럼 보이지만 적절한 MongoDB를 지원하지 않습니다.

질문


  • Prisma는 커넥터를 구현하기 위해 MongoDB에서 다른 것이 필요합니까? 아니면 MongoDB Rust 드라이버를 사용하는 것이 좋습니까?
  • Prisma에 현재 MongoDB 커넥터에서 작업 중이거나 진행 상황을 추적할 책임이 있는 사람이 있습니까?
  • 그렇지 않다면 기여자가 Prisma를 돕기 위해 무엇을 할 수 있습니까?

  • 결론



    58개의 댓글을 모두 살펴보고 내가 확신할 수 있었던 것은 Saghm이 상사라는 것뿐입니다. 처음에 Rust 드라이버를 제공하는 것 외에도 그는 훌륭한 문서on GitHubMongoDB's website도 만들었습니다. 그는 또한 자신의 진행 상황을 명확하게 전달하기 위해 작성했습니다blog posts.

    좋은 웹페이지 즐겨찾기