提交 201ea557 编写于 作者: T terrymanu

update pages

上级 9220d415
<<<<<<< HEAD
baseurl = "http://dangdangdotcom.github.io/sharding-jdbc"
=======
baseurl = "http://dangdangdotcom.github.io"
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
languageCode = "en-us"
title = "Sharding-JDBC"
......
......@@ -5,7 +5,7 @@
* 曹昊 &nbsp;&nbsp;&nbsp;[当当](http://www.dangdang.com/) caohao@dangdang.com
* 岳令 &nbsp;&nbsp;&nbsp;[当当](http://www.dangdang.com/) yueling@dangdang.com
**讨论QQ群:**xxx(不限于Sharding-JDBC,包括分布式,数据库相关以及其他互联网技术交流)
**讨论QQ群:**532576663(不限于Sharding-JDBC,包括分布式,数据库相关以及其他互联网技术交流)
# 简介
`Sharding-JDBC`是当当应用框架`ddframe`中,关系型数据库模块`dd-rdb`中分离出来的数据库水平扩展框架,即透明化数据库分库分表访问。
......@@ -29,13 +29,13 @@
| 功能 | Cobar | Cobar-client | TDDL | Sharding-JDBC |
| ------------- |:-------------:| --------------:| -----------:|----------------:|
| 分库 | 有 | 有 | 未开源 | 有 |
| 分表 | 无 | 无 | 未开源 | 有 |
| 中间层 | 是 | 否 | 否 | 否 |
| ORM支持 | 任意 | 仅MyBatis | 任意 | 任意 |
| 数据库支持 | 仅MySQL | 任意 | 任意 | 任意 |
| 异构语言 | 可 | 仅Java | 仅Java | 仅Java |
| 外部依赖 | 无 | 无 | Diamond | 无 |
| 分库 | 有 | 有 | 未开源 | 有 |
| 分表 | 无 | 无 | 未开源 | 有 |
| 中间层 | 是 | 否 | 否 | 否 |
| ORM支持 | 任意 | 仅MyBatis | 任意 | 任意 |
| 数据库支持 | 仅MySQL | 任意 | 任意 | 任意 |
| 异构语言 | 可 | 仅Java | 仅Java | 仅Java |
| 外部依赖 | 无 | 无 | Diamond | 无 |
***
......
......@@ -5,7 +5,6 @@ weight=4
+++
# 架构图
<<<<<<< HEAD
![整体架构图1](img/architecture.png)
![SQL解析](img/parse.png)
......@@ -15,14 +14,4 @@ weight=4
![SQL执行](img/execute.png)
![结果归并](img/merge.png)
=======
![整体架构图1](../img/architecture.png)
![SQL解析](../img/parse.png)
![SQL路由](../img/route.png)
![SQL执行](../img/execute.png)
![结果归并](../img/merge.png)
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
......@@ -5,13 +5,15 @@ weight=6
+++
# 未来线路规划
1. 读写分离
2. 柔性分布式事务
3. 分布式主键生成策略
4. SQL重写优化,进一步提升性能
5. SQL Hint,可指定某SQL在某具体库表执行,基于业务规则而非SQL解析路由
6. 小表广播
7. HA相关
7. 数据库建表工具
8. 复杂SQL解析支持,如子查询,存储过程等
10. Oracle, SQLServer,DB2支持
11. 配置中心
1. 柔性分布式事务
1. 分布式主键生成策略
1. SQL重写优化,进一步提升性能
1. SQL Hint,可指定某SQL在某具体库表执行,基于业务规则而非SQL解析路由
1. 小表广播
1. HA相关
1. 流量控制
1. 数据库建表工具
1. 数据迁移
1. 复杂SQL解析支持,如子查询,存储过程等
1. Oracle, SQLServer,DB2支持
1. 配置中心
......@@ -110,11 +110,8 @@ private static DataSource createDataSource(final String dataSourceName) {
## 策略配置
### 数据源策略与表策略
<<<<<<< HEAD
![策略类图](img/StrategyClass.900.png)
=======
![策略类图](/img/StrategyClass.900.png)
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
Sharding-JDBC认为对于分片策略存有两种维度
- 数据源分片策略`DatabaseShardingStrategy`:数据被分配的目标数据源
- 表分片策略`TableShardingStrategy`:数据被分配的目标表,该目标表存在与该数据的目标数据源内。故表分片策略是依赖与数据源分片策略的结果的
......@@ -168,11 +165,8 @@ new TableShardingStrategy(Arrays.asList("order_id","order_type", "order_date")
### 分片算法
分片算法接口类图关系如下:
<<<<<<< HEAD
![算法](img/AlgorithmClass.900.png)
=======
![算法](/img/AlgorithmClass.900.png)
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
### 绑定表
绑定表代表一组表,这组表的逻辑表与实际表之间的映射关系是相同的。比如`t_order``t_order_item`就是这样一组绑定表关系,它们的分库与分表策略是完全相同的,那么可以使用它们的表规则将它们配置成绑定表
......
......@@ -6,35 +6,21 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<<<<<<< HEAD
<base href="/sharding-jdbc/"/>
<title>{{ .Title }}</title>
<!-- Bootstrap Core CSS -->
<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/landing-page.css" rel="stylesheet">
=======
<title>{{ .Title }}</title>
<!-- Bootstrap Core CSS -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="/css/landing-page.css" rel="stylesheet">
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
<!-- Custom Fonts -->
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<style>
{{ printf "%v" (partial "template.css" . ) | safeCSS }}
</style>
<<<<<<< HEAD
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
=======
<link href="/css/prism.css" rel="stylesheet">
<link href="/css/table.css" rel="stylesheet">
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
</head>
<body>
<!-- jQuery Version 1.11.0 -->
<<<<<<< HEAD
<script src="//cdn.bootcss.com/jquery/1.12.0/jquery.min.js"></script>5
<script src="//cdn.bootcss.com/jquery/1.12.0/jquery.min.js"></script>
<!-- Plugin JavaScript -->
<script src="//cdn.bootcss.com/jquery-easing/1.3/jquery.easing.min.js"></script>
......@@ -10,32 +9,3 @@
<!-- Custom Theme JavaScript -->
<script src="js/prism.js"></script>
=======
<script src="/js/jquery-1.11.0.js"></script>
<!-- Plugin JavaScript -->
<script src="/js/jquery.easing.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="js/landing-page.js"></script>
<script src="/js/prism.js"></script>
{{ if isset .Site.Params "googleAnalytics" }}
<!-- Google Analytics -->
<!--<script>-->
<!--(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){-->
<!--(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new-->
<!--Date();a=s.createElement(o),-->
<!--m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)-->
<!--})(window,document,'script','//www.google-analytics.com/analytics.js','ga');-->
<!--ga('create', '{{ .Site.Params.googleAnalytics }}', 'auto');-->
<!--ga('send', 'pageview');-->
<!--</script>-->
{{ end }}
>>>>>>> d2aa9f588f5ed3f3bb4b93f956bb07d35ba29e70
/*!
* Start Bootstrap - Landing Page Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body,
html {
width: 100%;
height: 100%;
font-size: 16px;
}
body,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: -apple-system-headline, 'Helvetica Neue', Helvetica, sans-serif;
}
.lead {
font-size: 18px;
font-weight: 400;
}
.intro-header {
padding-top: 40px;
text-align: center;
color: #f8f8f8;
}
.intro-message {
margin-top: 100px;
color: rgb(51, 51, 51);
text-align: left;
}
.intro-message > h3 {
font-family: -apple-system-headline, 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, sans-serif;
}
.intro-message > h1 {
font-family: -apple-system-subheadline, 'HelveticaNeue-UltraLight', 'Helvetica Neue', Helvetica, sans-serif;
font-size: 5em;
}
.intro-divider {
width: 400px;
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid rgba(0,0,0,0.2);
}
.network-name {
text-transform: uppercase;
font-size: 14px;
font-weight: 400;
letter-spacing: 2px;
}
.container {
width: 1024px;
line-height: 1.2em;
}
.header-container {
width: 100%;
}
.container ul {
line-height: 1.6em;
}
.container pre {
margin-top: 20px;
margin-bottom: 20px;
line-height: 1.6em;
}
.container h3 {
margin-top: 20px;
margin-bottom: 10px;
}
.content-section-a {
padding: 50px 0;
background-color: #f8f8f8;
}
.content-section-b {
padding: 50px 0;
border-top: 1px solid #e7e7e7;
border-bottom: 1px solid #e7e7e7;
}
.section-heading {
margin-bottom: 30px;
}
.section-heading-spacer {
float: left;
width: 200px;
border-top: 3px solid #e7e7e7;
}
.contact {
padding: 100px 0;
color: #f8f8f8;
background: url(../img/contact-bg.jpg) no-repeat center center;
background-size: cover;
}
.contact h2 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
font-size: 3em;
}
.contact ul {
margin-bottom: 0;
}
.contact-social-buttons {
float: right;
margin-top: 0;
}
@media(max-width:1199px) {
ul.contact-social-buttons {
float: left;
margin-top: 15px;
}
}
@media(max-width:767px) {
.contact h2 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
font-size: 3em;
}
ul.contact-social-buttons > li {
display: block;
margin-bottom: 20px;
padding: 0;
}
ul.contact-social-buttons > li:last-child {
margin-bottom: 0;
}
}
footer {
padding: 50px 0;
background-color: #f8f8f8;
}
p.copyright {
margin: 15px 0 0;
}
@media(max-width:1000px) {
.intro-message {
padding-bottom: 10%;
margin-top: -30px;
}
.intro-message > h1 {
font-size: 3em;
}
ul.intro-social-buttons > li {
display: block;
margin-bottom: 20px;
padding: 0;
}
ul.intro-social-buttons > li:last-child {
margin-bottom: 0;
}
.intro-divider {
width: 100%;
}
.container {
width: 80%;
}
.intro-message {
text-align: center;
}
}
.intro-image {
height: 100%;
min-height: 380px;
margin-top: 20px;
/*background: url(../img/intro-bg.svg) no-repeat center center;
background-size: 280px;
*/
}
.github-btn {
margin-top: 10px;
}
/*!
* Start Bootstrap - Landing Page Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body,
html {
width: 100%;
height: 100%;
font-size: 16px;
}
body,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: -apple-system-headline, 'Helvetica Neue', Helvetica, sans-serif;
}
.lead {
font-size: 18px;
font-weight: 400;
}
.intro-header {
padding-top: 40px;
text-align: center;
color: #f8f8f8;
}
.intro-message {
margin-top: 100px;
color: rgb(51, 51, 51);
text-align: left;
}
.intro-message > h3 {
font-family: -apple-system-headline, 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, sans-serif;
}
.intro-message > h1 {
font-family: -apple-system-subheadline, 'HelveticaNeue-UltraLight', 'Helvetica Neue', Helvetica, sans-serif;
font-size: 5em;
}
.intro-divider {
width: 400px;
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid rgba(0,0,0,0.2);
}
.network-name {
text-transform: uppercase;
font-size: 14px;
font-weight: 400;
letter-spacing: 2px;
}
.container {
width: 1024px;
line-height: 1.2em;
}
.header-container {
width: 100%;
}
.container ul {
line-height: 1.6em;
}
.container pre {
margin-top: 20px;
margin-bottom: 20px;
line-height: 1.6em;
}
.container h3 {
margin-top: 20px;
margin-bottom: 10px;
}
.content-section-a {
padding: 50px 0;
background-color: #f8f8f8;
}
.content-section-b {
padding: 50px 0;
border-top: 1px solid #e7e7e7;
border-bottom: 1px solid #e7e7e7;
}
.section-heading {
margin-bottom: 30px;
}
.section-heading-spacer {
float: left;
width: 200px;
border-top: 3px solid #e7e7e7;
}
.contact {
padding: 100px 0;
color: #f8f8f8;
background: url(../img/contact-bg.jpg) no-repeat center center;
background-size: cover;
}
.contact h2 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
font-size: 3em;
}
.contact ul {
margin-bottom: 0;
}
.contact-social-buttons {
float: right;
margin-top: 0;
}
@media(max-width:1199px) {
ul.contact-social-buttons {
float: left;
margin-top: 15px;
}
}
@media(max-width:767px) {
.contact h2 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
font-size: 3em;
}
ul.contact-social-buttons > li {
display: block;
margin-bottom: 20px;
padding: 0;
}
ul.contact-social-buttons > li:last-child {
margin-bottom: 0;
}
}
footer {
padding: 50px 0;
background-color: #f8f8f8;
}
p.copyright {
margin: 15px 0 0;
}
@media(max-width:1000px) {
.intro-message {
padding-bottom: 10%;
margin-top: -30px;
}
.intro-message > h1 {
font-size: 3em;
}
ul.intro-social-buttons > li {
display: block;
margin-bottom: 20px;
padding: 0;
}
ul.intro-social-buttons > li:last-child {
margin-bottom: 0;
}
.intro-divider {
width: 100%;
}
.container {
width: 80%;
}
.intro-message {
text-align: center;
}
}
.intro-image {
height: 100%;
min-height: 380px;
margin-top: 20px;
/*background: url(../img/intro-bg.svg) no-repeat center center;
background-size: 280px;
*/
}
.github-btn {
margin-top: 10px;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册