You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by "zhangliang@apache.org" <zh...@apache.org> on 2020/05/09 04:17:01 UTC
What's new on Apache ShardingSphere 5.x
Hi All,
Apache ShardingSphere 5.x is in dev mode right now.
Let's talk about what's new about it.
1. New API for micro and pluggable kernel. Which means we should remove all
ShardingDataSource, MasterSlaveDataSoure, EncryptDataSource,
ShadowDataSource etc.. The only DataSource is ShardingSphereDataSource
which can handle rule collections together.
2. New YAML format, spring namespace schema and spring boot starter. They
are just adaptor with kernel API changes.
3. Change project name from sharding to shardingsphere, for example: change
sharding-jdbc to shardingsphere-jdbc; change sharding-proxy
to shardingsphere-proxy.
Any thing else?
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo
Re: What's new on Apache ShardingSphere 5.x
Posted by "zhangliang@apache.org" <zh...@apache.org>.
Done for YAML shortcuts by pull request[1]
The current YAML is look like:
```
rules:
- !SHARDING
xxx
xxx
- !MASTER_SLAVE
xxx
xxx
- !ENCRYPT
xxx
xxx
[1] https://github.com/apache/shardingsphere/pull/5617
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo
zhangliang@apache.org <zh...@apache.org> 于2020年5月14日周四 上午2:19写道:
> The new YAML configuration changed from:
>
> ```
> shardingRule:
> xxx
> xxx
>
> masterSlaveRule:
> xxx
> xxx
>
> encryptRule:
> xxx
> xxx
> ```
>
> to:
>
> ```
> rules:
> -
> !!org.apache.shardingsphere.sharding.core.yaml.config.sharding.YamlShardingRuleConfiguration
> xxx
> xxx
>
> -
> !!org.apache.shardingsphere.sharding.core.yaml.config.masterslave.YamlMasterSlaveRuleConfiguration
> xxx
> xxx
>
> -
> !!org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptRuleConfiguration
> xxx
> xxx
> ```
>
> The old configuration is static format which cannot add new rule without
> change the YAML POJO. In the new YAML configuration, use class name instead
> of static tag to config rule type can make the new rule added dynamically.
>
> I plan to add the shortcuts[1] to make configuration more simple soon.
>
> [1]
> https://bitbucket.org/asomov/snakeyaml/wiki/Documentation#markdown-header-constructors-representers-resolvers
>
> ------------------
>
> Liang Zhang (John)
> Apache ShardingSphere & Dubbo
>
>
> Sun Kane <ka...@outlook.com> 于2020年5月9日周六 下午12:23写道:
>
>> Bravo
>> ________________________________
>> 发件人: zhangliang@apache.org <zh...@apache.org>
>> 发送时间: 2020年5月9日 12:17
>> 收件人: dev@shardingsphere.apache.org <de...@shardingsphere.apache.org>
>> 主题: What's new on Apache ShardingSphere 5.x
>>
>> Hi All,
>>
>> Apache ShardingSphere 5.x is in dev mode right now.
>>
>> Let's talk about what's new about it.
>>
>> 1. New API for micro and pluggable kernel. Which means we should remove
>> all
>> ShardingDataSource, MasterSlaveDataSoure, EncryptDataSource,
>> ShadowDataSource etc.. The only DataSource is ShardingSphereDataSource
>> which can handle rule collections together.
>>
>> 2. New YAML format, spring namespace schema and spring boot starter. They
>> are just adaptor with kernel API changes.
>>
>> 3. Change project name from sharding to shardingsphere, for example:
>> change
>> sharding-jdbc to shardingsphere-jdbc; change sharding-proxy
>> to shardingsphere-proxy.
>>
>> Any thing else?
>>
>>
>> ------------------
>>
>> Liang Zhang (John)
>> Apache ShardingSphere & Dubbo
>>
>
Re: What's new on Apache ShardingSphere 5.x
Posted by "zhangliang@apache.org" <zh...@apache.org>.
The new YAML configuration changed from:
```
shardingRule:
xxx
xxx
masterSlaveRule:
xxx
xxx
encryptRule:
xxx
xxx
```
to:
```
rules:
-
!!org.apache.shardingsphere.sharding.core.yaml.config.sharding.YamlShardingRuleConfiguration
xxx
xxx
-
!!org.apache.shardingsphere.sharding.core.yaml.config.masterslave.YamlMasterSlaveRuleConfiguration
xxx
xxx
-
!!org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptRuleConfiguration
xxx
xxx
```
The old configuration is static format which cannot add new rule without
change the YAML POJO. In the new YAML configuration, use class name instead
of static tag to config rule type can make the new rule added dynamically.
I plan to add the shortcuts[1] to make configuration more simple soon.
[1]
https://bitbucket.org/asomov/snakeyaml/wiki/Documentation#markdown-header-constructors-representers-resolvers
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo
Sun Kane <ka...@outlook.com> 于2020年5月9日周六 下午12:23写道:
> Bravo
> ________________________________
> 发件人: zhangliang@apache.org <zh...@apache.org>
> 发送时间: 2020年5月9日 12:17
> 收件人: dev@shardingsphere.apache.org <de...@shardingsphere.apache.org>
> 主题: What's new on Apache ShardingSphere 5.x
>
> Hi All,
>
> Apache ShardingSphere 5.x is in dev mode right now.
>
> Let's talk about what's new about it.
>
> 1. New API for micro and pluggable kernel. Which means we should remove all
> ShardingDataSource, MasterSlaveDataSoure, EncryptDataSource,
> ShadowDataSource etc.. The only DataSource is ShardingSphereDataSource
> which can handle rule collections together.
>
> 2. New YAML format, spring namespace schema and spring boot starter. They
> are just adaptor with kernel API changes.
>
> 3. Change project name from sharding to shardingsphere, for example: change
> sharding-jdbc to shardingsphere-jdbc; change sharding-proxy
> to shardingsphere-proxy.
>
> Any thing else?
>
>
> ------------------
>
> Liang Zhang (John)
> Apache ShardingSphere & Dubbo
>
回复: What's new on Apache ShardingSphere 5.x
Posted by Sun Kane <ka...@outlook.com>.
Bravo
________________________________
发件人: zhangliang@apache.org <zh...@apache.org>
发送时间: 2020年5月9日 12:17
收件人: dev@shardingsphere.apache.org <de...@shardingsphere.apache.org>
主题: What's new on Apache ShardingSphere 5.x
Hi All,
Apache ShardingSphere 5.x is in dev mode right now.
Let's talk about what's new about it.
1. New API for micro and pluggable kernel. Which means we should remove all
ShardingDataSource, MasterSlaveDataSoure, EncryptDataSource,
ShadowDataSource etc.. The only DataSource is ShardingSphereDataSource
which can handle rule collections together.
2. New YAML format, spring namespace schema and spring boot starter. They
are just adaptor with kernel API changes.
3. Change project name from sharding to shardingsphere, for example: change
sharding-jdbc to shardingsphere-jdbc; change sharding-proxy
to shardingsphere-proxy.
Any thing else?
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo