GithubHelp home page GithubHelp logo

devotionalist / shardingsphere Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/shardingsphere

0.0 0.0 0.0 374.08 MB

Distributed database middleware

License: Apache License 2.0

Java 95.80% Shell 0.12% Batchfile 0.04% Dockerfile 0.04% ANTLR 4.01%

shardingsphere's Introduction

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

License Gitter GitHub release Stargazers over time

Build Status codecov Codacy Badge snyk OpenTracing-1.0 Badge Skywalking Tracing

Document

EN doc CN doc

Overview

Apache ShardingSphere is an open-source ecosystem consisted of a set of distributed database middleware solutions, including 3 independent products, JDBC, Proxy & Sidecar (Planning). They all provide functions of data sharding, distributed transaction and database governance, 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, ShardingSphere 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.

Apache ShardingSphere begins to focus on pluggable architecture from version 5.x, features can be embedded into project flexibility. Currently, the features such as data sharding, read-write splitting, multi replica, data encrypt, shadow test, and SQL dialects / database protocols such as MySQL, PostgreSQL, SQLServer, Oracle supported are all weaved by plugins. Developers can customize their own ShardingSphere systems just like building lego blocks. There are lots of SPI extensions for Apache ShardingSphere now and increasing continuously.

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

Welcome communicate with community via mail list.

ShardingSphere Scope

ShardingSphere-JDBC

Maven Status

ShardingSphere-JDBC defines itself as a lightweight Java framework that provides extra services at Java JDBC layer. With the client end connecting directly to the database, it provides services in the form of 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.
  • Support any third-party database connection pool, such as DBCP, C3P0, BoneCP, Druid, HikariCP.
  • Support any kind of JDBC standard database: MySQL, Oracle, SQLServer, PostgreSQL and any SQL92 followed database.

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 DBA, the proxy of MySQL/PostgreSQL version provided now can use any kind of client access (such as MySQL Command Client, MySQL Workbench, Navicat etc.) that is compatible of MySQL/PostgreSQL protocol to operate data.

  • Totally transparent to applications, it can be used directly as MySQL and PostgreSQL server.
  • Applicable to any kind of compatible client end 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 the access to the database in the form of sidecar. It provides a mesh layer interacting with the database, we call this as Database Mesh.

Database Mesh emphasizes on how to connect distributed data-access applications with the databases. Focusing on interaction, it effectively organizes the interaction between messy applications and the databases. The applications and databases those 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 decentralized architecture, applicable to high-performance light-weight OLTP applications developed with Java; ShardingSphere-Proxy provides static entry and all languages support, applicable for OLAP applications and the sharding databases management and operation situation.

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

ShardingSphere Hybrid Architecture

Features

Data Sharding

  • Database sharding & Table sharding
  • Read-write splitting
  • 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.

shardingsphere's People

Contributors

avalon566 avatar beckhampu avatar betterjava avatar cherrylzhao avatar chidaodezhongsheng avatar codefairy08 avatar dongzl avatar geomonlin avatar hanahmily avatar haocao avatar happybyr avatar harper0122 avatar jingshanglu avatar kimmking avatar komachision avatar maxiaoguang64 avatar menghaoranss avatar oracle219 avatar qiankunshe avatar saaavsaaa avatar stenicholas avatar strongduanmu avatar sunbufu avatar terrymanu avatar tristazero avatar tuohai666 avatar wgy8283335 avatar wqzwh avatar yanyzy avatar yu199195 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.