apache/shardingsphere


Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.dangdangdotcom:sharding-jdbc:5.5.2'
	}
	dependencies {
		implementation("com.github.dangdangdotcom:sharding-jdbc:5.5.2")
	}
	<dependency>
	    <groupId>com.github.dangdangdotcom</groupId>
	    <artifactId>sharding-jdbc</artifactId>
	    <version>5.5.2</version>
	</dependency>

                            
    libraryDependencies += "com.github.dangdangdotcom" % "sharding-jdbc" % "5.5.2"
        
        

                            
    :dependencies [[com.github.dangdangdotcom/sharding-jdbc "5.5.2"]]
        
        

Readme


Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.

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

GitHub Release Lines of Code

CI Quality Gate Status Technical Debt Maintainability Rating Security Rating codecov

OpenSSF Best Practices

Slack Gitter

Twitter

<table style="width:100%"> <tr> <th> <a href="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map?activity=stars&repo_id=49876476" target="_blank" style="display: block" align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=stars&repo_id=49876476&image_size=auto&color_scheme=dark" width="721" height="auto"> <img alt="Star Geographical Distribution of apache/shardingsphere" src="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=stars&repo_id=49876476&image_size=auto&color_scheme=light" width="721" height="auto"> </picture> </a> </th> <th> <a href="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map?activity=pull-request-creators&repo_id=49876476" target="_blank" style="display: block" align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=pull-request-creators&repo_id=49876476&image_size=auto&color_scheme=dark" width="721" height="auto"> <img alt="Pull Request Creator Geographical Distribution of apache/shardingsphere" src="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=pull-request-creators&repo_id=49876476&image_size=auto&color_scheme=light" width="721" height="auto"> </picture> </a> </th> <th> <a href="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map?activity=issue-creators&repo_id=49876476" target="_blank" style="display: block" align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=issue-creators&repo_id=49876476&image_size=auto&color_scheme=dark" width="721" height="auto"> <img alt="Issue Creator Geographical Distribution of apache/shardingsphere" src="https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?activity=issue-creators&repo_id=49876476&image_size=auto&color_scheme=light" width="721" height="auto"> </picture> </a> </th> </tr> </table>

OVERVIEW

<hr>

Apache ShardingSphere is a distributed SQL transaction & query engine that allows for data sharding, scaling, encryption, and more - on any database. Our community's guiding development concept is Database Plus for creating a complete ecosystem that allows you to transform any database into a distributed database system.

It focuses on repurposing existing databases, by placing a standardized upper layer above existing and fragmented databases, rather than creating a new database.

The goal is to provide unified database services and minimize or eliminate the challenges caused by underlying databases' fragmentation. This results in applications only needing to communicate with a single standardized service.

The concepts at the core of the project are Connect, Enhance and Pluggable.

  • Connect: Flexible adaptation of database protocol, SQL dialect and database storage. It can quickly connect applications and heterogeneous databases.
  • Enhance: Capture database access entry to provide additional features transparently, such as: redirect (sharding, readwrite-splitting and shadow), transform (data encrypt and mask), authentication (security, audit and authority), governance (circuit breaker and access limitation and analyze, QoS and observability).
  • Pluggable: Leveraging the micro kernel and 3 layers pluggable mode, features and database ecosystem can be embedded flexibly. Developers can customize their ShardingSphere just like building with LEGO blocks.

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

So far, ShardingSphere has been used by over 15,000 projects on GitHub.

AI ABSTRACTION

ShardingSphere wiki which is generated by DeepWiki automatically.

DOCUMENTATION📜

<hr>

EN doc CN doc

For full documentation & more details, visit: Docs

CONTRIBUTION🚀🧑💻

<hr>

For guides on how to get started and setup your environment, contributor & committer guides, visit: Contribution Guidelines

Team

<hr>

We deeply appreciate community contributors for their dedication to Apache ShardingSphere.

COMMUNITY & SUPPORT💝🖤

<hr>

:link: Mailing List. Best for: Apache community updates, releases, changes.

:link: GitHub Issues. Best for: larger systemic questions/bug reports or anything development related.

:link: GitHub Discussions. Best for: technical questions & support, requesting new features, proposing new features.

:link: Slack channel. Best for: instant communications and online meetings, sharing your applications.

:link: Twitter. Best for: keeping up to date on everything ShardingSphere.

:link: LinkedIn. Best for: professional networking and career development with other ShardingSphere contributors.

STATUS👀

<hr>

:white_check_mark: Version 5.5.2: released :tada:

🔗 For the release notes, follow this link to the relevant GitHub page.

:soon: Version 5.5.3

We are currently working towards our 5.5.3 milestone. Keep an eye on the milestones page of this repo to stay up to date.

How it Works

<hr>

Apache ShardingSphere includes 2 independent products: JDBC & Proxy. They all provide functions of data scale-out, distributed transaction and distributed governance, applicable in a variety of situations such as Java-based isomorphism, heterogeneous language and Cloud-Native.

ShardingSphere-JDBC

<hr>

Maven Status

A lightweight Java framework providing 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.

:link: For more details, follow this link to the official website.

ShardingSphere-Proxy

<hr>

Nightly-Download Download Docker Pulls

A transparent database proxy, providing a database server that encapsulates the database binary protocol to support heterogeneous languages. Friendlier to DBAs, the MariaDB, MySQL and PostgreSQL version now provided can use any kind of terminal.

:link: For more details, follow this link to the official website.

Hybrid Architecture

<hr>

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

Through the combination of ShardingSphere-JDBC & ShardingSphere-Proxy together with a unified sharding strategy by the same registry center, the ShardingSphere ecosystem can build an application system suitable to all kinds of scenarios.

:link: More details can be found following this link to the official website.

Solution

<hr>

| Solutions/Features | Distributed Database | Data Security | Database Gateway | Stress Testing | |----------------------|-------------------------|----------------------|-----------------------------------|------------------| | | Data Sharding | Data Encryption | Heterogeneous Databases Supported | Shadow Database | | | Read/write Splitting | Row Authority (TODO) | SQL Dialect Translate (TODO) | Observability | | | Distributed Transaction | SQL Audit (TODO) | | | | | Elastic Scale-out | SQL Firewall (TODO) | | | | | High Availability | | | |

Roadmap

<hr>

Roadmap

How to Build Apache ShardingSphere

<hr>

Check out Wiki section for details on how to build Apache ShardingSphere and a full guide on how to get started and setup your local dev environment.

Landscapes

<hr> <p align="center"> <br/><br/> <img src="https://landscape.cncf.io/images/cncf-landscape-horizontal-color.svg" width="165"/>&nbsp;&nbsp;<img src="https://www.cncf.io/wp-content/uploads/2023/04/cncf-main-site-logo.svg" width="200"/> <br/><br/> Apache ShardingSphere enriches the <a href="https://landscape.cncf.io/?category=app-definition-and-development&grouping=category">CNCF CLOUD NATIVE Landscape</a>. </p>