Breaking the Limits of Relational Databases: An Analysis of Cloud-Native Database Middleware (1)


1. Vertical Sharding

2. Horizontal Sharding

  1. In NewSQL with the new architecture, the database storage engine is redesigned to store the data from the same table in a distributed file system.
  2. In the sharding middleware, the impacts of sharding are transparent to users, allowing them to use a horizontally sharded database as a common database.

3. Read/Write Separation

4. Key Processes

Protocol Adaptation

  1. The payload length is of the int❤> type. It indicates the total number of bytes occupied by the subsequent payload. Note that the payload length does not include the length of the sequence ID.
  2. The sequence ID is of the int<1> type. It indicates the serial number of each MySQL packet returned for a request. The maximum sequence ID that occupies one byte is 0xff, that is, 255 in decimal notation. However, this does not imply that a request can only contain up to 255 MySQL packets. If the sequence ID exceeds 255, the sequence ID restarts from zero. For example, hundreds of thousands of records may be returned for a request. In this case, the MySQL packets only need to ensure that their sequence IDs are continuous. If the sequence ID exceeds 255, it is reset and restarts from zero.
  3. The length of the payload is the bytes declared by the payload length. In a MySQL packet, the payload is the actual business data. The content of the payload varies with the packet type.

SQL Parsing

Request Routing

SQL Statement Rewriting

Results Merging

  1. Stream merging is used for simple queries, Order By queries, Group By queries, and Order By and Group By scenarios where the Order By and Group By items are completely consistent. The “next” method is called each time to traverse the stream merging result set without consuming additional memory resources.
  2. Memory merging requires that all data in the result sets must be loaded to the memory for processing. If the result sets contain a large volume of data, lots of memory resources are consumed accordingly.




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

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

Recommended from Medium

How I Got the Summer Internship Offer from Facebook

Developer Options in Android

What’s InsureDAO?

Python For Beginners: The range() Function (or Data Type?) Syntax

Install Centos 7 on the Parallels Desktop— 1

Serverless: dissecting the jargon (part 1)

Band Protocol August 2020 Community Update

Snake Game Dev Diary #2

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
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

More from Medium

Multitenant Architecture — Tenant Modeling

Using Apache Pulsar WebSockets for Real-Time Messaging in Front-End Applications

Configure a database version control tool for your Spring-boot project

Software Architecture in GCP— Use Pub/Sub with Cloud Storage to process data automatically when…