CN110990458B - Distributed database system, interface communication middleware - Google Patents
Distributed database system, interface communication middleware Download PDFInfo
- Publication number
- CN110990458B CN110990458B CN201911217663.8A CN201911217663A CN110990458B CN 110990458 B CN110990458 B CN 110990458B CN 201911217663 A CN201911217663 A CN 201911217663A CN 110990458 B CN110990458 B CN 110990458B
- Authority
- CN
- China
- Prior art keywords
- management
- container
- database system
- oceanbase
- communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/547—Messaging middleware
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及数据库技术领域,具体而言,涉及一种基于微服务架构的OceanBase分布式数据库系统以及与分布式数据库系统相对应的接口通信中间件。The present invention relates to the technical field of databases, in particular to an OceanBase distributed database system based on a microservice architecture and interface communication middleware corresponding to the distributed database system.
背景技术Background technique
现如今数据库架构大都基于开源数据库进行设计,很多的API接口并不适用,并且数据库性能和数据冗余等情况也较多。现如今的大部分自主可控的数据库稳定性差:客户不敢用它承担关键业务(甚至是普通业务);生态环境差:成型应用少,合作开发商少。这些问题导致了数据库行业的逐渐衰微,但是OceanBase系统则有不同,其性能良好,保证完整运行的同时也能保证系统处于长期运维状态,此外,OceanBase性能测试极佳,针对大规模部署也具有极强的优势,采用微服务架构方便大规模分布式集群部署,同时可以大大减少维护时间。但是相应的,OceanBase对于系统要求较高,搭建起来极其困难,其微服务架构以及配套设计方案还未有人提出一个合理的方案,其较弱的可插拔性导致其应用范围和应用领域受限,同时二次开发API接口未有一个极好的设计,基于数据库进行开发十分困难。Nowadays, most database architectures are designed based on open source databases, many API interfaces are not applicable, and there are many situations such as database performance and data redundancy. Most of today's self-controllable databases have poor stability: customers dare not use them to undertake key businesses (or even ordinary businesses); the ecological environment is poor: there are few forming applications and few cooperative developers. These problems have led to the gradual decline of the database industry, but the OceanBase system is different. Its performance is good, and it can ensure complete operation while ensuring that the system is in a long-term operation and maintenance state. In addition, OceanBase has excellent performance tests and is suitable for large-scale deployment. Strong advantages, the use of micro-service architecture facilitates large-scale distributed cluster deployment, and can greatly reduce maintenance time. But correspondingly, OceanBase has high requirements for the system, and it is extremely difficult to build. No one has proposed a reasonable solution for its microservice architecture and supporting design scheme, and its weak pluggability limits its application scope and application field. , At the same time, the secondary development API interface does not have an excellent design, and it is very difficult to develop based on the database.
发明内容Contents of the invention
本发明在于提供一种基于微服务架构的OceanBase分布式数据库系统、接口通信中间件,其能够缓解上述问题。The present invention is to provide an OceanBase distributed database system and interface communication middleware based on a microservice architecture, which can alleviate the above-mentioned problems.
为了缓解上述的问题,本发明采取的技术方案如下:In order to alleviate the above-mentioned problems, the technical scheme that the present invention takes is as follows:
第一方面,本发明提供了一种分布式数据库系统,包括OceanBase数据库系统,OceanBase数据库系统包括OceanBase管理程序和OceanBase数据存储程序,该分布式数据库系统还包括:In the first aspect, the present invention provides a distributed database system, including the OceanBase database system, the OceanBase database system includes the OceanBase management program and the OceanBase data storage program, and the distributed database system also includes:
分布式物理集群,其包括三台数据库从机和一台管理主机,所述管理主机和所述数据库从机均创建有系统镜像;A distributed physical cluster, which includes three database slaves and a management host, the management host and the database slaves are all created with a system image;
四个容器,分别为一个管理容器和三个数据容器,所述OceanBase数据库系统的OceanBase数据存储程序一一对应的创建于各数据容器之内,所述OceanBase数据库系统的OceanBase管理程序创建于所述管理容器内,三个所述数据容器分别创建于三台所述数据库从机上,所述管理容器创建于所述管理主机上,所述管理容器用于对输入的命令字节流进行解析并分发给各数据容器执行,各数据容器执行命令后得到的结果字节流回发给管理容器进行加密;The four containers are respectively a management container and three data containers, and the OceanBase data storage program of the OceanBase database system is created in each data container correspondingly, and the OceanBase management program of the OceanBase database system is created in the In the management container, the three data containers are respectively created on the three database slaves, the management container is created on the management host, and the management container is used to analyze and distribute the input command byte stream Execute for each data container, and the result byte stream obtained after each data container executes the command is sent back to the management container for encryption;
Docker Swarm集群,其用于管理所述容器,其包括创建于所述管理主机上的swarm管理节点、创建于各数据主机的swarm工作节点;A Docker Swarm cluster, which is used to manage the container, includes a swarm management node created on the management host, and a swarm work node created on each data host;
overlay跨域网络,其创建于所述管理主机上,并生成虚拟网卡net,四个容器通过虚拟网卡net通信连接,所述管理容器与各数据容器之间能够实现ssh内联互通;overlay cross-domain network, which is created on the management host, and generates a virtual network card net, and the four containers are connected through the virtual network card net communication, and ssh inline intercommunication can be realized between the management container and each data container;
微服务,其创建于所述管理主机上,用于实现OceanBase管理程序和OceanBase数据存储程序的资源调度和管理。Microservices, which are created on the management host, are used to implement resource scheduling and management of the OceanBase management program and the OceanBase data storage program.
本技术方案的技术效果是:基于容器的快速部署性,容器个体脱离集群,不会影响集群的整体运行,单独模块的创建和脱离不会影响整个分布式架构的性能和运行,因此具有可插拔性;数据库系统在添加扩展时,可以在不同主机上通过微服务进行构建,能够快速激活相同的各业务模块,并且将服务置于同一个网段,当服务需要进行快速拓展时,可以实现基于微服务设计脚本的集群脚本化一键部署,因此具备高可拓展性;在保证高可用性的同时,也保障了源生系统主机的安全性,针对系统数据库的攻击和骚扰被转移到容器中,本机环境得到一定的保障。The technical effect of this technical solution is: based on the rapid deployment of the container, the container individual leaves the cluster without affecting the overall operation of the cluster, and the creation and separation of individual modules will not affect the performance and operation of the entire distributed architecture, so it has pluggable Pullability; when adding extensions to the database system, it can be built through microservices on different hosts, which can quickly activate the same business modules and place the services on the same network segment. When the services need to be rapidly expanded, it can be realized The cluster scripted one-click deployment based on the microservice design script has high scalability; while ensuring high availability, it also guarantees the security of the original system host, and the attacks and harassment against the system database are transferred to the container , the local environment is guaranteed.
可选地,所述管理主机的软硬件需求为:Optionally, the software and hardware requirements of the management host are:
操作系统Deepin 15.11;Operating system Deepin 15.11;
内存:16G;Memory: 16G;
磁盘:400G;Disk: 400G;
文件系统:EXT4;File system: EXT4;
网卡:无线网卡;Network card: wireless network card;
Docker版本:18.03.1-ce;Docker version: 18.03.1-ce;
Docker镜像:CentOS Linux release 7.2-1511;Docker image: CentOS Linux release 7.2-1511;
Linux内核:3.10。Linux kernel: 3.10.
本技术方案的技术效果是:保证架构和程序的正常运行。The technical effect of the technical solution is to ensure the normal operation of the framework and the program.
可选地,所述系统镜像为CentOS镜像,其是基于Dockerfile构建。Optionally, the system image is a CentOS image, which is constructed based on Dockerfile.
本技术方案的技术效果是:CentOS易于维护,且使用广泛,版本稳定,在同类操作系统中性能最好,容易上手。The technical effect of the technical solution is: CentOS is easy to maintain, widely used, stable in version, best in performance among similar operating systems, and easy to use.
第二方面,本发明提供了一种接口通信中间件,该接口通信中间件与上述分布式数据库系统相对应,且包括:In a second aspect, the present invention provides an interface communication middleware, the interface communication middleware corresponds to the above-mentioned distributed database system, and includes:
SQL指令定义模块,用于对SQL关键字进行定义;SQL instruction definition module, used to define SQL keywords;
SQL指令分析模块,用于对客户机输入的SQL命令进行关键字识别,并转换成命令字节流;The SQL command analysis module is used to identify the keywords of the SQL commands input by the client and convert them into command byte streams;
通信过程加密模块,用于对命令字节流进行加密;The communication process encryption module is used to encrypt the command byte stream;
通信协议分析模块,用于对命令字节流所采用的通信协议进行分析,并告知管理容器;The communication protocol analysis module is used to analyze the communication protocol adopted by the command byte stream, and inform the management container;
通信连接模块,用于与管理主机建立通信,并将加密后的命令字节流发送给管理容器;The communication connection module is used to establish communication with the management host, and send the encrypted command byte stream to the management container;
结果处理模块,用于对管理容器返回的结果字节流进行解密以及拼接处理,并将拼接处理结果返回给客户机。The result processing module is used for decrypting and splicing the result byte stream returned by the management container, and returning the splicing processing result to the client computer.
本技术方案的技术效果是:通过该接口通信中间件,能够在一定程度上扩宽分布式数据库系统的应用场景和应用领域,使得原有数据库的使用更加便捷,增加程序开发的便捷性;该接口通信中间件相对轻量化,安装简单,方便用户即时使用,通信效率高,且通信过程加密,能够很好保护通信过程不易被破解。The technical effect of this technical solution is: through the interface communication middleware, the application scenarios and application fields of the distributed database system can be expanded to a certain extent, making the use of the original database more convenient and increasing the convenience of program development; The interface communication middleware is relatively lightweight, easy to install, convenient for users to use immediately, high communication efficiency, and the communication process is encrypted, which can well protect the communication process from being cracked.
进一步地,所述接口通信中间件用于安装在客户机,以使客户机与所述分布式数据库系统能够通过所述接口通信中间件进行通信。Further, the interface communication middleware is used to be installed on the client computer, so that the client computer and the distributed database system can communicate through the interface communication middleware.
本技术方案的技术效果是:屏蔽了操作系统的底层差异,能够实现跨平台快速开发。The technical effect of the technical solution is that the underlying difference of the operating system is shielded, and rapid cross-platform development can be realized.
进一步地,所述通信过程加密模块所采用的加密算法为sha256算法。Further, the encryption algorithm adopted by the communication process encryption module is the sha256 algorithm.
本技术方案的技术效果是:sha256算法较其他加密算法更为常见,其HASH链更长,能够更有效的抵御破解和攻击。The technical effect of this technical solution is: the sha256 algorithm is more common than other encryption algorithms, and its HASH chain is longer, which can more effectively resist cracking and attacking.
进一步地,所述通信连接模块的通信方式为socket通信方式。Further, the communication mode of the communication connection module is socket communication mode.
本技术方案的技术效果是:采用socket通信的方法能够有效保证数据不丢失,在数据库访问这样大量的长连接的使用场景下,能够更有效且牢靠的提供通信,且传输数据为字节级,传输时间短且性能高,适合用于管理主机和客户机之间的交互通信,且数据可加密。The technical effect of this technical solution is: the method of socket communication can effectively ensure that data is not lost, and in the use scenario of a large number of long connections such as database access, it can provide communication more effectively and reliably, and the transmission data is at the byte level, Short transfer times and high performance are suitable for managing interactive communications between host and client, and data can be encrypted.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举本发明实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, the embodiments of the present invention will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1是实施例中所述分布式数据库系统的架构图;Fig. 1 is the architectural diagram of the distributed database system described in the embodiment;
图2是实施例中所述接口通信中间件的架构图;Fig. 2 is the architectural diagram of the interface communication middleware described in the embodiment;
图3是实施例中所述接口通信中间件的工作流程图。Fig. 3 is a working flow chart of the interface communication middleware in the embodiment.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. The components of the embodiments of the invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations.
因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Accordingly, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例1Example 1
请参照图1,本实施例提供了一种分布式数据库系统,包括:OceanBase数据库系统,其包括OceanBase管理程序和OceanBase数据存储程序;分布式物理集群,其包括三台数据库从机和一台管理主机,管理主机和数据库从机均创建有系统镜像;四个容器,分别为一个管理容器和三个数据容器,OceanBase数据库系统的OceanBase数据存储程序一一对应的创建于各数据容器之内,OceanBase数据库系统的OceanBase管理程序创建于管理容器内,三个数据容器分别创建于三台数据库从机上,管理容器创建于管理主机上,管理容器用于对输入的命令字节流进行解析并分发给各数据容器执行,各数据容器执行命令后得到的结果字节流回发给管理容器进行加密;Docker Swarm集群,其用于管理容器,其包括创建于管理主机上的swarm管理节点、创建于各数据主机的swarm工作节点;overlay跨域网络,其创建于管理主机上,并生成虚拟网卡net,四个容器通过虚拟网卡net通信连接,管理容器与各数据容器之间能够实现ssh内联互通;微服务,其创建于管理主机上,用于实现OceanBase管理程序和OceanBase数据存储程序的资源调度和管理。Please refer to Fig. 1, the present embodiment provides a kind of distributed database system, including: OceanBase database system, it includes OceanBase management program and OceanBase data storage program; Distributed physical cluster, it includes three database slaves and a management The host, management host, and database slave are all created with system images; four containers are a management container and three data containers, and the OceanBase data storage program of the OceanBase database system is created in each data container correspondingly. OceanBase The OceanBase management program of the database system is created in the management container. The three data containers are respectively created on the three database slaves. The management container is created on the management host. The management container is used to analyze the input command byte stream and distribute it to each The data container is executed, and the result byte stream obtained after each data container executes the command is sent back to the management container for encryption; the Docker Swarm cluster is used to manage the container, which includes the swarm management node created on the management host, and the swarm management node created on each data container. The swarm working node of the host; the overlay cross-domain network, which is created on the management host and generates a virtual network card net, and the four containers are connected through the virtual network card net communication, and the management container and each data container can realize ssh inline intercommunication; The service, which is created on the management host, is used to realize the resource scheduling and management of the OceanBase management program and the OceanBase data storage program.
在本实施例中,管理主机的软硬件需求为:操作系统Deepin 15.11;内存:16G;磁盘:400G;文件系统:EXT4;网卡:无线网卡;Docker版本:18.03.1-ce;Docker镜像:CentOSLinux release 7.2-1511;Linux内核:3.10。In this embodiment, the software and hardware requirements of the management host are: operating system Deepin 15.11; memory: 16G; disk: 400G; file system: EXT4; network card: wireless network card; Docker version: 18.03.1-ce; Docker image: CentOSLinux release 7.2-1511; Linux kernel: 3.10.
在本实施例中,管理主机和数据库从机的系统镜像为CentOS镜像,CentOS镜像是基于Dockerfile构建。整个的Dockerfile共有如下8个部分:拉取基础镜像,安装基础软件依赖,安装OceanBase所需软件依赖,SSH的config文件配置,添加admin用户并授予权限,下载OceanBase安装包,修改系统配置信息,完成防火墙配置。In this embodiment, the system images of the management host and the database slave are CentOS images, and the CentOS images are constructed based on Dockerfile. The entire Dockerfile has the following 8 parts: pull the basic image, install the basic software dependencies, install the software dependencies required by OceanBase, configure the SSH config file, add the admin user and grant permissions, download the OceanBase installation package, modify the system configuration information, and complete Firewall configuration.
在本实施例中,DockerSwarm集群、微服务、跨域网络以及容器的创建过程具体如下:In this embodiment, the process of creating a DockerSwarm cluster, microservice, cross-domain network, and container is as follows:
1)在管理主机上搭建Docker Swarm集群:在性能相对更好的管理主机上建立swarm管理节点,进行初始化,之后在三台数据库从机添加swarm工作节点,通过dockernodels进行查看,完成集群部署。1) Build a Docker Swarm cluster on the management host: build a swarm management node on a management host with relatively better performance, initialize it, and then add a swarm working node to the three database slaves, check it through dockernodels, and complete the cluster deployment.
2)在管理主机的DockerSwarm集群上创建overlay跨域网络,在管理主机上通过命令“docker network create--driver=overlay–attachablenet”完成跨域网络net的创建,生成net虚拟网卡,之后令三台数据库从机加入到跨域网络net。2) Create an overlay cross-domain network on the DockerSwarm cluster of the management host, and complete the creation of the cross-domain network net on the management host through the command "docker network create--driver=overlay-attachablenet", generate a net virtual network card, and then make three The database slave machine is added to the cross-domain network net.
3)在管理主机上创建部署脚本docker-compose.yml。docker-compose.yml包括虚拟网卡net、系统镜像、Docker Swarm集群。在管理主机运行“docker compose”创建微服务,创建3+1容器(三台数据容器+一台管理容器),管理容器负责调度数据库容器资源,并且和相应外界的数据库请求。3) Create a deployment script docker-compose.yml on the management host. docker-compose.yml includes virtual network card net, system image, and Docker Swarm cluster. Run "docker compose" on the management host to create microservices and create 3+1 containers (three data containers + one management container). The management container is responsible for scheduling database container resources and responding to external database requests.
在本实施例中,OceanBase数据库系统是分布式数据库系统的程序主体和容器内的主要运行模块,OceanBase数据库系统的部署过程具体如下:In this embodiment, the OceanBase database system is the program body of the distributed database system and the main operating module in the container. The deployment process of the OceanBase database system is as follows:
1)对管理主机、数据库从机和各容器进行性能调优,配置最大线程数,修改交换内存;1) Perform performance tuning on the management host, database slave and each container, configure the maximum number of threads, and modify the swap memory;
2)在完成搭建3+1容器后,管理容器对三个数据容器的ssh内联互通,实现ssh无密码登录;2) After the 3+1 container is built, the ssh inline communication between the management container and the three data containers is realized to realize ssh passwordless login;
3)在管理容器上创建/home/admin/ob-deploy目录,拷贝安装包中的deploy.py文件到该目录之后执行命令,生成目标目录bin目录。3) Create the /home/admin/ob-deploy directory on the management container, copy the deploy.py file in the installation package to this directory and execute the command to generate the target directory bin directory.
4)在管理容器上解压OceanBase安装包,拷贝observer和obproxy到bin目录4) Unzip the OceanBase installation package on the management container, copy observer and obproxy to the bin directory
5)修改管理容器和数据容器的ssh默认端口,在此基础上生成并修改observer配置文件修改IP配置地址。5) Modify the ssh default port of the management container and data container, and then generate and modify the observer configuration file to modify the IP configuration address.
6)运行./deploy.py ob1.reboot进行管理容器对数据容器服务部署,运行./deploy.py ob1.sql,通过这步连接到Docker Swarm集群。6) Run ./deploy.py ob1.reboot to deploy the management container to the data container service, run ./deploy.py ob1.sql, and connect to the Docker Swarm cluster through this step.
7)测试无误,对管理容器进行打包,生成新的Docker镜像,将服务的部署过程生成新的docker-compose.yml。7) The test is correct, the management container is packaged, a new Docker image is generated, and a new docker-compose.yml is generated during the service deployment process.
实施例2Example 2
请参照图2,本实施提供了一种接口通信中间件,该接口通信中间件与实施例1中的分布式数据库系统相对应,且包括:Please refer to Fig. 2, this implementation provides a kind of interface communication middleware, this interface communication middleware corresponds to the distributed database system in embodiment 1, and includes:
SQL指令定义模块,用于对SQL关键字进行定义;SQL instruction definition module, used to define SQL keywords;
SQL指令分析模块,用于对客户机输入的SQL命令进行关键字识别,并转换成命令字节流;The SQL command analysis module is used to identify the keywords of the SQL commands input by the client and convert them into command byte streams;
通信过程加密模块,用于对命令字节流进行加密;The communication process encryption module is used to encrypt the command byte stream;
通信协议分析模块,用于对命令字节流所采用的通信协议进行分析,并告知管理容器;The communication protocol analysis module is used to analyze the communication protocol adopted by the command byte stream, and inform the management container;
通信连接模块,用于与管理主机建立通信,并将加密后的命令字节流发送给管理容器;The communication connection module is used to establish communication with the management host, and send the encrypted command byte stream to the management container;
结果处理模块,用于对管理容器返回的结果字节流进行解密以及拼接处理,并将拼接处理结果返回给客户机。The result processing module is used for decrypting and splicing the result byte stream returned by the management container, and returning the splicing processing result to the client computer.
在本实施例中,接口通信中间件用于安装在客户机,以使客户机与分布式数据库系统能够通过接口通信中间件进行通信;通信过程加密模块所采用的加密算法为sha256算法;通信连接模块的通信方式为socket通信方式。In this embodiment, the interface communication middleware is used to be installed on the client computer, so that the client computer and the distributed database system can communicate through the interface communication middleware; the encryption algorithm adopted by the communication process encryption module is the sha256 algorithm; the communication connection The communication mode of the module is socket communication mode.
请参照图2和图3,本实施例所述接口通信中间件的使用方法如下:Please refer to Fig. 2 and Fig. 3, the use method of the interface communication middleware described in this embodiment is as follows:
1、客户机完成sql命令设计,进行请求模拟,通过调用接口的SQL指令定义模块,将命令块转换为命令字节流;1. The client completes the sql command design, simulates the request, and converts the command block into a command byte stream by calling the SQL command definition module of the interface;
2、通过通信连接模块向管理容器发送连接请求,在发送请求之前,通信连接模块需要对容器所采用的通信协议进行分析,对sql指令进行分析,将命令字节流通过通信过程加密模块加密;2. Send a connection request to the management container through the communication connection module. Before sending the request, the communication connection module needs to analyze the communication protocol adopted by the container, analyze the sql command, and encrypt the command byte stream through the communication process encryption module;
3、若连接失败,则直接结束整个过程,若连接成功,则创建套接字连接,将加密后的命令字节流传给管理容器,并继续执行步骤4;3. If the connection fails, the whole process will be ended directly. If the connection is successful, a socket connection will be created, the encrypted command bytes will be transmitted to the management container, and step 4 will be continued;
4、管理容器接收到命令字节流,对命令字节流进行解析并分发给各数据容器执行命令,各数据容器进行数据库的检索,得到结果字节流,管理容器对结果字节流进行相同的加密措施,之后回发送给结果处理模块;4. The management container receives the command byte stream, parses the command byte stream and distributes it to each data container to execute the command, and each data container searches the database to obtain the result byte stream, and the management container performs the same processing on the result byte stream. Encryption measures, and then sent back to the result processing module;
5、结果处理模块对管理容器返回的结果字节流进行解密以及拼接处理,并将拼接处理结果返回给客户机;5. The result processing module decrypts and splices the result byte stream returned by the management container, and returns the splicing processing result to the client;
6、客户机关闭数据库连接,完成整个过程。6. The client computer closes the database connection to complete the whole process.
以上仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911217663.8A CN110990458B (en) | 2019-12-03 | 2019-12-03 | Distributed database system, interface communication middleware |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911217663.8A CN110990458B (en) | 2019-12-03 | 2019-12-03 | Distributed database system, interface communication middleware |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110990458A CN110990458A (en) | 2020-04-10 |
| CN110990458B true CN110990458B (en) | 2023-04-18 |
Family
ID=70089320
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911217663.8A Expired - Fee Related CN110990458B (en) | 2019-12-03 | 2019-12-03 | Distributed database system, interface communication middleware |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110990458B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115344547A (en) * | 2022-07-26 | 2022-11-15 | 中国电子科技集团公司第二十九研究所 | Method for accessing HDFS file system in cross-platform mode |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2013070141A2 (en) * | 2011-11-11 | 2013-05-16 | Qliktech International Ab | A method and a device for data analysis in a multidimensional cube data structure |
| WO2015172020A1 (en) * | 2014-05-08 | 2015-11-12 | Tru Optik Data Corp. | Tru torrent platform methods, apparatuses and media |
| CN106372367A (en) * | 2016-09-30 | 2017-02-01 | 浙江大学 | Visual simulation method for Argo float ocean product |
| WO2018197928A1 (en) * | 2017-04-28 | 2018-11-01 | Lzlabs Gmbh | Containerized deployment of microservices based on monolithic legacy applications |
| EP3401809A1 (en) * | 2017-05-12 | 2018-11-14 | QlikTech International AB | Method for querying indexed, partitioned dimension tables |
| CN109803018A (en) * | 2019-01-24 | 2019-05-24 | 云南电网有限责任公司信息中心 | A kind of DCOS cloud management platform combined based on Mesos and YARN |
| CN109918359A (en) * | 2019-01-18 | 2019-06-21 | 华南理工大学 | Database service persistence method and system based on swarm |
| WO2019143412A1 (en) * | 2018-01-19 | 2019-07-25 | Umajin Inc. | Configurable server kit |
| CN110149396A (en) * | 2019-05-20 | 2019-08-20 | 华南理工大学 | A kind of platform of internet of things construction method based on micro services framework |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE102016002549A1 (en) * | 2016-01-18 | 2017-07-20 | Roland Harras | Method for the multi-layered protection of (login) data, in particular passwords |
| US20180088935A1 (en) * | 2016-09-27 | 2018-03-29 | Ca, Inc. | Microservices application configuration based on runtime environment |
-
2019
- 2019-12-03 CN CN201911217663.8A patent/CN110990458B/en not_active Expired - Fee Related
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2013070141A2 (en) * | 2011-11-11 | 2013-05-16 | Qliktech International Ab | A method and a device for data analysis in a multidimensional cube data structure |
| WO2015172020A1 (en) * | 2014-05-08 | 2015-11-12 | Tru Optik Data Corp. | Tru torrent platform methods, apparatuses and media |
| CN106372367A (en) * | 2016-09-30 | 2017-02-01 | 浙江大学 | Visual simulation method for Argo float ocean product |
| WO2018197928A1 (en) * | 2017-04-28 | 2018-11-01 | Lzlabs Gmbh | Containerized deployment of microservices based on monolithic legacy applications |
| EP3401809A1 (en) * | 2017-05-12 | 2018-11-14 | QlikTech International AB | Method for querying indexed, partitioned dimension tables |
| WO2019143412A1 (en) * | 2018-01-19 | 2019-07-25 | Umajin Inc. | Configurable server kit |
| CN109918359A (en) * | 2019-01-18 | 2019-06-21 | 华南理工大学 | Database service persistence method and system based on swarm |
| CN109803018A (en) * | 2019-01-24 | 2019-05-24 | 云南电网有限责任公司信息中心 | A kind of DCOS cloud management platform combined based on Mesos and YARN |
| CN110149396A (en) * | 2019-05-20 | 2019-08-20 | 华南理工大学 | A kind of platform of internet of things construction method based on micro services framework |
Non-Patent Citations (2)
| Title |
|---|
| "动态最优路径机制在网络存储中的应用";张文敬;《中国优秀硕士毕业论文》;20140531;全文 * |
| "面向大数据应用挑战的超级计算机设计";廖湘科;《上海大学学报》;20160226;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110990458A (en) | 2020-04-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20220318184A1 (en) | Virtual rdma switching for containerized applications | |
| US11138030B2 (en) | Executing code referenced from a microservice registry | |
| US10698717B2 (en) | Accelerator virtualization method and apparatus, and centralized resource manager | |
| US11561916B2 (en) | Processing task deployment in adapter devices and accelerators | |
| US11120148B2 (en) | Dynamically applying application security settings and policies based on workload properties | |
| CN104113574A (en) | Safe transfer method and system of wide area network trusted virtual machine | |
| US10652213B2 (en) | Agent-less micro-segmentation of a network | |
| TW202301118A (en) | Dynamic microservices allocation mechanism | |
| US11934289B2 (en) | Graph-based data multi-operation system | |
| Liechti | PySerial documentation | |
| CN103248670A (en) | Connection management in a computer networking environment | |
| CN110581848B (en) | Cloud desktop multi-network isolation system and method | |
| WO2022067160A1 (en) | Remote network and cloud infrastructure management | |
| CN110990458B (en) | Distributed database system, interface communication middleware | |
| US20210274021A1 (en) | Securing internal services in a distributed environment | |
| KR101883712B1 (en) | Method, apparatus and computer program for managing a network function virtualization system | |
| Lukaszewski et al. | Towards software defined layer 4.5 customization | |
| CN113342457A (en) | Kubernetes scheduling method based on registration and discovery of Eureka service | |
| CN108121587B (en) | A data acceleration method and virtual accelerator | |
| US12437115B2 (en) | Remote configuration changes over a security layer | |
| US12119987B1 (en) | Layer-specific modifications to network communications according to configurable rules at a proxy | |
| CN114860488B (en) | Fault tolerance method, performance verification method, electronic equipment and medium | |
| CN118714106A (en) | Communication method, computer device, storage medium and program product | |
| CN118689708A (en) | A microservice fuse method, device and storage medium | |
| CN117632351A (en) | Container deployment method and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20230418 |