| <!DOCTYPE html> |
| <html lang="en" class="js csstransforms3d"> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
| <meta name="generator" content="Hugo 0.20.7" /> |
| <meta name="description" content=""> |
| |
| |
| <link rel="shortcut icon" href="http://shardingsphere.apache.org/document/legacy/1.x/cn/img/favicon.png" type="image/x-icon" /> |
| |
| |
| <title>概览</title> |
| <link href="http://shardingsphere.apache.org/document/legacy/1.x/cn/css/nucleus.css" rel="stylesheet"> |
| <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> |
| <link href="http://shardingsphere.apache.org/document/legacy/1.x/cn/css/theme.css" rel="stylesheet"> |
| <link href="http://shardingsphere.apache.org/document/legacy/1.x/cn/css/hugo-theme.css" rel="stylesheet"> |
| <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> |
| <style type="text/css">:root #header + #content > #left > #rlblock_left |
| {display:none !important;}</style> |
| <link rel="stylesheet" href="http://cdn.bootcss.com/highlight.js/9.8.0/styles/monokai-sublime.min.css"> |
| <link rel="stylesheet" href="http://shardingsphere.apache.org/document/legacy/1.x/cn/css/style.css"> |
| </head> |
| <body class="" data-url="/00-overview/"> |
| |
| <nav id="sidebar"> |
| <div id="header-wrapper"> |
| <div id="header"> |
| <img src="http://shardingsphere.apache.org/document/legacy/1.x/cn/img/sharding-jdbc.png" /> |
| </div> |
| </div> |
| <div class="highlightable"> |
| <ul class="topics"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="dd-item active parent" data-nav-id="/00-overview/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/"> |
| <span> |
| |
| <b>0. </b> |
| |
| 概览 |
| |
| </span> |
| </a> |
| |
| <ul> |
| |
| <li class="dd-item " data-nav-id="/00-overview/intro/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/intro/"> |
| <span>简介 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/00-overview/news/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/news/"> |
| <span>新闻 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/00-overview/company/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/company/"> |
| <span>采用公司 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/00-overview/contribution/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/contribution/"> |
| <span>贡献代码 </i></span> |
| </a> |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="dd-item " data-nav-id="/01-start/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/"> |
| <span> |
| |
| <b>1. </b> |
| |
| 起航 |
| |
| </span> |
| </a> |
| |
| <ul> |
| |
| <li class="dd-item " data-nav-id="/01-start/quick-start/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/quick-start/"> |
| <span>快速入门 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/01-start/faq/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/faq/"> |
| <span>FAQ </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/01-start/features/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/features/"> |
| <span>详细功能列表 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/01-start/limitations/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/limitations/"> |
| <span>使用限制 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/01-start/sql-supported/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/sql-supported/"> |
| <span>SQL支持详细列表 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/01-start/stress-test/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/01-start/stress-test/"> |
| <span>性能测试报告 </i></span> |
| </a> |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="dd-item " data-nav-id="/02-guide/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/"> |
| <span> |
| |
| <b>2. </b> |
| |
| 使用指南 |
| |
| </span> |
| </a> |
| |
| <ul> |
| |
| <li class="dd-item " data-nav-id="/02-guide/concepts/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/concepts/"> |
| <span>核心概念 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/sharding/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/sharding/"> |
| <span>分库分表 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/master-slave/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/master-slave/"> |
| <span>读写分离 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/configuration/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/configuration/"> |
| <span>配置手册 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/hint-sharding-value/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/hint-sharding-value/"> |
| <span>强制路由 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/key-generator/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/key-generator/"> |
| <span>分布式主键 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/transaction/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/transaction/"> |
| <span>事务支持 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/subquery/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/subquery/"> |
| <span>分页及子查询 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/02-guide/test-framework/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/02-guide/test-framework/"> |
| <span>测试引擎 </i></span> |
| </a> |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="dd-item " data-nav-id="/03-design/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/03-design/"> |
| <span> |
| |
| <b>3. </b> |
| |
| 设计规划 |
| |
| </span> |
| </a> |
| |
| <ul> |
| |
| <li class="dd-item " data-nav-id="/03-design/architecture/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/03-design/architecture/"> |
| <span>架构设计 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/03-design/module/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/03-design/module/"> |
| <span>目录结构说明 </i></span> |
| </a> |
| </li> |
| |
| <li class="dd-item " data-nav-id="/03-design/roadmap/"> |
| <a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/03-design/roadmap/"> |
| <span>未来线路规划 </i></span> |
| </a> |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| |
| </ul> |
| <hr> |
| |
| </div> |
| </nav> |
| |
| <section id="body"> |
| <div id="overlay"></div> |
| |
| <div class="padding highlightable"> |
| |
| <div id="top-bar"> |
| |
| <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"> |
| <span id="sidebar-toggle-span"> |
| <a href="#" id="sidebar-toggle" data-sidebar-toggle=""> |
| <i class="fa fa-bars"></i> |
| </a> |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span itemprop="title"> 概览</span> |
| </div> |
| |
| |
| </div> |
| |
| <div id="chapter"> |
| |
| <div id="body-inner"> |
| |
| |
| |
| |
| <h1 id="概述">概述</h1> |
| |
| <p><a href="https://github.com/dangdangdotcom/sharding-jdbc/releases"><img src="https://img.shields.io/github/release/dangdangdotcom/sharding-jdbc.svg?style=social&label=Release" alt="GitHub release" /></a> |
| <a href="https://github.com/dangdangdotcom/sharding-jdbc/stargazers"><img src="https://img.shields.io/github/stars/dangdangdotcom/sharding-jdbc.svg?style=social&label=Star" alt="GitHub stars" /></a> |
| <a href="https://github.com/dangdangdotcom/sharding-jdbc/fork"><img src="https://img.shields.io/github/forks/dangdangdotcom/sharding-jdbc.svg?style=social&label=Fork" alt="GitHub forks" /></a> |
| <a href="https://github.com/dangdangdotcom/sharding-jdbc/watchers"><img src="https://img.shields.io/github/watchers/dangdangdotcom/sharding-jdbc.svg?style=social&label=Watch" alt="GitHub watchers" /></a></p> |
| |
| <p>Sharding-JDBC是一个开源的适用于微服务的分布式数据访问基础类库,它始终以云原生的基础开发套件为目标。</p> |
| |
| <p>Sharding-JDBC定位为轻量级java框架,使用客户端直连数据库,以jar包形式提供服务,未使用中间层,无需额外部署,无其他依赖,DBA也无需改变原有的运维方式,可理解为增强版的JDBC驱动,旧代码迁移成本几乎为零。</p> |
| |
| <p>Sharding-JDBC完整的实现了分库分表,读写分离和分布式主键功能,并初步实现了柔性事务。从2016年开源至今,在经历了整体架构的数次精炼以及稳定性打磨后,如今它已积累了足够的底蕴,相信可以成为开发者选择技术组件时的一个参考。</p> |
| |
| <p><a href="https://maven-badges.herokuapp.com/maven-central/com.dangdang/sharding-jdbc"><img src="https://maven-badges.herokuapp.com/maven-central/com.dangdang/sharding-jdbc/badge.svg" alt="Maven Status" /></a> |
| <a href="https://travis-ci.org/dangdangdotcom/sharding-jdbc"><img src="https://secure.travis-ci.org/dangdangdotcom/sharding-jdbc.svg?branch=master" alt="Build Status" /></a> |
| <a href="https://coveralls.io/github/dangdangdotcom/sharding-jdbc?branch=master"><img src="https://coveralls.io/repos/dangdangdotcom/sharding-jdbc/badge.svg?branch=master&service=github" alt="Coverage Status" /></a> |
| <a href="http://www.apache.org/licenses/LICENSE-2.0.html"><img src="http://dangdangdotcom.github.io/sharding-jdbc/img/license.svg" alt="Hex.pm" /></a></p> |
| |
| <h1 id="功能列表">功能列表</h1> |
| |
| <h2 id="1-分库分表">1. 分库分表</h2> |
| |
| <ul> |
| <li>SQL解析功能完善,支持聚合,分组,排序,LIMIT,TOP等查询,并且支持级联表以及笛卡尔积的表查询</li> |
| <li>支持内、外连接查询</li> |
| <li>分片策略灵活,可支持=,BETWEEN,IN等多维度分片,也可支持多分片键共用,以及自定义分片策略</li> |
| <li>基于Hint的强制分库分表路由</li> |
| </ul> |
| |
| <h2 id="2-读写分离">2. 读写分离</h2> |
| |
| <ul> |
| <li>一主多从的读写分离配置,可配合分库分表使用</li> |
| <li>基于Hint的强制主库路由</li> |
| </ul> |
| |
| <h2 id="3-柔性事务">3. 柔性事务</h2> |
| |
| <ul> |
| <li>最大努力送达型事务</li> |
| <li>TCC型事务(TBD)</li> |
| </ul> |
| |
| <h2 id="4-分布式主键">4. 分布式主键</h2> |
| |
| <ul> |
| <li>统一的分布式基于时间序列的ID生成器</li> |
| </ul> |
| |
| <h2 id="5-兼容性">5. 兼容性</h2> |
| |
| <ul> |
| <li>可适用于任何基于java的ORM框架,如:JPA, Hibernate, Mybatis, Spring JDBC Template或直接使用JDBC</li> |
| <li>可基于任何第三方的数据库连接池,如:DBCP, C3P0, BoneCP, Druid等</li> |
| <li>理论上可支持任意实现JDBC规范的数据库。目前支持MySQL,Oracle,SQLServer和PostgreSQL</li> |
| </ul> |
| |
| <h2 id="6-灵活多样的配置">6. 灵活多样的配置</h2> |
| |
| <ul> |
| <li>Java</li> |
| <li>Spring命名空间</li> |
| <li>YAML</li> |
| <li>Inline表达式</li> |
| </ul> |
| |
| <h1 id="交流与参与">交流与参与</h1> |
| |
| <ul> |
| <li><strong>官方群:</strong> 532576663(仅限于讨论与Sharding-JDBC相关的话题。我们希望您在入群前仔细阅读文档。并在入群后阅读公告以及修改群名片。谢谢合作。)</li> |
| <li><strong>源码交流群:</strong> 659205143(仅限于讨论与Sharding-JDBC源码实现相关的话题。我们欢迎您在这里与我们交流Sharding-JDBC的架构设计、代码实现以及未来线路规划。此群需要对Sharding-JDBC有先期了解。入群资格:请发布一篇关于Sharding-JDBC的源码分析的文章并将链接通过官方交流群发送给我们。)</li> |
| <li>报告确定的bug,提交增强功能建议和提交补丁等,请阅读<a href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/contribution">如何进行贡献</a>。</li> |
| </ul> |
| |
| <p><strong>使用Sharding-JDBC的公司如果方便请留下公司+网址</strong> <a href="https://github.com/dangdangdotcom/sharding-jdbc/issues/234">https://github.com/dangdangdotcom/sharding-jdbc/issues/234</a></p> |
| |
| |
| |
| |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <div id="navigation"> |
| |
| <a class="nav nav-prev" href="http://shardingsphere.apache.org/document/legacy/1.x/cn/03-design/roadmap/"> <i class="fa fa-chevron-left"></i></a> |
| <a class="nav nav-next" href="http://shardingsphere.apache.org/document/legacy/1.x/cn/00-overview/intro/" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a> |
| </div> |
| |
| </section> |
| <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"> |
| <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div> |
| </div> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/clipboard.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/perfect-scrollbar.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/perfect-scrollbar.jquery.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/jquery.sticky-kit.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/featherlight.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/html5shiv-printshiv.min.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/highlight.pack.js"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/learn.js"></script> |
| <script src="http://shardingsphere.apache.org/document/legacy/1.x/cn/js/hugo-learn.js"></script> |
| <script src="http://cdn.bootcss.com/highlight.js/9.8.0/highlight.min.js"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| |
| </body> |
| </html> |
| |