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 2020/04/15 08:01:12 UTC

[GitHub] [incubator-shardingsphere] tristaZero opened a new issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

tristaZero opened a new issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196
 
 
   Hi 
   **Content:** This issue is to provide SPI spring namespace configuration for Sharding algorithms. 
   **Difficulty rating:** ★★☆☆☆
   
   
   Background
   All the sharding algorithms are loading by SPI, which you can refer to[1] to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   What is wanted
   Use the following configuration format
   > <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   
   instead of
   > <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   
   How
   1.Refer to [2] to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2.Provide `spi:sharding-algorithm` for users to configure.
   3.Modify all the bean configurations of `shardingAlgorithm`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613889157
 
 
   Actually, this issue is not much hard, since  #5190 gave a good example. 😃 
   Besides, you can learn those branch new configuration APIs more, which I believe will simplify the tedious configuring work from our users. :-)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613889653
 
 
   > @strongduanmu Sure, guy. :)
   > Since @TaoZhiMLND finished #5190 , it is easy for him. If you want to have a try, I will assign to you.
   
   I want to try, please assign to me, thank you! 😀
   Before starting work, I will first learn the contents of pr # 5190.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613883574
 
 
   
   ### Background
   All the sharding algorithms are loading by SPI currently, which you can refer to #5017 to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   ### What is wanted
   Use the following configuration format
   > <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   
   instead of
   > <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   
   ### How
   1.Refer to #5190 to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2.Provide `spi:sharding-algorithm` for users to configure.
   3.Modify all the bean configurations of `shardingAlgorithm`.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613889157
 
 
   Actually, this issue is not much hard, since  #5190 gave a good example. 😃 
   Besides, you can learn those branch new configuration APIs more, which I believe will simplify the tedious configuring work from our users. :-)
   
   @strongduanmu

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613883574
 
 
   ### Background
   All the sharding algorithms are loading by SPI currently, which you can refer to #5017 to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   ### What is wanted
   Use the following configuration format
   ```xml
    <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   ```
   
   instead of
   ```xml
    <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   ```
   ### How
   1. Refer to #5190 to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2. Provide `spi:sharding-algorithm` for users to configure.
   3. Modify all the bean configurations of `shardingAlgorithm`.
   
   ### Tips
   1. `KeyGenerateAlgorithmBeanDefinitionParser` is an example.
   2. `ShardingStrategyBeanDefinitionParser` is our target.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613886636
 
 
   @strongduanmu Sure, guy. :)
   Since @TaoZhiMLND  finished #5190 , it is easy for him. If you want to have a try, I will assign to you.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] TaoZhiMLND commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613925154
 
 
   > Sorry @TaoZhiMLND , but thanks for your contribution of #5190 . :-)
   > Hope see your more interaction with this community.
   
   It doesn't matter,  I will continue to focus on the community.   I believe @strongduanmu  will do a great job, and any question is welcome.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613890906
 
 
   @strongduanmu Enjoy and learn more from it.😉 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] strongduanmu edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
strongduanmu edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613889653
 
 
   > @strongduanmu Sure, guy. :)
   > Since @TaoZhiMLND finished #5190 , it is easy for him. If you want to have a try, I will assign to you.
   
   I want to try, please assign to me, thank you! 😀
   Before starting work, I will first learn the contents of pr #5190 .

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613913188
 
 
   Sorry @TaoZhiMLND , but thanks for your contribution of #5190 . :-)
    Hope see your more interaction with this community.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613885875
 
 
   I want to solve this issue. Can you assign it to me?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613970391
 
 
   > > Sorry @TaoZhiMLND , but thanks for your contribution of #5190 . :-)
   > > Hope see your more interaction with this community.
   > 
   > It doesn't matter, I will continue to focus on the community. I believe @strongduanmu will do a great job, and any question is welcome.
   
   @TaoZhiMLND Thank you very much, I will try my best to do it well. 🙏😊
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613883574
 
 
   ### Background
   All the sharding algorithms are loading by SPI currently, which you can refer to #5017 to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   ### What is wanted
   Use the following configuration format
   > <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   
   instead of
   > <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   
   ### How
   1.Refer to #5190 to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2.Provide `spi:sharding-algorithm` for users to configure.
   3.Modify all the bean configurations of `shardingAlgorithm`.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613883574
 
 
   ### Background
   All the sharding algorithms are loading by SPI currently, which you can refer to #5017 to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   ### What is wanted
   Use the following configuration format
   ```xml
    <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   ```
   
   instead of
   ```xml
    <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   ```
   ### How
   1.Refer to #5190 to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2.Provide `spi:sharding-algorithm` for users to configure.
   3.Modify all the bean configurations of `shardingAlgorithm`.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613883574
 
 
   ### Background
   All the sharding algorithms are loading by SPI currently, which you can refer to #5017 to learn more. Now, we need to provide SPI spring namespace configuration for all the sharding algorithms.
   
   ### What is wanted
   Use the following configuration format
   ```xml
    <spi:sharding-algorithm id="standardModuloDatabaseShardingAlgorithm" type="STANDARD_TEST_DB" />
   ```
   
   instead of
   ```xml
    <bean id="standardModuloDatabaseShardingAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.algorithm.StandardModuloDatabaseShardingAlgorithm" />
   ```
   ### How
   1. Refer to #5190 to learn how to use `beanFactory` to call `TypedSPIRegistry`
   2. Provide `spi:sharding-algorithm` for users to configure.
   3. Modify all the bean configurations of `shardingAlgorithm`.
   
   ### Tips
   1. `KeyGenerateAlgorithmBeanDefinitionParser` is an example.
   2. `ShardingStrategyBeanDefinitionParser` is our target.
   3. [Configuration Comparison](https://github.com/apache/incubator-shardingsphere/pull/5177/files) shows how to use new configuration in YAML fille.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5196: Provide SPI spring namespace configuration for all the Sharding algorithms
URL: https://github.com/apache/incubator-shardingsphere/issues/5196#issuecomment-613885041
 
 
   @TaoZhiMLND Hi would like to tackle this one?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services