shardingsphere README

The project's README from github.com/apache/shardingsphere. As one markdown file: README.md.

Apache ShardingSphere - Enterprise Distributed Database Ecosystem

Building the standards and ecosystem on top of heterogeneous databases, empowering enterprise data architecture transformation

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

Gitter

X

Star Geographical Distribution of apache/shardingsphere Pull Request Creator Geographical Distribution of apache/shardingsphere Issue Creator Geographical Distribution of apache/shardingsphere

OVERVIEW


Apache ShardingSphere is positioned as Database Plus, a standard and ecosystem built on top of heterogeneous databases. As an operating system layer above databases, ShardingSphere does not create new databases but focuses on maximizing the computing capabilities of existing databases, providing unified data access and enhanced computing capabilities.

Database Plus Core Concept: By building a standardized and scalable enhancement layer above databases, it makes heterogeneous databases as simple to use as a single database, providing unified governance capabilities and distributed computing capabilities for enterprise data architectures.

Connect, Enhance, and Pluggable are the three core pillars of Apache ShardingSphere:

Differentiation Advantages:

ShardingSphere became an Apache Top-Level Project on April 16, 2020, and has been adopted by 19,000+ projects worldwide.

DUAL-ACCESS ARCHITECTURE DESIGN


ShardingSphere adopts a unique dual-access architecture design, providing two access ends - JDBC and Proxy - that can be deployed independently or in hybrid deployment, meeting diverse requirements for different scenarios.

ShardingSphere-JDBC: Lightweight Access End

Positioning: Lightweight Java framework, enhanced JDBC driver

Core Features:

Use Cases: High-performance Java applications, integrated deployment with business applications, pursuing ultimate performance

ShardingSphere-Proxy: Enterprise Access End

Positioning: Transparent database proxy, independently deployed server-side

Core Features:

Use Cases: Heterogeneous language environments, database operation and maintenance management, enterprise applications requiring unified access entry

Hybrid Architecture Advantages

By hybridizing ShardingSphere-JDBC and ShardingSphere-Proxy with unified configuration through the same registry center, you can flexibly build application systems suitable for various scenarios:

AI ABSTRACTION

DeepWiki zread

DOCUMENTATION📜


EN doc CN doc

For full documentation & more details, visit: Docs

CONTRIBUTION🚀🧑💻


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

Team


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

COMMUNITY & SUPPORT💝🖤


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

:link: GitHub Issues. Best for: design discussions, bug reports, or anything development related.

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

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

PROJECT STATUS


:white_check_mark: Version 5.5.4-SNAPSHOT: Actively under development :tada:

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

:soon: Version 5.5.4

We are currently developing version 5.5.4, which includes multiple security enhancements and performance optimizations. Keep an eye on the milestones page of this repo for the latest development progress.

TECHNICAL ARCHITECTURE EVOLUTION


Apache ShardingSphere adopts a micro-kernel + 3-layer pluggable architecture, achieving complete decoupling of the kernel, functional components, and ecosystem integration, providing developers with ultimate flexibility and extensibility.

Micro-Kernel + 3-Layer Pluggable Model

Core Layer:

Feature Layer:

Ecosystem Layer:

Technical Innovation Highlights

Complete Decoupling Architecture:

Apache ShardingSphere consists of two access ends - JDBC and Proxy - that can be deployed independently or in hybrid deployment, providing unified distributed database solutions for diverse application scenarios including Java isomorphism, heterogeneous languages, and cloud-native environments.

ShardingSphere-JDBC


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.

Note: When using ShardingSphere-JDBC adapter, pay attention to your application's memory configuration. Antlr uses an internal cache to improve performance during SQL parsing. If your application has too many SQL templates, the cache will continue to grow, occupying a large amount of heap memory. According to feedback from the ANTLR official issue#4232, this issue has not yet been optimized. When connecting your application to ShardingSphere-JDBC, it is recommended to set a reasonable heap memory size using the -Xmx parameter to avoid OOM errors caused by insufficient memory.

ShardingSphere-Proxy


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


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.

CORE FEATURE MATRIX


Distributed Database Core Capabilities

Data Security & Governance

Database Gateway Capabilities

shardingsphere (apache/shardingsphere)

Searching Database…

Что это такое?Топ-уровневый проект Apache, позиционируемый как 'Database Plus': слой поверх ваших уже существующих разнородных баз данных, который добавляет распределённый SQL — шардирование, разделение чтения и записи, шифрование — и не требует их замены.
Это библиотека, которую я подключаю к своему приложению, или отдельный сервер, который я разворачиваю?И то и другое, так задумано: ShardingSphere-JDBC — это улучшенный JDBC-драйвер (JAR внутри вашего Java-приложения), а ShardingSphere-Proxy — независимо разворачиваемый прозрачный прокси для базы данных. Их можно использовать и вместе, в гибридном варианте.
С чего мне начать?Для Java добавьте ShardingSphere-JDBC как JAR-зависимость — никакого дополнительного развёртывания не нужно. Иначе разверните ShardingSphere-Proxy как отдельный сервер и направьте на него любой клиент MySQL или PostgreSQL. Полная документация есть на официальном сайте.
Обязательно ли писать на Java, чтобы им пользоваться?Java нужна, только если вы выберете вариант с JDBC. ShardingSphere-Proxy говорит на родных бинарных протоколах MySQL и PostgreSQL, поэтому клиенты на любом языке подключаются к нему, как к обычному серверу базы данных.
Есть ли подводные камни, о которых стоит знать до использования JDBC-драйвера?ANTLR-парсер JDBC-драйвера кеширует разобранный SQL, и при большом количестве SQL-шаблонов кеш растёт и может исчерпать память кучи (OOM). В README советуют выставить разумный размер кучи -Xmx для вашего приложения.
Можно ли использовать ShardingSphere-JDBC и ShardingSphere-Proxy вместе?Да — гибридная архитектура является полноценным режимом. Обе части подключаются через один и тот же центр регистрации (registry center) с единой стратегией шардирования, поэтому высокопроизводительные Java-приложения OLTP могут работать через JDBC, а Proxy обслуживает другие языки, OLAP-нагрузки и задачи администрирования БД.
Насколько проект зрелый?16 апреля 2020 года он стал топ-уровневым проектом Apache, а в README сказано, что его взяли на вооружение более 19 000 проектов по всему миру. Версия 5.5.4-SNAPSHOT активно разрабатывается, а в 5.5.4 появилось несколько улучшений безопасности и оптимизаций производительности.
Что подключаемая архитектура означает на практике?Микроядро с тремя слабо связанными слоями: базовый слой (оптимизатор запросов, распределённые транзакции, движок выполнения), слой возможностей (шардирование, шифрование, маскирование, аудит, теневая база данных) и слой экосистемы (адаптация протоколов баз данных, интеграция с центром регистрации). Возможности комбинируются по необходимости — в README это сравнивается со сборкой из кубиков LEGO.
Creator
apache
Size
690.9 MB
Stars
20.8K
Age
10y
Commits · 90 Days