README.md 5.9 KB
Newer Older
T
terrymanu 已提交
1
# [Sharding-Sphere - Distributed database middleware ecosphere](http://shardingsphere.io/)
T
terrymanu 已提交
2

T
terrymanu 已提交
3
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
T
terrymanu 已提交
4
[![Gitter](https://badges.gitter.im/shardingsphere/shardingsphere.svg)](https://gitter.im/shardingsphere/Lobby)
T
terrymanu 已提交
5
[![GitHub release](https://img.shields.io/github/release/sharding-sphere/sharding-sphere.svg)](https://github.com/sharding-sphere/sharding-sphere/releases)
C
Chris Cao 已提交
6
[![Docker Pulls](https://img.shields.io/docker/pulls/shardingsphere/sharding-proxy.svg)](https://store.docker.com/community/images/shardingsphere/sharding-proxy)
T
terrymanu 已提交
7

T
terrymanu 已提交
8 9
[![Build Status](https://api.travis-ci.org/sharding-sphere/sharding-sphere.png?branch=master)](https://travis-ci.org/sharding-sphere/sharding-sphere)
[![Coverage Status](https://codecov.io/github/sharding-sphere/sharding-sphere/coverage.svg?branch=master)](https://codecov.io/github/sharding-sphere/sharding-sphere?branch=master)
T
terrymanu 已提交
10 11
[![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 已提交
12

T
terrymanu 已提交
13
## Document
T
terrymanu 已提交
14

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

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

T
terrymanu 已提交
20
## Overview
T
terrymanu 已提交
21

T
terrymanu 已提交
22
Sharding-Sphere is an open-sourced distributed database middleware solution suite, which is composite by Sharding-JDBC, Sharding-Proxy and Sharding-Sidecar. Those 3 projects provide consistent features which include data sharding, read-write splitting, orchestration and B.A.S.E transaction. They can suitable for various scenario.
T
terrymanu 已提交
23

T
terrymanu 已提交
24 25
Sharding-Sphere is a Relational Database Middleware which reuse capacity of original databases (such as: compute, storage), but make best simplicity and efficiency on distribute environment. Sharding-Sphere do not want implement a new database.
It can cooperate with NoSQL and NewSQL. NoSQL and NewSQL are good exploration for technology, they are care about what’s going to change. There is another theory which is care about what’s not going to change. Relational Database still is the biggest percentage of market share, it is difficult to estimate trendy in future. So we are focus about how to enhance with Relational Database now.
T
terrymanu 已提交
26

T
terrymanu 已提交
27
![Sharding-Sphere Score](http://ovfotjrsi.bkt.clouddn.com/sphere_scope_en.png)
T
terrymanu 已提交
28

T
terrymanu 已提交
29
### Sharding-JDBC
T
terrymanu 已提交
30

T
terrymanu 已提交
31 32
[![Maven Status](https://maven-badges.herokuapp.com/maven-central/io.shardingjdbc/sharding-jdbc/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.shardingjdbc/sharding-jdbc)

T
terrymanu 已提交
33
Use JDBC connect databases without redirect cost for java application, best performance for production.
T
terrymanu 已提交
34

wu-sheng's avatar
wu-sheng 已提交
35
* ORM compatible. JPA, Hibernate, Mybatis, Spring JDBC Template or JDBC supported.
T
terrymanu 已提交
36
* Connection-pool compatible. DBCP, C3P0, BoneCP, Druid supported.
wu-sheng's avatar
wu-sheng 已提交
37
* Multi SQL-based databases compatible. Any Database supported theoretically. Support MySQL, Oracle, SQLServer and PostgreSQL right now.
T
terrymanu 已提交
38

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

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

T
terrymanu 已提交
43
[![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.M1.tar.gz)
T
terrymanu 已提交
44

T
terrymanu 已提交
45
It is a database proxy. Deploy as a stateless server, support MySQL protocol for now.
T
terrymanu 已提交
46 47

* Use standard MySQL protocol, application do not care about whether proxy or real MySQL.
T
terrymanu 已提交
48
* Any MySQL command line and UI workbench supported in theoretically. MySQL Workbench are fully compatible right now.
T
terrymanu 已提交
49

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

T
terrymanu 已提交
52
### Sharding-Sidecar(TBD)
T
terrymanu 已提交
53

T
terrymanu 已提交
54 55
It can mesh interactions between applications and databases, must run in Kubernetes or Mesos environment.
It is a centre-less solution, can support any languages, we call it as `Database Mesh`.
T
terrymanu 已提交
56

T
terrymanu 已提交
57
Database Mesh is focused on how to connect the distributed data-access-layer and databases together. It pays more attention on interaction, which means the messy interaction among the applications and databases will be effectively orchestrate. By using Database Mesh, applications and databases will form a large grid system, and they just need to be put into the right position on grid system accordingly.
T
terrymanu 已提交
58

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

T
terrymanu 已提交
61 62 63 64 65 66 67 68
|                        | *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 已提交
69

T
terrymanu 已提交
70
## Features
T
terrymanu 已提交
71

T
terrymanu 已提交
72
### Data sharding
T
terrymanu 已提交
73

T
terrymanu 已提交
74 75 76 77 78 79 80
* Both databases and tables sharding.
* Aggregation functions, GROUP BY, ORDER BY, LIMIT, OR, and JOIN DQL supported.
* DML, DDL, TCL and database administrator command supported.
* Sharding operator `=`, `BETWEEN` and `IN` supported.
* Sharding algorithm customization and inline expression supported.
* Force route by hint.
* Distributed sequence.
T
terrymanu 已提交
81

T
terrymanu 已提交
82
### Read-write splitting
T
terrymanu 已提交
83

T
terrymanu 已提交
84 85 86 87
* Multiple slaves replica. 
* Data consistency guarantee in same thread.
* Mix read-write splitting and data sharding.
* Force route by hint.
T
terrymanu 已提交
88

T
terrymanu 已提交
89
### BASE Transaction
T
terrymanu 已提交
90

T
terrymanu 已提交
91 92
* Best efforts delivery transaction.
* Try confirm cancel transaction (TBD).
T
terrymanu 已提交
93

T
terrymanu 已提交
94
### Orchestration
T
terrymanu 已提交
95

T
terrymanu 已提交
96 97 98
* Configuration center, can refresh dynamically.
* Circuit breaker.
* Open tracing supported.