In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the principle of database middleware". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the principle of database middleware"?
Key points of database middleware design
To be able to parse SQL
Can support read-write separation
Can support load balancing read from the library
Support sub-database operation
Support sub-table operation
Support cross-library association queries
Support for transaction processing
Primary key ID generation
Data source management
Database split
Advantages
Shortcoming
Slicing rule: the most important point of horizontal split
The splitting rules are abstract, and the join operation can basically be done in the database.
There is no performance bottleneck of single library big data and high concurrency.
There is less modification on the application side.
Improve the stability and load capacity of the system.
Split rules are difficult to abstract
The consistency of fragment transaction is difficult to solve.
It is difficult to expand the data many times and has a great amount of maintenance.
Poor performance of cross-library join
Range: time, numeric
List: by region, by organization, by category
Hash: hash (a field)% number of shards, consistent hash
Compound multiple ways
Advantages:
Shortcoming
After the split, the business is clear and the split rules are clear.
It is easy to integrate or expand between systems
Data maintenance is simple
Some business tables can not be join, so they can only be solved by interface, which increases the complexity of the system.
Due to the different limitations of each business, there is a performance bottleneck of a single database, so it is not easy to expand data and improve performance.
Transaction processing is complex
Vertical split: for example, according to the order table and the user table, put them into different databases
Horizontal split: split tables with large amounts of data, such as splitting user data into different libraries for storage
The technical difficulties of sub-database and sub-table: whether it is vertical split or horizontal split, the following difficulties will be introduced:
The problem of introducing distributed transactions
The problem of cross-node join
Cross-node merge sorting paging problem
Multi-data source management problem
Implementation Mode of Database Middleware
Client mode: integrate the database middleware module in the application, configure one or more data sources needed by the management application, and access each data source, complete the data integration in the module, suitable for small systems, typically sharding-jdbc
Server agent mode: all data sources are managed uniformly through the intermediate agent layer, and the back-end database cluster is transparent to the front-end applications and easy to expand the database. Stand-alone services provide stronger processing power and are suitable for large and complex systems, typically Mycat
At this point, I believe you have a deeper understanding of "what is the principle of database middleware". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.