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

Master Worklog: Provide storage abstraction of ChainStorage #44

Closed
leozc opened this issue Oct 13, 2023 · 10 comments
Closed

Master Worklog: Provide storage abstraction of ChainStorage #44

leozc opened this issue Oct 13, 2023 · 10 comments
Assignees
Labels
help wanted Extra attention is needed xl-project

Comments

@leozc
Copy link
Contributor

leozc commented Oct 13, 2023

This is a large issue that may need to be broken down further:

Currently, ChainStorage is bound to AWS dependency

  1. S3 as Blob storage
  2. DynamoDB as Key-Value storage
  3. SQS as dead letter queue

Why?
In order to help ChainStorage be more portable, we need to break down these hard-wired dependencies. A possible solution is to provide abstract interfaces for these storage solutions and implement the adaptor to different cloud providers accordingly.

We also explored a driver-level compatibility layer (e.g., CHainStorage continue to use S3 library interfaces, and we adopt the S3 driver to different cloud provider solution) - but it is a no-go due to complexity.

Tickets so far:

PS We should have a local implementation - Blob Storage -> File, SQL (lite?) -> KV, and a simple table for DLQ, for testing and possibly local production use cases.

@bestmike007
Copy link
Contributor

I created this draft PR: #43

If it's on the correct direction, I'll continue working on it.

@jiezhang
Copy link
Contributor

For local implementation we are using AWS's localstack.

@leozc
Copy link
Contributor Author

leozc commented Oct 14, 2023

@jiezhang, localstack works for now - but here are my concerns

  1. Localstack is an abstraction of AWS cloud, if we have lower level abstraction is usually better and simpler
  2. There would be use cases for production local storage (No-Cloud usage), would simpler abstraction better?

@leozc leozc self-assigned this Oct 14, 2023
@leozc leozc added the help wanted Extra attention is needed label Oct 14, 2023
@jiezhang
Copy link
Contributor

jiezhang commented Oct 18, 2023

@leozc For local run using GCP storage backends, looks like we may use their emulators? https://cloud.google.com/sdk/gcloud/reference/emulators
https://cloud.google.com/sdk/gcloud/reference/beta/emulators

@bestmike007
Copy link
Contributor

The emulators do not include BigTable, unless we want to use firestore.

And I think the local implementation @leozc mentioned was not only for local development, but also a solution to baremetal deployment or using private cloud without similar products.

@jiezhang
Copy link
Contributor

It's available in the beta emulators: https://cloud.google.com/sdk/gcloud/reference/beta/emulators

@jiezhang
Copy link
Contributor

Don't get me wrong. I'm NOT against this idea of building a storage abstraction. But we should do it step by step. Initially we should focus on building the GCP abstraction and leveraging its emulators for local runs and integration tests.

@bestmike007
Copy link
Contributor

It's available in the beta emulators: https://cloud.google.com/sdk/gcloud/reference/beta/emulators

This is great, I was finding an alternative to BigTable for integration tests, turns out they are already supporting it.

jiezhang pushed a commit that referenced this issue Oct 27, 2023
Move SQS implementation to sub package and create dlq instance according to config type. Part of #44
jiezhang pushed a commit that referenced this issue Oct 30, 2023
@leozc leozc changed the title Provide storage abstraction of ChainStorage Master Worklog: Provide storage abstraction of ChainStorage Nov 2, 2023
@leozc
Copy link
Contributor Author

leozc commented Feb 18, 2024

@bestmike007 we can consider this as done?

@bestmike007
Copy link
Contributor

Yes, I think so.

@leozc leozc closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed xl-project
Development

No branches or pull requests

3 participants