Mysql 体系结构系列之六

来源:互联网 发布:c语言中实型常量 编辑:程序博客网 时间:2024/05/18 20:35

前言:接上一篇Mysql 体系结构系列之五: 核心模块之间的交互

Mysql 体系结构系列之五 http://blog.csdn.net/u010993297/article/details/9704493

1. 核心模块之间的交互 Interaction of the Core Modules

<<-------第十四段 讲的是服务器配置为从服务器:初始化模块-从服务器模块-SQL Thread | I/O thread------->>

If the server is configured as areplication slave, the Initialization Modulewill call the  Replication Slave Module, which in turn will start two threads, called theSQLThread and theI/O thread.

如果服务部被配置为从服务器,那么初始化模块将调用从服务器模块。该模块将启动两个线程:SQL线程和I/O线程。

 

They take care of propagating updates that happened on the master to the slave.

他们负责将主数据库的更新传送到从服务器上。

 

It is possible for thesame server to be configured as both a master and a slave.

同一台服务器即可配置为主服务器,也可配置为从服务器。

<<-------第十五段 讲的是客户端/服务器协议模块—低层次网络I/O 模块------->>

Network communication with a client goes through the Client/Server Protocol Module,which is responsible forpackaging the data in the proper format, and depending on the connection settings,compressing it.

与客户端的网络通信通过客户端/服务器协议模块进行,该模块负责以合适的格式打包数据,然后根据连接设置进行压缩。

 

The Client/Server Protocol Module in turn uses theLow-Level Network I/O module, which is responsible for sending and receiving the data on thesocket level in a cross-platform portable way.

客户端/服务器协议模块使用低层次网络I/O模块,该模块负责以跨平台可移植方式在套接字层上发送和接收数据。

 

It is also responsible forencrypting the data using the  OpenSSL library calls if the connection options are set appropriately.

如果选项设置恰当,该模块还可以使用OpenSSL库调用,负责对数据加密。

 

<<-------第十六段 讲的是核心API------->>

As they perform theirrespective tasks, the core components of the server heavily rely on the Core API.

在执行各自任务的时候,服务器的核心组件极度地依赖核心API

 

The Core API provides a rich functionality set, which includes file I/O, memory management, string manipulation, implementations of various data structures and algorithms, and many other usefulcapabilities.

核心API提供了丰富的功能集,包括文件I/O、内存管理、字符串操作、各种数据结构和算法的实现以及其他有用的功能。

 

MySQL developers are encouraged to avoid direct libc calls, and use the  Core API to facilitate ports to newplatforms and  code optimizationin the future.

Mysql开发人员最好避免直接调用libc,要使用核心API来实现调用,这有利于以后移植到新的系统平台、以及优化代码。

 

Interaction of the core modules is end. We will take a closer look at each of the components in the later study.

 

附图,温习一下。核心模块之间的交互。

                                                            图1   核心模块的交互

 

 

原创粉丝点击