Comments (3)
Sure.
from scratchdata.
Hey there @poundifdef! I came across Scratch DB and was interested in contributing, can I take up this issue?
from scratchdata.
I think there need to be 2 data structures: one users and servers.
The users data structure looks like this:
{
"users": [
{"api_key": "A","cluster": "A"},
{"api_key": "B","cluster": "B"}
]
}
The servers structure would look like this:
{
"servers": {
"1.1.1.1": [
{"cluster": "A", "shard": "A1"},
{"cluster": "B", "shard": "B1"}
],
"2.2.2.2": [
{"cluster": "A", "shard": "A2"},
{"cluster": "B", "shard": "B1"}
]
}
}
Now we have a correlation between a user and their cluster with the users.cluster
.
The servers structure should be able to directly translate to a clickhouse cluster XML config. For example, the above would translate to:
<clickhouse>
<remote_servers>
<A>
<shard>
<!-- shard A1 -->
<replica>
<host>1.1.1.1</host>
</replica>
</shard>
<shard>
<!-- shard A2 -->
<replica>
<host>2.2.2.2</host>
</replica>
</shard>
</A>
<B>
<shard>
<!-- shard B1, 2 replicas -->
<replica>
<host>1.1.1.1</host>
</replica>
<replica>
<host>2.2.2.2</host>
</replica>
</shard>
</B>
</remote_servers>
</clickhouse>
I would also be open to the inverse - having the config store data which mirrors the Clickhouse required config, and using that to translate to figure out which clusters are hosted on which servers.
At the end of this project, we should be able to do the following:
- Ensure that we are performing database options on the correct cluster depending on which API key was used
- Write algorithms to choose which individual shard or replica to write data to
from scratchdata.
Related Issues (20)
- BigQuery Destination HOT 1
- Redshift Destination HOT 2
- Running ./scratchdata HOT 2
- Create cross-platform releases with CGO enabled HOT 6
- BigQuery Destination HOT 5
- Sharable URLs for Querying Data HOT 6
- Redshift Destination HOT 8
- Databricks destination HOT 1
- Use a AWS Secret Manager for DB credentials HOT 9
- Coerce BigQuery types when inserting HOT 5
- Check for available disk space
- Pause and resume data ingest
- Global lock
- move frontend into repo HOT 1
- implement postgres queue HOT 1
- duckdb integration
- tables need to be namespaced HOT 2
- credential share link
- break out router.go
- support more destinations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scratchdata.