aaronpowell / FSharp.CosmosDb

An F# wrapper around Cosmos DB's .NET SDK to make it more friendly for F# developers
MIT License
79 stars 12 forks source link

Use a singleton Azure Cosmos DB client for the lifetime of your application #42

Closed travis-leith closed 2 years ago

travis-leith commented 3 years ago

The official performance guidance (at least for v3 SDK) is to keep a single client for the lifetime of the app.

I think this library should either implement the singleton pattern, or provide an argument to execAsync that takes in the client.

Unless, of course, this advice is no longer relevant for v4. I could not find a similar page for v4.

travis-leith commented 3 years ago

I'd like to submit a PR to address this but because of an Ionide issue you are already aware of, I cannot get it to build with the Analyzer. Perhaps this should wait until Ionide upgrade their dependencies?

aaronpowell commented 3 years ago

I assume it's the same guidance for v4, I've reached out to the team for clarity

aaronpowell commented 3 years ago

This will be coming in v1, check out #54 for more about v1