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

Write a converter to generate DistSQL from specific struct type #270

Closed
5 tasks done
mlycore opened this issue Mar 20, 2023 · 2 comments
Closed
5 tasks done

Write a converter to generate DistSQL from specific struct type #270

mlycore opened this issue Mar 20, 2023 · 2 comments
Assignees
Labels
operator solutions of operator type: enhancement New feature or request
Milestone

Comments

@mlycore
Copy link
Contributor

mlycore commented Mar 20, 2023

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:

type EncryptRule struct{}
func (t EncryptRule) ToDistSQL() string {}

While invoking ToDistSQL() it will generate a DistSQL regarding a EncryptRule like:

CREATE ENCRYPT RULE t_encrypt (....

References:

@mlycore mlycore added gsoc-2023 GSoC 2023 type: enhancement New feature or request operator solutions of operator labels Mar 20, 2023
@mlycore mlycore changed the title 🚀 request help: Write a converter to generate DistSQL from specific struct type [GSoC 2023] Write a converter to generate DistSQL from specific struct type Mar 21, 2023
@mlycore mlycore changed the title [GSoC 2023] Write a converter to generate DistSQL from specific struct type Write a converter to generate DistSQL from specific struct type May 18, 2023
@mlycore mlycore removed the gsoc-2023 GSoC 2023 label May 18, 2023
@wbtlb
Copy link
Contributor

wbtlb commented Jul 12, 2023

please assign to me

@mlycore mlycore added this to the 0.3.0 milestone Jul 12, 2023
@mlycore
Copy link
Contributor Author

mlycore commented Jul 12, 2023

Thanks @wbtlb

@mlycore mlycore closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operator solutions of operator type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants