plexinc / papr

MongoDB TypeScript-aware Models
https://plexinc.github.io/papr/
MIT License
452 stars 23 forks source link

realm sdk mongodb client support #518

Open bshrram opened 1 year ago

bshrram commented 1 year ago

I have application running in aws lambda serverless, the cold start takes a long time to setup connection pool, so using http requests to query data may be more suitable for serverless environments, and that can be done using realm sdk mongodb client.

can papr fully support this client in addition to the original mongodb connection?

CarlosLozanoHealthCaters commented 1 year ago

Have you followed the best practices to manage connection with AWS Lambda (https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda/)?

The first point is probably the most important one!

bshrram commented 1 year ago

Yes sure, The problem is happening with cold start, these practices are good for warm requests. and I want to add another point, managing number or connections of mongodb with serverless environment is hard and can reach the limit of connections easily, so moving that to data api is safer.

Have you followed the best practices to manage connection with AWS Lambda (https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda/)?

The first point is probably the most important one!