You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/05 08:35:30 UTC
[GitHub] [shardingsphere] soulasuna opened a new issue #11661: Refactoring plan of the shardingsphere-shadow project
soulasuna opened a new issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661
Hi,community:
I am very happy to bring you the refactoring plan of theshardingsphere-shadow project. @terrymanu @tristaZero @wu-sheng
Combining the characteristics of the shardingsphere-shadow project's own functions and the configuration style of other functions of the shardingsphere.Make changes to the user API configuration.
In the future, shardingsphere-shadow will become an important part of data routing in full-link stress test scenarios.
The process of project reconstruction will not have any impact on the original functions.
#### After the refactoring is completed, the user API configuration changes are as follows:
- Spring-namespace xml file configuration
```xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:shadow="http://shardingsphere.apache.org/schema/shardingsphere/shadow"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/shadow
http://shardingsphere.apache.org/schema/shardingsphere/shadow/shadow.xsd
">
<shadow:shadow-algorithm id="user-id-match-algorithm" type="COLUMN-REGULAR-MATCH">
<props>
<prop key="operation">UPDATE</prop>
<prop key="column">user_id</prop>
<prop key="regex">[a]</prop>
</props>
</shadow:shadow-algorithm>
<shadow:shadow-algorithm id="note-algorithm" type="SIMPLE-NOTE">
<props>
<prop key="shadow">true</prop>
</props>
</shadow:shadow-algorithm>
<shadow:rule id="shadowRule">
<shadow:data-source id="shadow-data-source" source-data-source-name="ds" shadow-data-source-name="ds-shadow"/>
<shadow:shadow-table name="t_order">
<shadow:shadow-algorithm ref= "user-id-match-algorithm" />
<shadow:shadow-algorithm ref= "note-algorithm" />
</shadow:shadow-table>
<shadow:shadow-table name="t_user">
<shadow:shadow-algorithm ref= "user-id-match-algorithm" />
</shadow:shadow-table>
</shadow:rule>
</beans>
```
- Spring-boot properties file configuration
```properties
spring.shardingsphere.rules.shadow.data-sources.shadow-data-source.source-data-source-name=ds
spring.shardingsphere.rules.shadow.data-sources.shadow-data-source.shadow-data-source-name=ds-shadow
spring.shardingsphere.rules.shadow.shadow-tables.t_order.shadow-algorithm-names[0]=user-id-match-algorithm
spring.shardingsphere.rules.shadow.shadow-tables.t_order.shadow-algorithm-names[1]=note-algorithm
spring.shardingsphere.rules.shadow.shadow-tables.t_user.shadow-algorithm-names[0]=note-algorithm
spring.shardingsphere.rules.shadow.shadow-algorithms.user-id-match-algorithm.type=COLUMN-REGULAR-MATCH
spring.shardingsphere.rules.shadow.shadow-algorithms.user-id-match-algorithm.props.operation=UPDATE
spring.shardingsphere.rules.shadow.shadow-algorithms.user-id-match-algorithm.props.column=user_id
spring.shardingsphere.rules.shadow.shadow-algorithms.user-id-match-algorithm.props.regex=[a]
spring.shardingsphere.rules.shadow.shadow-algorithms.note-algorithm.type=SIMPLE-NOTE
spring.shardingsphere.rules.shadow.shadow-algorithms.note-algorithm.props.shadow=true
```
- Spring-boot yml file configuration
```yml
rules:
shadow:
data-sources:
shadow-data-source:
source-data-source-name: ds
shadow-data-source-name: ds-shadow
shadow-tables:
t_order:
shadow-algorithm-names:
- user-id-match-algorithm
- note-algorithm
t_user:
shadow-algorithm-names:
- note-algorithm
shadow-algorithms:
user-id-match-algorithm:
type: COLUMN-REGULAR-MATCH
props:
operation: UPDATE
column: user_id
regex: [a]
note-algorithm:
type: SIMPLE-NOTE
props:
shadow: true
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893275165
@wu-sheng Hi, a huge progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero edited a comment on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893275165
@wu-sheng Hi, huge progress here.
@soulasuna Nice job.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wu-sheng commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893335934
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] soulasuna edited a comment on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
soulasuna edited a comment on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893345475
@wu-sheng The API shown now only uses the configuration method of ShardingSphere.
The routing algorithm will support SQL annotations.
> @soulasuna Is note-algorithmmeaning the API level rule? Which SkyWalking agent could inject?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wu-sheng commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893335934
Hi, thanks for updating.
The term of this feature in native speaking should be `Synthetic monitoring`. SkyWalking is tracking through https://github.com/apache/skywalking/issues/6932.
FYI @mrproliu as you asked about this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] soulasuna edited a comment on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
soulasuna edited a comment on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893345475
@wu-sheng The API shown now only uses the configuration method of ShardingSphere.
The routing algorithm will support SQL annotations.
> @soulasuna Is note-algorithmmeaning the API level rule? Which SkyWalking agent could inject?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] soulasuna commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
soulasuna commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893345475
@wu-sheng The API shown now only uses the configuration method of ShardingSphere.
The routing algorithm will support SQL annotations.
> @soulasuna是`note-algorithm`指 API 级别规则吗?可以注入哪种 SkyWalking 代理?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wu-sheng commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893336973
@soulasuna Is `note-algorithm`meaning the API level rule? Which SkyWalking agent could inject?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wu-sheng commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893338629
@tristaZero We should have a resolution where we should land the final status of this huge across-TLPs integration.
Such as which repo we should land? Because after the core level changes, we need to have a deep integration, and a separate documentation site.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wu-sheng commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893428565
> The routing algorithm will support SQL annotations.
Are you going to use the SkyWalking v3 standard header in the SQL comments?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893275165
@wu-sheng Hi, a huge progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero edited a comment on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893275165
@wu-sheng Hi, huge progress here.
@soulasuna Nice job.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] soulasuna commented on issue #11661: Refactoring plan of the shardingsphere-shadow project
Posted by GitBox <gi...@apache.org>.
soulasuna commented on issue #11661:
URL: https://github.com/apache/shardingsphere/issues/11661#issuecomment-893345475
@wu-sheng The API shown now only uses the configuration method of ShardingSphere.
The routing algorithm will support SQL annotations.
> @soulasuna是`note-algorithm`指 API 级别规则吗?可以注入哪种 SkyWalking 代理?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org