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

Cosmos -> CosmosStore and related renames #216

Merged
merged 4 commits into from
Apr 15, 2020
Merged

Cosmos -> CosmosStore and related renames #216

merged 4 commits into from
Apr 15, 2020

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Apr 9, 2020

Re #197, renaming to align with principles in the Azure Core SDK conventions: https://azure.github.io/azure-sdk/dotnet_introduction.html

  • introduce prefixing to reduce clashes with equivalents from other namespaces (i.e. Equinox.EventStore.Resolver vs Equinox.Cosmos.Resolver). (Grpc variant of EventStore wrapper will follow this convention too)
  • rename namespace Equinox.Cosmos.* to Equinox.CosmosStore (this allows V3 to sit alongside V2 and/or would enable us to provide a fully side-by-sideable V3 variant of Equinox.Cosmos if ever required)
  • rename Equinox.Cosmos.Store.* to Equinox.CosmosStore.Core.* e.g. Equinox.CosmosStore.Core.ContainerClient. (should not affect any normal consumer scenarios)

Key name changes:

  • Equinox.Cosmos -> Equinox.CosmosStore
  • CosmosStoreClient -> CosmosStoreConnection (which was it's original name, and is back to being consistent with the EventStore based store adapters)
  • Context -> CosmosStoreContext
  • Resolver -> CosmosStoreCategory

For now, this scheme suggests there should not be a need to provide obsoletion placeholder types to ease migration. (not certain it makes sense at this point)

@bartelink
Copy link
Collaborator Author

Also think CosmosStoreClientFactory yielding a CosmosClient which you then supply to a CosmosStoreClient is way too confusing so something needs to happen. Also CosmosStoreContext and CosmosStoreCategory after that is not making it easier

🤔 maybe the answer is to merge some stuff into a CosmosStoreOptions and perhaps consolidate one or more of the above.

@ylibrach After lots of thought and experimentation, it turns out that the original name (*Connection) fits best as

  • it's distinct from the CosmosClient (avoids having to be overly specific in naming in wireup code - client can unambiguously mean CosmosClient)
  • It makes the presence of the type CosmosStoreClientFactory in the normal wireup code less confusing (I still can't say I love the name, but it's technically correct and there are definitely worse names)

@bartelink bartelink marked this pull request as ready for review April 10, 2020 07:51
@bartelink bartelink merged commit 84c3b73 into cosmossdk4 Apr 15, 2020
@bartelink bartelink deleted the renames branch April 15, 2020 12:33
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.

1 participant