pinecone-io / go-pinecone

Pinecone.io Golang Client
Apache License 2.0
49 stars 9 forks source link

[Feature Request] Allow IndexConnection to be used with multiple namespaces #81

Open anuraaga opened 1 month ago

anuraaga commented 1 month ago

What motivated you to submit this feature request?

IndexConnection is tied to a single namespace, which is passed in request messages. This means we need an IndexConnection per namespace even though there is no reason the same gRPC connection couldn't be used for all of them. For a service that has downstream requests that are segmented by namespace (e.g., a namespace per tenant in a multi-tenant system), either a connection pool needs to be maintained or connection is opened/closed per request. Both have some complexity or overhead that shouldn't be required for a gRPC request parameter.

Describe the solution you'd like A clear and concise description of what you want to happen.

Methods that can operate on a single namespace passed by the user. Some approaches could be

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

If the gRPC generated code was public we could try using it directly, and otherwise we may need to use the protos and generate ourselves.

Additional context Add any other context or screenshots about the feature request here.

austin-denoble commented 1 week ago

Hi @anuraaga, thanks a lot for the great suggestions. You're right, the ergonomics of working with namespaces within an IndexConnection could be improved.

We've added a ticket to take a look at this in an upcoming sprint, thanks again. 👍