ShardingSphere 4.x SPI

Background

In Apache ShardingSphere, many functionality implementation are uploaded through SPI. Service Provider Interface (SPI) is a kind of API for the third party to implement or expand, which can be applied in framework expansion or component replacement.

Apache ShardingSphere uses SPI to expand in order to optimize overall architecture design at most. It is to enable premier users, who have implemented interfaces provided by Apache ShardingSphere, to dynamically load self-defined implementation types. Therefore, it can satisfy their practical requirements for different scenarios, while keeping architecture integrity and functional stabilization.

This chapter has provided all the Apache ShardingSphere functional modules that are loaded through SPI. Users with no special requirements can use them to implement corresponding functions after simple configurations. Premier users can develop self-defined implementations, referring to interfaces of existing functional modules. Welcome to feed your self-defined implementations to the open-source community, benefiting more users.

SQL Passing

The SQL parsing interface is used to regulate ANTLR file for SQL parse.

Its main interface is SQLParserEntry and built-in implementation types are MySQLParserEntry, PostgreSQLParserEntry, SQLServerParserEntry and OracleParserEntry.

Please refer to SQL Parsing for the introduction.

Database Protocol

The database protocol interface is used to regulate parse and adapter protocol of database access for Sharding-Proxy.

Its main interface is DatabaseProtocolFrontendEngine and built-in implementation types are MySQLProtocolFrontendEngine and PostgreSQLProtocolFrontendEngine.

Data Masking

The Data masking interface is used to regulate the encryption, decryption, access type, property configuration and other methods of the encryptor.

There are mainly two interfaces, ShardingEncryptor and ShardingQueryAssistedEncryptor and built-in implementation types are AESShardingEncryptor and MD5ShardingEncryptor.

Please refer to Data Masking for the introduction.

Distributed Primary Key

The distributed primary key interface is to regulate how to generate overall auto-increment, type access and property configurations.

Its main interface is ShardingKeyGenerator and built-in implementation types are UUIDShardingKeyGenerator and SnowflakeShardingKeyGenerator.

Please refer to Distributed Primary Key for the introduction.

Distributed Transaction

The distributed transaction interface is to regulate how to adapter distributed transaction to local transaction API.

Its main interface is ShardingTransactionManager and built-in implementation types are XAShardingTransactionManager and SeataATShardingTransactionManager.

Please refer to Distributed Transaction for the introduction.

XA Transaction Manager

The XA transaction manager interface is to regulate how to adapter XA transaction manager’s implementors to unified XA transaction manager API.

Its main interface is XATransactionManager and built-in implementation types are AtomikosTransactionManager, NarayanaXATransactionManager and BitronixXATransactionManager.

Please refer to XA Transaction Manager for the introduction.

Registry Center

The registry center interface is used to regulate its initialization, data storage, data upgrade, monitoring and others.

Its main interface is RegistryCenter and built-in implementation types are Zookeeper.

Please refer to Available Registry Center for the introduction.

--

--

--

Transform any DBMS in a distributed database system & enhance it with sharding, elastic scaling features & more. https://linktr.ee/ApacheShardingSphere

Love podcasts or audiobooks? Learn on the go with our new app.

Google’s TPU Research Cloud! Free TPU hardware for Deep learning Projects…

ShardingSphere 4.x Orchestration-available config center/registry center

Coding Games to improve problem-solving skills and level up your Coding Skills.

5 Trending Java Courses for Future Android Developers

BLUEHOST REVIEW

Which of the following is not a container-based alternative to Docker?

Which of the following is not a container-based alternative to Docker? | @iSwamiK

Vim + Language Server Protocol-in 2019.

Saving Data between two Scenes in Unity

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Apache ShardingSphere

Apache ShardingSphere

Transform any DBMS in a distributed database system & enhance it with sharding, elastic scaling features & more. https://linktr.ee/ApacheShardingSphere

More from Medium

Community Column #6 — Bridgesplit Degen Mode Plays

Correcting (ϵ, δ) misconception in differential privacy

CS373 Spring 2022: Blake Chambers — Blog 14

8 Fallacies of Distributed Systems