README.md 6.2 KB
Newer Older
T
terrymanu 已提交
1
# [Sharding-Sphere - Distributed Database Middleware Ecosphere](http://shardingsphere.io/)
T
terrymanu 已提交
2

T
terrymanu 已提交
3 4
Official website: http://shardingsphere.io/

T
terrymanu 已提交
5
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
T
terrymanu 已提交
6
[![Gitter](https://badges.gitter.im/shardingsphere/shardingsphere.svg)](https://gitter.im/shardingsphere/Lobby)
T
terrymanu 已提交
7
[![GitHub release](https://img.shields.io/github/release/sharding-sphere/sharding-sphere.svg)](https://github.com/sharding-sphere/sharding-sphere/releases)
T
terrymanu 已提交
8

T
terrymanu 已提交
9
[![Build Status](https://api.travis-ci.org/sharding-sphere/sharding-sphere.png?branch=master)](https://travis-ci.org/sharding-sphere/sharding-sphere)
T
terrymanu 已提交
10
[![Coverage Status](https://coveralls.io/repos/github/sharding-sphere/sharding-sphere/badge.svg?branch=dev)](https://coveralls.io/github/sharding-sphere/sharding-sphere?branch=dev)
T
terrymanu 已提交
11
[![snyk](https://snyk.io/test/github/sharding-sphere/sharding-sphere/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/sharding-sphere/sharding-sphere?targetFile=pom.xml)
T
terrymanu 已提交
12 13
[![OpenTracing-1.0 Badge](https://img.shields.io/badge/OpenTracing--1.0-enabled-blue.svg)](http://opentracing.io)
[![Skywalking Tracing](https://img.shields.io/badge/Skywalking%20Tracing-enable-brightgreen.svg)](https://github.com/OpenSkywalking/skywalking)
T
terrymanu 已提交
14

T
terrymanu 已提交
15
## Document
T
terrymanu 已提交
16

T
trista 已提交
17
[![EN doc](https://img.shields.io/badge/document-English-blue.svg)](http://shardingsphere.io/document/current/en/)
T
terrymanu 已提交
18
[![Roadmap](https://img.shields.io/badge/roadmap-English-blue.svg)](ROADMAP.md)
T
terrymanu 已提交
19

T
trista 已提交
20
[![CN doc](https://img.shields.io/badge/文档-中文版-blue.svg)](http://shardingsphere.io/document/current/cn/)
T
terrymanu 已提交
21

T
terrymanu 已提交
22
## Overview
T
terrymanu 已提交
23

T
terrymanu 已提交
24 25 26 27 28
Sharding-Sphere is an open-source ecosystem consisted of a set of distributed database middleware solution, including 3 independent products, Sharding-JDBC, Sharding-Proxy & Sharding-Sidecar (todo). 
They all provide functions of data sharding, distributed transaction and database orchestration, applicable in a variety of situations such as Java isomorphism, heterogeneous language and cloud native. 
Aiming at reasonably making full use of the computation and storage capacity of database in distributed system, Sharding-Sphere defines itself as a middleware, rather than a totally new type of database. 
As the cornerstone of many enterprises, relational database still takes a huge market share. 
Therefore, at current stage, we prefer to focus on its increment instead of a total overturn.
T
terrymanu 已提交
29

T
terrymanu 已提交
30
![Sharding-Sphere Scope](http://ovfotjrsi.bkt.clouddn.com/sharding-sphere-scope_en.png)
T
terrymanu 已提交
31

T
terrymanu 已提交
32
### Sharding-JDBC
T
terrymanu 已提交
33

T
terrymanu 已提交
34
[![Maven Status](https://maven-badges.herokuapp.com/maven-central/io.shardingsphere/sharding-jdbc/badge.svg)](https://mvnrepository.com/artifact/io.shardingsphere/sharding-jdbc)
T
terrymanu 已提交
35

T
terrymanu 已提交
36 37
Sharding-JDBC is positioned as a lightweight Java framework that provides Sharding service in the JDBC layer. 
It directly connects to databases to provide services in the form of jar, with no additional deployment and dependencies, and it can be understood as an enhanced version of the JDBC driver, fully compliant with JDBC and various ORM frameworks.
T
terrymanu 已提交
38

T
terrymanu 已提交
39 40 41
* It is compliant with any Java-based ORM framework, such as JPA, Hibernate, Mybatis and Spring JDBC Template; or you can use JDBC directly.
* It is suitable for connection-pool based on any third party, such as DBCP, C3P0, BoneCP, Druid, HikariCP and so on.
* It supports databases implementing JDBC specification. Supporting MySQL, Oracle, SQLServer and PostgreSQL right now.
T
terrymanu 已提交
42

T
terrymanu 已提交
43 44 45
![Sharding-JDBC Architecture](http://ovfotjrsi.bkt.clouddn.com/sharding-jdbc-brief.png)

### Sharding-Proxy
T
terrymanu 已提交
46

T
terrymanu 已提交
47
[![Download](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/sharding-sphere/sharding-sphere-doc/raw/master/dist/sharding-proxy-3.0.0.M4.tar.gz)
C
Chris Cao 已提交
48
[![Docker Pulls](https://img.shields.io/docker/pulls/shardingsphere/sharding-proxy.svg)](https://store.docker.com/community/images/shardingsphere/sharding-proxy)
T
terrymanu 已提交
49

T
terrymanu 已提交
50 51
Sharding-Proxy is positioned as a transparent database proxy, providing a database server that encapsulates database binary protocol to support heterogeneous languages. 
At present, we provide Sharding-Proxy for MySQL, and you can use any clients compatible with MySQL protocol (such as MySQL Command Client, MySQL Workbench, etc.) to manipulate data.
T
terrymanu 已提交
52

T
terrymanu 已提交
53 54
* It is transparent to application, which can be used as MySQL.
* It is suitable for any clients compatible with MySQL protocol.
T
terrymanu 已提交
55

T
terrymanu 已提交
56
![Sharding-Proxy Architecture](http://ovfotjrsi.bkt.clouddn.com/sharding-proxy-brief_v2.png)
T
terrymanu 已提交
57

T
terrymanu 已提交
58
### Sharding-Sidecar(TBD)
T
terrymanu 已提交
59

T
terrymanu 已提交
60 61
It is positioned as cloud native database agent of Kubernetes or Mesos environment, in charge of all database access in the form of DaemonSet. 
Through a centre-less and zero-cost solution, it provides mesh layer interacting with database. We call it `Database Mesh`.
T
terrymanu 已提交
62

T
terrymanu 已提交
63 64
Database Mesh emphasizes how to connect distributed data-access-layer with databases. It pays more attention to interaction, which means the messy interaction between applications and databases will be effectively orchestrated. 
By using Database Mesh, applications and databases will form a large grid system, where they just need to be put into the right position accordingly. They are all governed by mesh layer.
T
terrymanu 已提交
65

T
terrymanu 已提交
66
![Sharding-Sidecar Architecture](http://ovfotjrsi.bkt.clouddn.com/sharding-sidecar-brief_v2.png)
T
terrymanu 已提交
67

T
terrymanu 已提交
68 69 70 71 72 73 74 75
|                        | *Sharding-JDBC* | *Sharding-Proxy* | *Sharding-Sidecar* |
| ---------------------- | --------------- | ---------------- | ------------------ |
| Database               | Any             | MySQL            | MySQL              |
| Connections Cost       | More            | Less             | More               |
| Heterogeneous Language | Java Only       | Any              | Any                |
| Performance            | Low loss        | High loss        | Low loss           |
| Centre-less            | Yes             | No               | No                 |
| Static Entry           | No              | Yes              | No                 |
T
terrymanu 已提交
76

T
terrymanu 已提交
77
## Features
T
terrymanu 已提交
78

T
terrymanu 已提交
79
### Data Sharding
T
terrymanu 已提交
80

T
terrymanu 已提交
81
* Database sharding & Table sharding
T
terrymanu 已提交
82 83
* Read-write splitting
* Distributed primary key
T
terrymanu 已提交
84

T
terrymanu 已提交
85
### Distributed Transaction (Doing)
T
terrymanu 已提交
86

T
terrymanu 已提交
87 88
* XA transaction
* BASE transaction
T
terrymanu 已提交
89

T
terrymanu 已提交
90
### Database Orchestration
T
terrymanu 已提交
91

T
terrymanu 已提交
92 93
* Dynamic configuration
* Fusing & Disabling
T
terrymanu 已提交
94
* Open tracing
T
terrymanu 已提交
95 96
* Multiple data replication (Planing)
* Elastic scaling out (Planing)
T
terrymanu 已提交
97 98 99 100

## Roadmap

![Roadmap](http://ovfotjrsi.bkt.clouddn.com/roadmap_en_v2.png)