Skip to content

Abstract away the interface between the chunk store and DynamoDB #275

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

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

tomwilkie
Copy link
Contributor

@tomwilkie tomwilkie commented Feb 7, 2017

The idea here is to be able to support new and exciting backends, such as BigTable or Cassandra.

Introduces a new interface, StorageClient, which is consumed by the ChunkStore to talk to the index. DynamoDB implementation of this interface does the backoff, batching and retry.

Also use this as an opportunity to rename a bunch of stuff for consistency, remove a bunch of old code and generally have a good tidy up.

@tomwilkie tomwilkie changed the title [WIP] Abstract away the interface between the chunk store and DynamoDB Abstract away the interface between the chunk store and DynamoDB Feb 7, 2017
- Abstract away the specific batch format for dynamodb
- Rename DynamoDBClient to StorageClient, generify ListTables, CreateTable, DescribeTables and UpdateTables
- Move the provisioning, retries, batching and backoff below the StorageClient interface into the DynamoDB implementation.

Also, do a bunch of clean ups:
- Remove the dynamovar and s3var, use urlvar instead
- Add bunch of comments
- Remove semaphore
- Rename dynamo_table_manager(_test).go to table_manager(_test).go
- Rename dynamodb_test.go to storage_client_mock_test.go, massively simplify
- Delete some irrelevant tests; rename some more things
- Get rid of stutter in chunk.ChunkStore.
@tomwilkie tomwilkie merged commit 592e9dd into master Feb 8, 2017
@tomwilkie tomwilkie deleted the cassandra branch February 8, 2017 19:21
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