Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
Description
Apache ShardingSphere
Apache ShardingSphere is positioned as a Database Plus, and aims at building a standard layer and ecosystem above heterogeneous databases. It focuses on how to reuse existing databases and their respective upper layer, rather than creating a new database. The goal is to minimize or eliminate the challenges caused by underlying databases fragmentation.
Page: https://shardingsphere.apache.org/
Github: https://github.com/apache/shardingsphere
Background
Currently we try to promote StorageNode as major CRD to represent a set of storage units for ShardingSphere.
Task
The elementary task is that the storage node controller could manage the lifecycle of a set of storage units, like PostgreSQL, in kubernetes.
We don't hope to create another wheel like pg-operator. So consider using a predefined parameter group to generate the target CRD.
- [ ] Generate DistSQL according to the Golang struct `EncryptionRule`
- [ ] Generate DistSQL according to the Golang struct `ShardingRule`
- [ ] Generate DistSQL according to the Golang struct `ReadWriteSplittingRule`
- [ ] Generate DistSQL according to the Golang struct `MaskRule`
- [ ] Generate DistSQL according to the Golang struct `ShadowRule`
Relevant Skills
1. Master Go language, Ginkgo test framework
2. Have a basic understanding of Apache ShardingSphere Concepts and DistSQL
Targets files
DistSQL Converter - https://github.com/apache/shardingsphere-on-cloud/blob/main/shardingsphere-operator/pkg/distsql/converter.go, etc.
Example
A struct defined as below:
```golang
type EncryptRule struct{}
func (t EncryptRule) ToDistSQL() string {}
```
While invoking ToDistSQL() it will generate a DistSQL regarding a EncryptRule like:
```SQL
CREATE ENCRYPT RULE t_encrypt (....
```
References:
Mentor
Liyao Miao, Committer of Apache ShardingSphere, miaoliyao@apache.org
Chuxin Chen, Committer of Apache ShardingSphere, tuichenchuxin@apache.org