Mysql 体系结构系列之二

上一篇 Mysql 体系结构系列之一:http://blog.csdn.net/u010993297/article/details/9373521

1.Mysql 模块的高层次视图

                                                        图1-1  High-level view of MySQL modules

我们可以参考上一篇的体系结构图,一起来学习mysql的体系架构。这里是以模块的角度来分析mysql的架构:

a module is a piece of  code that logically belongs together in some way, and performs a certain critical function in the server.

模块是在逻辑上某种方式结合在一起的一段代码,能在服务器中完成某种重要功能。


从图1-1中可以识别一下的模块:

>>Server Initialization Module            服务器初始化模块
>>Connection Manager                      连接管理器
>>Thread Manager                              线程管理器
>>Connection Thread                         连接线程
>>User Authentication Module          用户验证模块
>>Access Control Module                  访问控制模块    
>>Parser                                                解析器
>>Command Dispatcher                   命令调度器
>>Query Cache Module                     查询高速缓存模块
>>Optimizer                                         优化器
>>Table Manager                               表管理器
>>Table Modification Modules         表修改模块
>>Table Maintenance Module          表维护模块
>>Status Reporting Module             状态报告模块
>>Abstracted Storage Engine Interface (Table Handler)              抽象存储引擎接口(表处理器)        
>>Storage Engine Implementations (MyISAM, InnoDB, MEMORY, Berkeley DB)         存储引擎实现(MyISAM,InnoDB,MEMORY,Berkeley DB)       
>>Logging Module                              日志记录模块
>>Replication Master Module           主复制服务器模块
>>Replication Slave Module              从复制服务器模块
>>Client/Server Protocol API             客户端/服务器协议API
>>Low-Level Network I/O API           低层次网络I/O API
>>Core API                                           核心API

 

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

注:这块的内容,大概是有些困难的,理解,特别是纯英文的解释,但是耐心的看下去,一小段一小段的消化下去,还是很有裨益的,理解了这部分的内容,下面的内容会更容易进入。

先来看第一段英文吧。。

<<-------第一段 讲的是初始化模块转接到连接管理器----->>

 When the server is started on the command line ,the initialization module takes control.  

当通过命令行启动服务器时,控制权被初始化模块接过来。

It parses the configuration file and the command-line arguments, allocates global memory buffers, initializes global variables and structures, loads the access control tables, and performs a number of other initialization tasks.

它解析配置文件和命令行参数、分配全局存储缓冲区、初始化全局变量和结构,加载和访问控制表,执行其他一些初始化任务。

Once the initialization job is complete, the initialization module passes control to theconnection manager, which starts listening for connections from clients in a loop.

一旦完成初始化任务,初始化模块交给连接管理器,连接管理器开始监听来自回路中的客户端连接。

 

<<-------第二段 讲的是连接管理器转到线程管理器,再到连接线程,再到用户验证模块----->>

When a client connects to the database server, theconnection manager performs a number of low-level network protocol tasks and then passes control to thethread manager, which in turn supplies a thread to handle the connection (which from now on will be referred to as the connection thread).

当客户端连接到数据库服务器时,连接管理器执行大量低层次网络协议任务,然后将控制权传递给线程管理器,线程管理器随后提供一个线程,用于处理连接(以下称为连接线程)。

The connection thread might be created anew, or retrieved from the thread cache and called to active duty. Once the connection threadreceives control, it first invokes the user authentication module.The credentials of the connecting user are verified, and the client may now issue requests.

连接线程既可以重新创建,也可以从线程高速缓存中提取并被提取并被调用。一旦连接线程得到控制权,它首先调用用户验证模块,连接用户的证书经过验证后,客户端这时则可以发出请求。

 

今天到这里,下次待续,继续学习整理。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值