Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate device factory into a creator layer #970

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

badrishc
Copy link
Contributor

@badrishc badrishc commented Jan 28, 2025

Separate device factory into a creator layer so that expensive connection costs can be incurred once, for device types such as cloud storage. Workflow now is:

(1) Instantiate a factory creator
(2) Ask creator for a factory, given a base path
(2) Ask factory for devices instances

Fixes #739.

…ive connection costs can be incurred once, for device types such as cloud storage. Process now is:

(1) Instantiate a factory creator
(2) Ask creator for a factory, given a base path
(2) Ask factory for devices
@badrishc
Copy link
Contributor Author

badrishc commented Jan 28, 2025

Note: It seems that the AzureStreamProvider currently creates its own "factory creator" using the provided connection string (even before GarnetServerOptions are created), so it is possible we instantiate the connection twice in case user were importing/exporting the config file from Azure. Ideally we would pass in a shared azure storage factory creator to the stream provider and use the same for GarnetServerOptions. But this seems to be a rare case, so did not optimize for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initialize azure blob storage client once during startup
1 participant