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 2022/10/10 06:44:08 UTC

[GitHub] [shardingsphere] terrymanu opened a new issue, #12366: Example improvement plan

terrymanu opened a new issue, #12366:
URL: https://github.com/apache/shardingsphere/issues/12366

   The current example is not good enough. It is difficult to understand, which users can not find their desired example codes quickly, the disadvantages are:
   
   1. The categories of examples are not in same abstract level, they are not show the overview of ShardingSphere features and structure clearly;
   2. The `example-core` module is too complicated which contains too many common and abstract codes, user do not need to understander them. It is better to use "flat" codes and make them independent each other;
   3. Proxy and JDBC need to provide configurations for multiple dimensions, such as different modes, different kernel providers and different feature configs;
   4. JDBC example can be split to different adaptors, such as `jdbc`, `spring boot starter & jdbc`, `spring boot starter & jpa`, `spring boot starter & mybatis`, `spring namespace & jdbc`, `spring namespace & jpa` and , `spring namespace & mybatis`;
   5. Proxy do not need java connect example, config only is enough.
   
   It is more clear if adjust example structure as:
   
   ```
   shardingsphere-example
     ├- shardingsphere-jdbc-example
        ├- shardingsphere-jdbc-${mode}-example
           ├- shardingsphere-jdbc-${mode}-${transaction}-${feature}-example
              ├- shardingsphere-jdbc-${mode}-${transaction}-${feature}-${framework}-example
     ├- shardingsphere-proxy-example
        ├- shardingsphere-proxy-${mode}-example
           ├- shardingsphere-proxy-${mode}-${transaction}-${feature}-example
     ├- shardingsphere-parser-example
   ```
   
   `${xxx}` are variables which can be replaced by:
   
   - `${mode}`: memory, standalone-file, cluster-zookeeper, cluster-etcd
   - `${transaction}`: local, xa-atomikos, xa-bitronix, xa-narayana, base-seata
   - `${feature}`: sharding, readwrite-splitting, db-discovery, encrypt, shadow and all permutation of them
   - `${framework}`: jdbc, springboot-starter-jdbc, springboot-starter-jpa, springboot-starter-mybatis, springnamespace-jdbc, springnamespace-jpa, spring-namespace-mybatis
   
   The duplicated codes may consider about using code-generation engine.
   
   ![example-code-gen-engine drawio](https://user-images.githubusercontent.com/5516298/132954397-406a0dbe-f28f-4e5b-89b2-1d79595422b4.png)


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] commented on issue #12366: Example improvement plan

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12366:
URL: https://github.com/apache/shardingsphere/issues/12366#issuecomment-1272350764

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] strongduanmu closed issue #12366: Example improvement plan

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #12366: Example improvement plan
URL: https://github.com/apache/shardingsphere/issues/12366


-- 
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] TeslaCN commented on issue #12366: Example improvement plan

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #12366:
URL: https://github.com/apache/shardingsphere/issues/12366#issuecomment-1365565205

   Hi @totalo 
   Have we finished this issue?


-- 
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] totalo commented on issue #12366: Example improvement plan

Posted by GitBox <gi...@apache.org>.
totalo commented on issue #12366:
URL: https://github.com/apache/shardingsphere/issues/12366#issuecomment-1367125980

   > Hi @totalo Have we finished this issue?
   
   Soon. I'm putting some finishing touches on 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] closed issue #12366: Example improvement plan

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #12366: Example improvement plan
URL: https://github.com/apache/shardingsphere/issues/12366


-- 
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