1 Star 0 Fork 957

jicky / Apache ShardingSphere

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

ShardingSphere - Distributed Database Ecosphere

Official Website: https://shardingsphere.apache.org/

License Gitter GitHub release Twitter Slack

Stargazers Over Time

Stargazers Over Time

Contributors Over Time

Contributors Over Time

Build Status codecov snyk OpenTracing-1.0 Badge Skywalking Tracing Maintainability

Document

EN doc CN doc

Overview

Apache ShardingSphere is an Open Source ecosystem consisting of a set of distributed database solutions, including 3 independent products: JDBC, Proxy & Sidecar (Planning). They all provide functions of data scale-out, distributed transaction and distributed governance, applicable in a variety of situations such as Java isomorphism, heterogeneous language and cloud-native.

Apache ShardingSphere aims at reasonably making full use of the computational and storage capacity of existing databases in a distributed system, rather than establishing a new database. As the cornerstone of enterprises, the relational database has a huge market share. Therefore, we prefer to focus on its incrementation instead of a total overturn.

Apache ShardingSphere began to focus on pluggable architecture from version 5.x, and features can be embedded into project flexibility. Currently, features such as data sharding, replica query, data encryption, shadow testing, and SQL dialects/database protocols such as MySQL, PostgreSQL, SQLServer, Oracle supported are all weaved by plugins. Developers can customize their ShardingSphere systems just like building with LEGO blocks. There are lots of SPI extensions for Apache ShardingSphere now and they are increasing continuously.

ShardingSphere became an Apache Top-Level Project on April 16, 2020.

You are welcome to communicate with the community via the mailing list and interact via the ShardingSphere Slack.

ShardingSphere Scope

ShardingSphere-JDBC

Maven Status

ShardingSphere-JDBC defines itself as a lightweight Java framework that provides extra services at the Java JDBC layer. With the client end connecting directly to the database, it provides services in the form of a jar and requires no extra deployment and dependence. It can be considered as an enhanced JDBC driver, which is fully compatible with JDBC and all kinds of ORM frameworks.

Applicable in any ORM framework based on JDBC, such as JPA, Hibernate, Mybatis, Spring JDBC Template or direct use of JDBC. Supports any third-party database connection pool, such as DBCP, C3P0, BoneCP, Druid, HikariCP. Supports any kind of JDBC standard database: MySQL, Oracle, SQLServer, PostgreSQL and any SQL92 followed databases.

ShardingSphere-JDBC Architecture

ShardingSphere-Proxy

Download Docker Pulls

ShardingSphere-Proxy defines itself as a transparent database proxy, providing a database server that encapsulates database binary protocol to support heterogeneous languages. Friendlier to DBAs, the MySQL version now provided can use any kind of terminal (such as MySQL Command Client, MySQL Workbench, etc.) that is compatible of MySQL protocol to operate data.

Transparent towards applications, it can be used directly as MySQL and PostgreSQL servers. Applicable to any kind of terminal that is compatible with MySQL and PostgreSQL protocol.

ShardingSphere-Proxy Architecture

ShardingSphere-Sidecar(TODO)

ShardingSphere-Sidecar (TODO) defines itself as a cloud-native database agent of the Kubernetes environment, in charge of all database access in the form of a sidecar. It provides a mesh layer interacting with the database, we call this Database Mesh.

Database Mesh emphasizes how to connect distributed data-access applications with the databases. Focusing on interaction, it effectively organizes the interaction between messy applications and databases. The applications and databases that use Database Mesh to visit databases will form a large grid system, where they just need to be put into the right positions accordingly. They are all governed by the mesh layer.

ShardingSphere-Sidecar Architecture

ShardingSphere-JDBC ShardingSphere-Proxy ShardingSphere-Sidecar
Database Any MySQL/PostgreSQL MySQL/PostgreSQL
Connections Count Cost High Low High
Supported Languages Java Only Any Any
Performance Low loss Relatively High loss Low loss
Decentralization Yes No No
Static Entry No Yes No

Hybrid Architecture

ShardingSphere-JDBC adopts a decentralized architecture, applicable to high-performance light-weight OLTP application developed with Java. ShardingSphere-Proxy provides static entry and all languages support, applicable for OLAP application and the sharding databases management and operation situation.

ShardingSphere is an ecosystem consisting of multiple endpoints together. Through a mixed use of ShardingSphere-JDBC and ShardingSphere-Proxy and a unified sharding strategy by the same registry center, ShardingSphere can build an application system that is applicable to all kinds of scenarios. Architects can adjust the system architecture to the most applicable one to their needs to conduct business more freely.

ShardingSphere Hybrid Architecture

Features

Data Sharding

  • Database sharding & Table sharding
  • Replica query
  • Sharding strategy customization
  • Centre-less Distributed primary key

Distributed Transaction

  • Unified Transaction API
  • XA transaction
  • BASE transaction

Database Governance

  • Distributed Governance
  • Data migration & Scale-out
  • Observability(Tracing/Metrics) Supported
  • Data Encryption&Decryption
  • Shadow Table for Performance Testing

How to Build

Build Apache ShardingSphere

./mvnw clean install -Prelease

Artifact:

shardingsphere-distribution/shardingsphere-src-distribution/target/apache-shardingsphere-${latest.release.version}-src.zip  # Source code package of Apache ShardingSphere
shardingsphere-distribution/shardingsphere-jdbc-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-jdbc-bin.tar.gz  # Binary package of ShardingSphere-JDBC
shardingsphere-distribution/shardingsphere-proxy-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-proxy-bin.tar.gz  # Binary package of ShardingSphere-Proxy
shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz  # Binary package of ShardingSphere-Scaling

Build ShardingSphere-UI

git clone https://github.com/apache/shardingsphere-ui
cd shardingsphere-ui
./mvnw clean install -Prelease

Artifact:

shardingsphere-ui/shardingsphere-ui-distribution/shardingsphere-ui-bin-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-ui-bin.tar.gz  # Binary package of ShardingSphere-UI

Landscapes



  

Apache ShardingSphere enriches the CNCF CLOUD NATIVE Landscape.

# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # header: license: spdx-id: Apache-2.0 copyright-owner: Apache Software Foundation paths-ignore: - '.github/GIT_TEMPLATE/**' - '.github/ISSUE_TEMPLATE/**' - '.github/PULL_REQUEST_TEMPLATE' - '**/.gitignore' - '.mvn' - 'docs/**' - '**/*.md' - '**/*.json' - '**/*.iml' - '**/*.ini' - 'LICENSE' - 'NOTICE' - '**/release-docs/**' comment: on-failure

About

Apache ShardingSphere(Incubator) 是一套开源的分布式数据库中间件解决方案组成的生态圈,它由Sharding-JDBC、Sharding-Proxy和Sharding-Sidecar(规划中)这3款相互独立,却又能够混合部署配合使用的产品组成。它们均提供标准化的数据分片、分布式事务和数据库治理功能,可适用于如Java同构、异构语言、容器、云原生等各种多样化的应用场景。 expand collapse
Java
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/jicky168/sharding-sphere.git
git@gitee.com:jicky168/sharding-sphere.git
jicky168
sharding-sphere
Apache ShardingSphere
master

Search