KR20230017534A - Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding - Google Patents

Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding Download PDF

Info

Publication number
KR20230017534A
KR20230017534A KR1020210099141A KR20210099141A KR20230017534A KR 20230017534 A KR20230017534 A KR 20230017534A KR 1020210099141 A KR1020210099141 A KR 1020210099141A KR 20210099141 A KR20210099141 A KR 20210099141A KR 20230017534 A KR20230017534 A KR 20230017534A
Authority
KR
South Korea
Prior art keywords
sharding
proxy server
data
client
node
Prior art date
Application number
KR1020210099141A
Other languages
Korean (ko)
Other versions
KR102633926B1 (en
Inventor
라진성
Original Assignee
(주)제이엔테크놀러지
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by (주)제이엔테크놀러지 filed Critical (주)제이엔테크놀러지
Priority to KR1020210099141A priority Critical patent/KR102633926B1/en
Publication of KR20230017534A publication Critical patent/KR20230017534A/en
Application granted granted Critical
Publication of KR102633926B1 publication Critical patent/KR102633926B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A dual mode sharding system and method for supporting client sharding and proxy server sharding are provided. According to one embodiment of the present invention, the dual mode sharding system for supporting client sharding and proxy server sharding includes: a client which determines a sharding method of either client sharding or proxy server sharding; a proxy server node containing key distribution information; a plurality of data nodes; and a session manager.

Description

클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템 및 방법{Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding}Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding

본 발명은 데이터베이스 관리 시스템 (DataBase Management System) 에 관한 것이다. 보다 상세히, 동적 듀얼 모드 샤딩을 지원하는 분산 데이터베이스 관리 방법 및 구조에 관한 것이다.The present invention relates to a database management system. More specifically, it relates to a distributed database management method and structure supporting dynamic dual-mode sharding.

최근에 데이터의 양이 폭발적으로 증가하고 있음에 따라, 대량의 데이터를 처리하기 위하여 데이터를 분산하여 저장하는 기술이 빠르게 발전하고 있다. 그 중 샤딩 (Sharding) 은 관계형 데이터베이스에서 대량의 데이터를 처리하기 위해서 데이터를 파티셔닝 (Partioning) 하여 데이터를 분산 저장하고 처리하는 기술이다.Recently, as the amount of data has been explosively increased, a technology for distributing and storing data in order to process a large amount of data is rapidly developing. Among them, sharding is a technology for storing and processing data in a distributed manner by partitioning data in order to process large amounts of data in relational databases.

종래에, 샤딩 동작은 애플리케이션의 요구사항에 의해 하나의 방법으로 초기에 결정된다. Conventionally, sharding behavior is initially determined one way or another by the requirements of the application.

또한, 종래의 서버 측 샤딩 시스템의 경우 추가되는 데이터 노드가 증가할수록 성능향상을 기대하기 어려운 문제점이 있고, 클라이언트 샤딩 시스템의 경우 데이터 분산 정책이 변경되면 시스템 재구축 비용이 큰 단점이 있다.In addition, in the case of the conventional server-side sharding system, it is difficult to expect performance improvement as the number of added data nodes increases, and in the case of the client sharding system, the cost of rebuilding the system is high when the data distribution policy is changed.

이러한 단점을 극복하기 위해 서버 및 클라이언트 샤딩 시스템을 동시에 지원하는 듀얼 모드 샤딩 시스템 제공함으로써, 애플리케이션의 요구사항에 따른 두 가지 방향으로의 효율적인 데이터분산을 통해 성능 및 시스템의 최적화를 이룰 수 있다.In order to overcome these disadvantages, by providing a dual-mode sharding system that simultaneously supports server and client sharding systems, performance and system optimization can be achieved through efficient data distribution in two directions according to application requirements.

본 발명은, 듀얼 모드 샤딩을 지원하는 시스템에서 애플리케이션의 요구사항에 따라 샤딩 동작이 동적으로 선택되어 동작하게 하여, 성능 및 리소스의 효율적인 운영을 가능하게 하는 것을 과제로 한다.An object of the present invention is to enable efficient operation of performance and resources by dynamically selecting and operating a sharding operation according to the requirements of an application in a system supporting dual mode sharding.

상기 언급된 기술적 과제들을 해결하기 위한, 본 발명의 일 실시예에 따른 클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템은 클라이언트 샤딩 및 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 클라이언트; 키 분배 정보를 포함하는, 프록시 서버 노드; 복수개의 데이터 노드들; 및 세션 매니저를 포함하며, 상기 클라이언트는 사용자 입력에 의해 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 키 분배 정보의 제공 요청을 송신하며, 상기 프록시 서버 노드는 상기 키 분배 정보의 제공 요청에 대응하여 상기 키 분배 정보를 상기 클라이언트에 송신하고, 상기 클라이언트는 상기 키 분배 정보에 기초하여 상기 클라이언트 샤딩 및 상기 프록시서버 샤딩 중 어느 하나의 샤딩 방법을 결정하고, 상기 세션 매니저는, 상기 클라이언트 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 단일의 데이터 노드와 상기 클라이언트의 연결을 수행하며, 상기 세션 매니저는, 상기 프록시서버 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하며, 상기 세션 매니저는, 상기 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행할 때, 상기 프록시 서버 노드와 상기 2 이상의 데이터 노드 간의 연결을 순차적이 아닌 병렬적으로 동시에 처리하며, 상기 세션 매니저는, 상기 복수개의 데이터 노드들과의 연결을 미리 수행하지 않으며, 상기 샤딩 방법이 결정된 후에 연결 대상인 데이터 노드와 연결을 수행한다.In order to solve the above-mentioned technical problems, a dual mode sharding system supporting client sharding and proxy server sharding according to an embodiment of the present invention includes a client determining one of client sharding and proxy server sharding; a proxy server node, containing key distribution information; a plurality of data nodes; and a session manager, wherein the client receives a SQL query request based on a user input, transmits a request for providing key distribution information to the proxy server node, and the proxy server node responds to the request for providing key distribution information. to transmit the key distribution information to the client, the client determines one of the client sharding and the proxy server sharding method based on the key distribution information, and the session manager determines the client sharding In this case, a single data node among the plurality of data nodes is connected to the client, and the session manager connects two or more data nodes among the plurality of data nodes and the client when the proxy server sharding is determined. Connection of proxy server nodes is performed, and when the session manager connects the two or more data nodes and the proxy server node, the connection between the proxy server node and the two or more data nodes is performed in parallel rather than sequentially. simultaneous processing, and the session manager does not perform connection with the plurality of data nodes in advance, and performs connection with the data node to be connected after the sharding method is determined.

상기 프록시 서버 노드는 프록시 서버로서 동작하고, 샤드 구성 정보를 포함하며, 상기 데이터 노드는, 관계형 데이터 관리 시스템으로서, 데이터를 저장하는 기능을 수행할 수 있다.The proxy server node operates as a proxy server and includes shard configuration information, and the data node, as a relational data management system, may perform a function of storing data.

상기 클라이언트는 바도 키퍼 (Vado Keeper) 가 실행되는 서버이고, 상기 바도 키퍼가 상기 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 상기 키 분배 정보의 제공 요청을 송신하고, 상기 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정할 수 있다.The client is a server on which Vado Keeper is executed, the Vado Keeper receives the SQL query request, sends a request for providing the key distribution information to the proxy server node, and based on the key distribution information One of the client sharding and the proxy server sharding may be determined by determining whether a connection to a specific data node is required.

상기 바도 키퍼가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고, 상기 프록시 서버 노드가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있다.When the bardo keeper transmits a connection request to the data node when the client sharding is determined, receives a response to the connection request from the data node, and the proxy server node determines the proxy server sharding For example, a connection request may be received from the bardo keeper, and a connection request may be made to two or more data nodes among a plurality of data nodes in parallel and at the same time by checking a key value corresponding to the connection request.

상기 프록시 서버 노드 및 상기 데이터 노드는 독립적인 형태로 구축될 수 있고, 이중화될 수 있다. The proxy server node and the data node may be built in an independent form and may be duplicated.

상기 복수개의 데이터 노드들은, 상기 복수개의 데이터 노드들 각각에 대해 각각의 데이터 노드 구성 (configuration) 을 생성하고, 상기 복수개의 데이터 노드들 각각에 대해 각각의 샤드 테이블을 생성하고, 상기 각각의 샤드 테이블에 대한 인덱스 (index) 를 생성하고, 상기 각각의 샤드 테이블에 대해 샤딩 방식을 설정하고, 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법을 설정함으로써 구성될 수 있다.The plurality of data nodes generate each data node configuration for each of the plurality of data nodes, create each shard table for each of the plurality of data nodes, and create each shard table for each of the plurality of data nodes. It can be configured by creating an index for , setting a sharding method for each shard table, and setting a sharding operation for data input and an input method to the data node.

본 발명의 다른 실시예에 따른, 클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템에 의한 듀얼 모드 샤딩 방법으로서, 상기 듀얼 모드 샤딩 시스템은, 클라이언트 샤딩 및 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 클라이언트, 키 분배 정보를 포함하는 프록시 서버 노드, 복수개의 데이터 노드들, 및 세션 매니저를 포함하며, 상기 듀얼 모드 샤딩 방법은, 상기 클라이언트가 사용자 입력에 의해 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 키 분배 정보의 제공 요청을 송신하는 단계; 상기 프록시 서버 노드가 상기 키 분배 정보의 제공 요청에 대응하여 상기 키 분배 정보를 상기 클라이언트에 송신하는 단계; 상기 클라이언트가 상기 키 분배 정보에 기초하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 단계; 및 상기 세션 매니저가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 단일의 데이터 노드와 상기 클라이언트의 연결을 수행하며, 상기 세션 매니저가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하는 단계를 포함하고, 상기 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하는 단계에서, 상기 세션 매니저가, 상기 프록시 서버 노드와 상기 2 이상의 데이터 노드 간의 연결을 순차적이 아닌 병렬적으로 동시에 처리하고, 상기 세션 매니저는, 상기 복수개의 데이터 노드들과의 연결을 미리 수행하지 않으며, 상기 샤딩 방법이 결정된 후에 연결 대상인 데이터 노드와 연결을 수행한다.A dual mode sharding method using a dual mode sharding system supporting client sharding and proxy server sharding according to another embodiment of the present invention, wherein the dual mode sharding system uses any one of client sharding and proxy server sharding. a client that determines, a proxy server node including key distribution information, a plurality of data nodes, and a session manager, wherein the dual-mode sharding method comprises: the client receives a SQL query request by user input; sending a request for provision of key distribution information to the server node; transmitting, by the proxy server node, the key distribution information to the client in response to a request for provision of the key distribution information; determining, by the client, one of the client sharding and the proxy server sharding method based on the key distribution information; and when the client sharding is determined, the session manager connects a single data node among the plurality of data nodes with the client, and when the proxy server sharding is determined, the session manager connects the plurality of data nodes. and connecting two or more data nodes of the number of data nodes to the proxy server node, and in the step of connecting the two or more data nodes to the proxy server node, the session manager, the proxy server node. The connection between a node and the two or more data nodes is simultaneously processed in parallel rather than sequentially, and the session manager does not perform connection with the plurality of data nodes in advance, and the data node to be connected after the sharding method is determined. connect with

상기 바도 키퍼는, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고, 상기 프록시 서버 노드는, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있다.The bardo keeper, when the client sharding is determined, transmits a connection request to the data node and receives a response to the connection request from the data node, and the proxy server node, when the proxy server sharding is determined For example, a connection request may be received from the bardo keeper, and a connection request may be made to two or more data nodes among a plurality of data nodes in parallel and at the same time by checking a key value corresponding to the connection request.

상기 바도 키퍼가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하는 단계, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하는 단계를 포함하고, 상기 프록시 서버 노드가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하는 단계, 상기 연결 요청에 대응하여 키 값을 체크하여 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청하는 단계를 포함할 수 있다. When the client sharding is determined, by the bardo keeper, transmitting a connection request to the data node and receiving a response to the connection request from the data node, wherein the proxy server node comprises: When server sharding is determined, receiving a connection request from the bardo keeper, checking a key value in response to the connection request, and simultaneously requesting a connection to two or more data nodes among the plurality of data nodes in parallel. can include

상기 복수개의 데이터 노드들은, 상기 복수개의 데이터 노드들 각각에 대해 각각의 데이터 노드 구성 을 생성하고, 상기 복수개의 데이터 노드들 각각에 대해 각각의 샤드 테이블을 생성하고, 상기 각각의 샤드 테이블에 대한 인덱스를 생성하고, 상기 각각의 샤드 테이블에 대해 샤딩 방식을 설정하고, 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법을 설정함으로써 구성될 수 있다.The plurality of data nodes create each data node configuration for each of the plurality of data nodes, create each shard table for each of the plurality of data nodes, and create an index for each shard table. It can be configured by creating a shard table, setting a sharding method for each shard table, and setting a sharding operation for data input and an input method to a data node.

상기와 같은 본 발명에 따르면, 데이터 쿼리의 증가, 데이터 통합 등 다양한 애플리케이션의 요구사항에 따라 샤딩 동작이 동적으로 선택되어 동작하게 하여, 성능 및 리소스의 효율적인 운영이 가능하다.According to the present invention as described above, efficient management of performance and resources is possible by dynamically selecting and operating sharding operations according to the requirements of various applications such as increase in data queries and data integration.

도 1은 듀얼 모드 샤딩 시스템의 구조의 일 실시예를 나타낸 도면이다.
도 2는 듀얼 모드 샤딩 시스템에서의 동작의 일 실시예를 나타낸 도면이다.
도 3은 바도 키퍼가 샤딩 방법을 선택하는 알고리즘의 일 실시예를 나타낸 도면이다.
도 4는 클라이언트, 프록시 서버 노드, 데이터 노드 간의 연결 관계의 일 실시예를 나타낸 도면이다.
도 5는 클라이언트와 데이터 노드 간의 연결 및 프록시 서버 노드와 데이터 노드 간의 연결에 대한 병렬 처리의 일 실시예를 나타낸 도면이다.
도 6는 지연 준비 연결의 일 실시예를 나타낸 도면이다.
1 is a diagram illustrating an embodiment of a structure of a dual mode sharding system.
2 is a diagram illustrating one embodiment of operation in a dual mode sharding system.
3 is a diagram illustrating an embodiment of an algorithm for selecting a sharding method by a bado keeper.
4 is a diagram illustrating an embodiment of a connection relationship between a client, a proxy server node, and a data node.
5 is a diagram illustrating an embodiment of parallel processing for a connection between a client and a data node and a connection between a proxy server node and a data node.
6 is a diagram illustrating an embodiment of a delay ready connection.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명한다. 본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 게시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 게시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Advantages and features of the present invention, and methods of achieving them, will become clear with reference to the detailed description of the following embodiments taken in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below and may be implemented in various different forms, only the present embodiments make the disclosure of the present invention complete, and common knowledge in the art to which the present invention belongs. It is provided to completely inform the person who has the scope of the invention, and the present invention is only defined by the scope of the claims. Like reference numbers designate like elements throughout the specification.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms (including technical and scientific terms) used in this specification may be used in a meaning commonly understood by those of ordinary skill in the art to which the present invention belongs. In addition, terms defined in commonly used dictionaries are not interpreted ideally or excessively unless explicitly specifically defined.

본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다" 및/또는 "포함하는"은 언급된 구성요소 외에 하나 이상의 다른 구성요소의 존재 또는 추가를 배제하지 않는다.Terminology used herein is for describing the embodiments and is not intended to limit the present invention. In this specification, singular forms also include plural forms unless specifically stated otherwise in a phrase. As used in the specification, "comprising" and/or "comprising" does not exclude the presence or addition of one or more other elements other than the recited elements.

본 명세서에서 달리 언급되지 않는다면, "접속되는" 또는 “연결되는” 은 하나의 엘리먼트/특징이 다른 엘리먼트/특징과 직접적으로 접속 또는 연결되는 것 또는 타 엘리먼트/특징을 개재하여 간접적으로 접속 또는 연결되는 것을 포함할 수 있고, 반드시 기계적으로 바로 접속 또는 연결되는 것만을 의미하는 것은 아니다. 따라서, 도면들에 도시된 다양한 모식도들은 엘리먼트들과 컴포넌트들의 예시적인 배열들을 도시하지만, 추가의 중재 엘리먼트들, 디바이스들, 특징들 또는 컴포넌트들이 (도시된 엘리먼트들의 기능이 악영향을 받지 않는다고 가정할 때) 실제 실시형태에서 존재할 수도 있다.Unless otherwise stated in this specification, "connected" or "connected" means that one element/feature is directly connected or connected to another element/feature or indirectly connected or connected through another element/feature. It may include, and does not necessarily mean only directly connected or connected mechanically. Accordingly, while the various schematic diagrams shown in the drawings illustrate exemplary arrangements of elements and components, additional intervening elements, devices, features or components may be used (assuming that the functionality of the depicted elements is not adversely affected). ) may exist in an actual embodiment.

또한, 본 명세서에서 "전송하는" 또는 “수신하는” 은 전송자와 수신자 간에 정보를 직접 전송 또는 수신하는 것뿐만 아니라, 달리 언급되지 않는다면 타 객체를 개재하여 정보를 전송 또는 수신하는 것을 포함할 수 있다.In addition, "transmitting" or "receiving" in this specification may include not only directly transmitting or receiving information between the sender and the receiver, but also transmitting or receiving information through another object unless otherwise noted. .

이하, 도면을 참조하여 본 발명의 실시예들에 따른 듀얼 모드 샤딩 시스템 및 듀얼 모드 샤딩 시스템을 지원하는 방법에 대해 설명하기로 한다.Hereinafter, a dual mode sharding system and a method of supporting the dual mode sharding system according to embodiments of the present invention will be described with reference to drawings.

도 1 및 도 3을 참조하면, 본 발명의 일 실시예에 따른 클라이언트 샤딩 (11) 및 프록시 서버 샤딩 (21) 을 지원하는 듀얼 모드 샤딩 시스템은 클라이언트 (1), 프록시 서버 노드 (2), 데이터 노드 (3) 및 세션 매니저 (6) 를 포함한다.1 and 3, a dual mode sharding system supporting client sharding 11 and proxy server sharding 21 according to an embodiment of the present invention includes a client 1, a proxy server node 2, data node 3 and session manager 6.

도 1을 참조하면, 클라이언트 (1) 는 애플리케이션이 실행되는 서버일 수 있고, 바도 키퍼 (Vado Keeper) 가 실행되는 서버일 수 있으며, 바도 키퍼 (4) 에 의해 클라이언트 샤딩 (11) 및 프록시 서버 샤딩 (21) 중 어느 하나의 샤딩 방법을 결정할 수 있다. Referring to FIG. 1 , a client 1 may be a server running an application, and may be a server running Vado Keeper, and client sharding 11 and proxy server sharding by Vado Keeper 4 One of the sharding methods in (21) can be determined.

프록시 서버 노드 (2) 는 관계형 데이터베이스 관리 시스템 (Relational DataBase Management System, RDMS) 일 수 있고, 프록시 서버 역할을 수행할 수 있으며, 샤드(Shard) 구성 정보를 가지고 있을 수 있고, 데이터 노드 (3) 의 데이터 키(Key) 분배 정보를 갖고 있을 수 있다.The proxy server node (2) may be a Relational DataBase Management System (RDMS), may act as a proxy server, may have shard configuration information, and may have data node (3) It may have data key distribution information.

데이터 노드 (3) 는 관계형 데이터베이스 관리 시스템 (RDMS) 일 수 있고, 데이터 저장 역할을 수행할 수 있다.The data node 3 can be a relational database management system (RDMS) and can serve as a data store.

다음으로, 도 3을 참고하여, 바도 키퍼가 샤딩 방법을 선택하는 알고리즘을 기술한다.Next, referring to FIG. 3, an algorithm for selecting a sharding method by the bardo keeper will be described.

클라이언트 (1) 가 사용자 입력에 의해 SQL 질의 요청을 수신하면 클라이언트 (1) 의 바도 키퍼 (4) 가 상기 SQL 질의를 수신 (사용자 쿼리 분석, S100) 할 수 있다. 이 때, 바도 키퍼 (4) 는 프록시 서버 노드 (2) 에 키 분배 정보의 제공 요청을 송신할 수 있고, 프록시 서버 노드 (2) 는 키 분배 정보의 제공 요청에 대응하여 키 분배 정보를 클라이언트 (1) 에 송신할 수 있다. 이후, 바도 키퍼 (4) 는 SQL_Prepare 실행 (S200), key column 확인 (S300), SQL_BindParameter 실행 (S400) 및 key value 체크 (S500) 순서대로 동작할 수 있다.When the client 1 receives the SQL query request by user input, the bado keeper 4 of the client 1 can receive the SQL query (user query analysis, S100). At this time, the bado keeper 4 may transmit a request for provision of key distribution information to the proxy server node 2, and the proxy server node 2 may send the key distribution information in response to the request for provision of key distribution information to the client ( 1) can be sent to After that, Bado Keeper 4 can operate in the order of executing SQL_Prepare (S200), checking key columns (S300), executing SQL_BindParameter (S400), and checking key values (S500).

바도 키퍼 (4) 는 key value 체크 (S500) 단계에서, 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단할 수 있고, SQL 질의 결과 완성을 위해, 복수개의 데이터 노드들 중 단일 데이터 노드로의 연결이 필요한 경우에는 클라이언트 샤딩 (11) 이 수행되어 클라이언트 메인 동작을 하며, 복수개의 데이터 노드들 중 2 이상의 데이터 노드로의 연결이 필요한 경우에는 프록시 서버 샤딩 (21) 이 수행되어, 프록시 서버 메인 동작을 한다. 이 경우, 애플리케이션의 요구 사항에 부합하는 샤딩 방법이 선택됨에 따라 샤딩 동작이 동적으로 선택되어 동작하므로, 성능 및 리소스의 효율적인 운영이 가능하다.In the key value check step (S500), the bardo keeper 4 can determine whether a connection to a specific data node is required based on the key distribution information, and to complete the SQL query result, a single one of a plurality of data nodes When connection to a data node is required, client sharding (11) is performed to perform the client main operation, and when connection to two or more data nodes among a plurality of data nodes is required, proxy server sharding (21) is performed, Proxy server main operation. In this case, since the sharding operation is dynamically selected and operated according to the selection of the sharding method that meets the requirements of the application, efficient operation of performance and resources is possible.

세션 매니저 (6) 가, 클라이언트 샤딩 (11) 이 결정된 경우에는, 복수개의 데이터 노드들 중 단일의 데이터 노드와 클라이언트 (1) 의 연결을 수행하고, 세션 매니저 (6) 가, 프록시 서버 샤딩 (21) 이 결정된 경우에는, 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 프록시 서버 노드의 연결을 수행할 수 있다.When the client sharding 11 is determined, the session manager 6 connects a single data node among a plurality of data nodes with the client 1, and the session manager 6 performs proxy server sharding 21 ) is determined, two or more data nodes among a plurality of data nodes may be connected to the proxy server node.

도 2를 참조하면, 클라이언트 메인 동작에서, 클라이언트의 바도 키퍼 (4) 가 데이터 노드 (3) 로 가)요청 (12) 을 하고, 가)요청 (12) 을 받은 데이터 노드 (3) 은 가)요청 (12) 에 대한 가)응답 (13) 을 줄 수 있다.Referring to FIG. 2, in the client main operation, the bardo keeper (4) of the client a) makes a request (12) to the data node (3), and a) the data node (3) receiving the request (12) a) A) The response (13) can be given to the request (12).

프록시서버 메인 동작 (S20) 에서는, 클라이언트의 바도 키퍼 (4) 가 프록시 서버 노드 (2) 로 나)요청 (22) 을 하고, 나)요청 (22) 을 받은 프록시 서버 노드 (2) 는 Key value 체크에 의해 복수 개의 데이터 노드들 중 2 이상의 데이터 노드 (3) 로 병렬(Parallel) 동작으로 다)요청 (24) 을 할 수 있다. 다)요청 (24) 을 받은 데이터 노드 (3) 는 실행 결과를 프록시 서버 노드 (2) 로 다)응답 (25) 을 할 수 있다. 프록시 서버 노드 (3) 는 상기 복수 개의 데이터 노드들 중 2 이상의 데이터 노드 (3) 로부터 받은 응답들을 취합하여 클라이언트 (1) 에게로 나)응답 (23) 을 할 수 있다.In the proxy server main operation (S20), the client's bado keeper (4) makes b) a request (22) to the proxy server node (2), and b) the proxy server node (2) that received the request (22) sends a key value By checking, it is possible to make a request (24) to two or more data nodes (3) among a plurality of data nodes in a parallel operation. c) The data node (3) receiving the request (24) can make a response (25) with the execution result to the proxy server node (2). The proxy server node 3 may collect responses received from two or more data nodes 3 among the plurality of data nodes and send b) a response 23 to the client 1.

도 4를 참조하면, 듀얼 모드 샤딩 시스템은 클라이언트, 바도 키퍼 (4), 프록시 서버 노드 (2) 및 복수개의 데이터 노드들 (3) 을 포함하고 있다. 클라이언트는 프록시 서버 노드 및 데이터 노드와 샤드 연결 (Shard Connection) (31) 되며, 프록시 서버 노드 (2) 및 데이터 노드 (3) 간에는 메타 연결 (Meta Connection) (32) 된다.Referring to FIG. 4 , the dual-mode sharding system includes a client, a bado keeper 4, a proxy server node 2, and a plurality of data nodes 3. The client makes a shard connection (31) with the proxy server node and data node, and a meta connection (32) between the proxy server node (2) and the data node (3).

본 발명에서는, 프록시 서버 노드 및 데이터 노드를 독립적인 (Stand Alone) 형태로 구축 가능할 수 있고, 또한 프록시 서버 노드 및 데이터 노드 간 이중화를 이용할 수 있다.In the present invention, the proxy server node and the data node may be constructed in an independent form (Stand Alone), and redundancy between the proxy server node and the data node may be used.

본 발명에서는, 활성화된 데이터베이스 관리 시스템 (Active DBMS) 또는 대기 중인 데이터베이스 관리 시스템 (Standby DBMS) 이 하나의 물리 서버에 구축될 수 있다. 도 4를 참조하면, 본 발명의 일 실시예로서, 예를 들어, 8대의 DBMS가 구성될 수 있으며, 이 경우 활성화되어 정상적인 서비스를 제공하는 DBMS는 활성화된 DBMS이고, 예비적으로 구성된 DBMS는 대기 중인 DBMS에 해당된다.In the present invention, an active database management system (Active DBMS) or a standby database management system (Standby DBMS) can be built in one physical server. Referring to FIG. 4 , as an embodiment of the present invention, for example, 8 DBMSs can be configured, in which case the DBMS that is activated and provides normal service is the activated DBMS, and the DBMS that is pre-configured is standby. Corresponds to the current DBMS.

본 발명의 일 실시예로서, 이중화를 이용하는 것은 대기 중인 DBMS를 구성함으로써, 활성화된 DBMS가 파손될 경우에 대기 중인 DBMS를 사용할 수 있는 것이며, 이중화를 통해 안정적인 데이터 관리 기술을 제공할 수 있다.As an embodiment of the present invention, by configuring a standby DBMS to use redundancy, the standby DBMS can be used when an activated DBMS is damaged, and a stable data management technology can be provided through redundancy.

본 발명의 실시예로서, 이중화 동작 방식은, 예를 들어, 활성화된 DBMS의 이중화 송신 프로세서가 Redo Log (Transaction Logging File) 를 읽어서 이를 이중화용 Log로 가공하여 대기 중인 DBMS의 이중화 수신 프로세서에게 TCP/IP 통신을 통해 전송할 수 있는 것이다. 이중화 수신 프로세서는 수신된 이중화용 Log를 Transaction Log로 복구하여 대기 중인 DBMS에 반영할 수 있다. 활성화된 DBMS의 삽입/갱신/삭제에 해당하는 데이터 변경 사항을 대기 중인 DBMS에 동일하게 적용하게 되는 것이다.As an embodiment of the present invention, the duplication operation method is, for example, a duplication transmission processor of an activated DBMS reads a Redo Log (Transaction Logging File), processes it into a log for duplication, and sends a It can be transmitted through IP communication. The replication receiving processor can restore the received replication log to the transaction log and reflect it to the waiting DBMS. Data changes corresponding to insertion/update/deletion in the activated DBMS are applied to the waiting DBMS in the same way.

한편, 비용 부족 등의 이유로 대기 중인 DBMS이 구성되지 않고, 활성화된 DBMS만이 구성될 수 있는 경우가 Stand Alone에 해당한다. On the other hand, Stand Alone corresponds to the case where the standby DBMS is not configured due to lack of cost, etc., and only the activated DBMS can be configured.

다음으로, 본 발명에서의 일 실시예로서, 데이터 입력 또는 데이터 조회에 대한 클라이언트 메인 동작과 프록시 서버 메인 동작을 기술한다.Next, as an embodiment of the present invention, a client main operation and a proxy server main operation for data input or data inquiry will be described.

먼저, 데이터 입력을 위한 데이터 노드를 구성하는 일 예는 다음과 같다.First, an example of configuring a data node for data input is as follows.

/* 데이터 노드 구성을 생성 *//* create data node configuration */

create shard node1 with '192.168.0.11',22581;create shard node1 with '192.168.0.11',22581;

create shard node1 with '192.168.0.12',22581;create shard node1 with '192.168.0.12',22581;

/* 전체 데이터 노드에 대해 샤드 테이블을 생성 *//* Create shard table for all data nodes */

node [all]node [all]

create table tb_test1create table tb_test1

((

c1 integer primary key, c1 integer primary key,

c2 char(10), c2 char(10),

c3 integer, c3 integer,

c4 char(10), c4 char(10),

c5 char(10), c5 char(10),

c6 integer, c6 integer,

c7 date ); c7 date );

/* 샤드 테이블에 대한 index 생성 *//* Create an index for the shard table */

node[all]node[all]

create index TB_TEST1_IDX on TB_TEST1 (c3 desc, c1 asc);create index TB_TEST1_IDX on TB_TEST1 (c3 desc, c1 asc);

/* 데이터 노드의 테이블에 대해 샤딩 방식 설정 */ /* Set the sharding method for the data node table */

alter table tb_test1 shard by AUTOHASH(c1 )alter table tb_test1 shard by AUTOHASH(c1)

( (

shard node1, shard node1,

shard node2 shard-node2

); );

/* 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법 *//* Sharding operation for data input and input method to data node */

ex) hash값 가정( node1 = 0~4의 값, node2= 5~9 )ex) Assume hash value (node1 = value of 0~4, node2= 5~9)

a. insert into tb_test1 values( 0, 'x', 0, 'abc', '가나다', 1, sysdate); a. insert into tb_test1 values( 0, 'x', 0, 'abc', 'Kanada', 1, sysdate);

b. insert into tb_test1 values( 1, 'x', 0, 'abc', '가나다', 1, sysdate); b. insert into tb_test1 values( 1, 'x', 0, 'abc', 'Kanada', 1, sysdate);

c. insert into tb_test1 values( 2, 'x', 0, 'abc', '가나다', 1, sysdate); c. insert into tb_test1 values( 2, 'x', 0, 'abc', 'Kanada', 1, sysdate);

d. insert into tb_test1 values( 3, 'x', 0, 'abc', '가나다', 1, sysdate); d. insert into tb_test1 values( 3, 'x', 0, 'abc', 'Kanada', 1, sysdate);

e. insert into tb_test1 values( 4, 'x', 0, 'abc', '가나다', 1, sysdate); e. insert into tb_test1 values( 4, 'x', 0, 'abc', 'Kanada', 1, sysdate);

f. insert into tb_test1 values( 5, 'x', 0, 'abc', '가나다', 1, sysdate); f. insert into tb_test1 values( 5, 'x', 0, 'abc', 'Kanada', 1, sysdate);

g. insert into tb_test1 values( 6, 'x', 0, 'abc', '가나다', 1, sysdate); g. insert into tb_test1 values( 6, 'x', 0, 'abc', 'Kanada', 1, sysdate);

h. insert into tb_test1 values( 7, 'x', 0, 'abc', '가나다', 1, sysdate); h. insert into tb_test1 values( 7, 'x', 0, 'abc', 'Kanada', 1, sysdate);

i. insert into tb_test1 values( 8, 'x', 0, 'abc', '가나다', 1, sysdate); i. insert into tb_test1 values( 8, 'x', 0, 'abc', 'Kanada', 1, sysdate);

j. insert into tb_test1 values( 9, 'x', 0, 'abc', '가나다', 1, sysdate);j. insert into tb_test1 values( 9, 'x', 0, 'abc', 'Kanada', 1, sysdate);

본 발명의 듀얼 모드 샤딩 시스템에서는, 일 예로서, 데이터 입력에 대한 클라이언트 메인 동작이 이루어질 수 있다. 클라이언트 메인 동작은 애플리케이션 최초 구동 시에 바도 키퍼 (4) 에서 프록시 서버의 샤드 구성 정보를 로딩(loading) 하는 단계, 바도 키퍼 (4) 가 실행되는 SQL을 SQL_Prepare 실행, key column 확인, SQL_BindParameter() 실행을 순서대로 진행하는 단계를 포함한다. 바도 키퍼 (4) 는 키에 해당하는 바인드 값 (bind value) 의 샤드 키 값, 일 예로서, 해쉬(hash) 값을 기준으로 데이터 노드를 알 수 있다. 이후, 해당 데이터 노드에 대해서만 연결 (지연준비 연결(Deferred Preparation Connection)) 된다. 연결된 세션을 통해 SQL_execute를 실행하고 정상적인 경우 승인 요청 (success request) 을 받을 수 있다.In the dual mode sharding system of the present invention, as an example, a client main operation for data input may be performed. The client's main operation is the step of loading the shard configuration information of the proxy server in Bado Keeper (4) when the application is first started, SQL_Prepare execution of the SQL in which Bado Keeper (4) is executed, checking the key column, and executing SQL_BindParameter(). Including the steps to proceed in order. The bado keeper 4 can know a data node based on a shard key value of a bind value corresponding to the key, for example, a hash value. After that, only the corresponding data node is connected (Deferred Preparation Connection). You can execute SQL_execute through the connected session and receive a success request in normal cases.

본 발명에서의 일 예로서, 데이터 입력에 대한 클라이언트 메인 동작 과정은 다음과 같다.As an example in the present invention, the client main operation process for data input is as follows.

/* 각 SQL에 대한 동작과정 *//* Operation process for each SQL */

a. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,0) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request a. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,0) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request

b. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,1) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request b. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,1) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request

c. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,2) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request c. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,2) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request

d. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,3) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request d. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,3) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request

e. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,4) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request e. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,4) > node1 deferred preparation connection > SQL_execute > SQL_Sucess request

f. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,5) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request f. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,5) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request

g. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,6) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request g. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,6) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request

h. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,7) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request h. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,7) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request

i. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,8) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request i. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,8) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request

j. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,9) > node2 deferred preparation connection > SQL_execute > SQL_Sucess requestj. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,9) > node2 deferred preparation connection > SQL_execute > SQL_Sucess request

본 발명의 듀얼 모드 샤딩 시스템에서는, 일 예로서, 데이터 입력에 대한 프록시 서버 메인 동작이 이루어질 수 있다. 애플리케이션은 프록시 서버로의 일반적인 드라이버를 이용한 연결을 맺고 SQL을 실행할 수 있다. 프록시 서버의 메인 동작은 SQL_Prepare 실행, key column 확인, SQL_BindParameter() 실행, 노드 선택 단계를 순서대로 진행할 수 있다.In the dual mode sharding system of the present invention, as an example, a proxy server main operation for data input may be performed. The application can establish a connection using a generic driver to the proxy server and execute SQL. The main operation of the proxy server can proceed in the order of SQL_Prepare execution, key column check, SQL_BindParameter() execution, and node selection steps.

프록시 서버의 메인 동작은 키에 해당되는 바인드 값의 샤드 키 값, 일 예로서, 해쉬 값을 기준으로 데이터 노드를 알 수 있다. 이 때, 프록시 서버의 세션 매니저 (session manager) 에서 해당 데이터 노드로 드라이버 연결이 아닌 native connection (지연 준비 연결, 100) 이 생성된다. 연결된 세션 (session) 을 통해 SQL_execute를 실행하고 정상적인 경우 success request 를 받을 수 있다.The main operation of the proxy server is to know the data node based on the shard key value of the bind value corresponding to the key, for example, the hash value. At this time, a native connection (delay ready connection, 100), not a driver connection, is created from the session manager of the proxy server to the corresponding data node. You can execute SQL_execute through the connected session and receive a success request if it is normal.

본 발명에서의 일 예로서, 데이터 입력에 대한 프록시 서버 메인 동작 과정은 다음과 같다.As an example in the present invention, the proxy server main operation process for data input is as follows.

각 SQL에 대한 동작과정이다.This is the operation process for each SQL.

a. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,0) > node1 native connection > SQL_execute > SQL_Sucess request a. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,0) > node1 native connection > SQL_execute > SQL_Sucess request

b. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,1) > node1 native connection > SQL_execute > SQL_Sucess request b. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,1) > node1 native connection > SQL_execute > SQL_Sucess request

c. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,2) > node1 native connection > SQL_execute > SQL_Sucess request c. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,2) > node1 native connection > SQL_execute > SQL_Sucess request

d. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,3) > node1 native connection > SQL_execute > SQL_Sucess request d. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,3) > node1 native connection > SQL_execute > SQL_Sucess request

e. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,4) > node1 native connection > SQL_execute > SQL_Sucess request e. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,4) > node1 native connection > SQL_execute > SQL_Sucess request

f. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,5) > node2 native connection > SQL_execute > SQL_Sucess request f. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,5) > node2 native connection > SQL_execute > SQL_Sucess request

g. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,6) > node2 native connection > SQL_execute > SQL_Sucess request g. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,6) > node2 native connection > SQL_execute > SQL_Sucess request

h. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,7) > node2 native connection > SQL_execute > SQL_Sucess request h. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,7) > node2 native connection > SQL_execute > SQL_Sucess request

i. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,8) > node2 native connection > SQL_execute > SQL_Sucess request i. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,8) > node2 native connection > SQL_execute > SQL_Sucess request

j. (쿼리분석기)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,9) > node2 native connection > SQL_execute > SQL_Sucess requestj. (Query Analyzer) SQL_prepare > check key column c1 > SQL_bindParameter(1,9) > node2 native connection > SQL_execute > SQL_Sucess request

다음은, 데이터 조회에 대한 샤드 노드를 구성하는 일 예이다.The following is an example of configuring a shard node for data lookup.

/* 데이터 조회에 대한 샤드 동작 및 노드의 접근 방법 *//* Shard operation and node access method for data lookup */

ex) hash값 가정( node1 = 0~4의 값, node2= 5~9 )ex) Assume hash value (node1 = value of 0~4, node2= 5~9)

a. select * from tb_test1; a. select * from tb_test1;

b. select * from tb_test1 where c1=0;b. select * from tb_test1 where c1=0;

c. select * from tb_test1 where c1=4;c. select * from tb_test1 where c1=4;

d. select * from tb_test1 where c1=5;d. select * from tb_test1 where c1=5;

e. select * from tb_test1 where c1=9;e. select * from tb_test1 where c1=9;

본 발명의 시스템에서는, 데이터 조회에 대한 클라이언트 메인 동작이 이루어질 수 있다. 애플리케이션 최초 구동 시에 바도 키퍼에서 프록시 서버의 샤드 구성 정보를 로딩(loading)할 수 있다. 일반적인 발명의 클라이언트 쿼리의 경우 여러 노드에 대한 조회 SQL은 에러를 리턴하거나 사용 방법에 대한 가이드 알람이 발생하는데, 본원 발명은 프록시 서버로 SQL을 자동 이관함으로써 문제 없이 다음 절차로 SQL이 실행 된다.In the system of the present invention, a client main operation for data inquiry can be made. When the application is first started, bardo keeper can load the shard configuration information of the proxy server. In the case of a client query of a general invention, query SQL for several nodes returns an error or generates a guide alarm on how to use it. However, in the present invention, the SQL is executed in the following procedure without any problems by automatically transferring the SQL to the proxy server.

바도 키퍼는 실행되는 SQL을 SQL_Prepare 실행, key column 확인, SQL_BindParameter() 실행 단계를 순서대로 진행할 수 있다. 바도 키퍼는 키에 해당되는 바인드 값의 샤드 키 값, 일 예로서, 해쉬(hash) 값을 기준으로 데이터 노드를 알 수 있다.Bado Keeper can execute SQL_Prepare, check key column, and execute SQL_BindParameter() in order. The bado keeper can know the data node based on the shard key value of the bind value corresponding to the key, for example, a hash value.

이 때, SQL의 바인드 값에 따라, 단일 데이터 노드에 대한 연결 (지연 준비 연결) 이 생성되어 해당 데이터 노드에서 SQL_execute가 실행되고 그 결과를 클라이언트에 응답을 주거나, 복수의 데이터 노드에 대해 SQL을 실행하기 위해 프록시 서버로 SQL을 이관할 수 있고, 이 때, SQL을 이관 받은 프록시 서버는 각 데이터 노드로부터 SQL결과를 받아 취합하여 애플리케이션으로 응답을 줄 수 있다.At this time, according to the SQL bind value, a connection (delayed preparation connection) to a single data node is created, SQL_execute is executed on the data node, and the result is returned to the client or SQL is executed for multiple data nodes. In order to do this, the SQL can be transferred to the proxy server, and at this time, the proxy server that received the SQL can receive SQL results from each data node, collect them, and give a response to the application.

본 발명에서의 일 예로서, 각 SQL에 대한 동작과정과 결과는 다음과 같다.As an example in the present invention, the operation process and result for each SQL are as follows.

a. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(none) > 샤드프록시서버(쿼리분석기) > SQL_bindParameter(none) > node1,2 deferred preparation native connection > SQL_execute > Data merge > Data Fetch a. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(none) > Shard Proxy Server (Query Analyzer) > SQL_bindParameter(none) > node1,2 deferred preparation native connection > SQL_execute > Data merge > Data Fetch

C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7

----------------------------------------------------------------------------------------------------------------------------- -------------------------

1 x 0 abc 1 01-JUN-2021 1 x 0 abc 1 01-JUN-2021

3 x 0 abc 1 01-JUN-2021 3 x 0 abc 1 01-JUN-2021

5 x 0 abc 1 01-JUN-2021 5 x 0 abc 1 01-JUN-2021

7 x 0 abc 1 01-JUN-2021 7 x 0 abc 1 01-JUN-2021

8 x 0 abc 1 01-JUN-2021 8 x 0 abc 1 01-JUN-2021

0 x 0 abc 1 01-JUN-2021 0 x 0 abc 1 01-JUN-2021

2 x 0 abc 1 01-JUN-2021 2 x 0 abc 1 01-JUN-2021

4 x 0 abc 1 01-JUN-2021 4 x 0 abc 1 01-JUN-2021

6 x 0 abc 1 01-JUN-2021 6 x 0 abc 1 01-JUN-2021

9 x 0 abc 1 01-JUN-2021 9 x 0 abc 1 01-JUN-2021

10 rows selected.10 rows selected.

b. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,0) > node1 deferred preparation connection > SQL_execute > Data Fetch b. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,0) > node1 deferred preparation connection > SQL_execute > Data Fetch

C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7

----------------------------------------------------------------------------------------------------------------------------- -------------------------

0 x 0 abc 1 01-JUN-2021 0 x 0 abc 1 01-JUN-2021

1 row selected.1 row selected.

c. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,4) > node1 deferred preparation connection > SQL_execute > Data Fetch c. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,4) > node1 deferred preparation connection > SQL_execute > Data Fetch

C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7

----------------------------------------------------------------------------------------------------------------------------- -------------------------

4 x 0 abc 1 01-JUN-2021 4 x 0 abc 1 01-JUN-2021

1 row selected.1 row selected.

d. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,5) > node2 deferred preparation connection > SQL_execute > Data Fetch d. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,5) > node2 deferred preparation connection > SQL_execute > Data Fetch

C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7

----------------------------------------------------------------------------------------------------------------------------- -------------------------

5 x 0 abc 1 01-JUN-2021 5 x 0 abc 1 01-JUN-2021

1 row selected.1 row selected.

e. (vado_keeper)SQL_prepare > key column c1 확인 > SQL_bindParameter(1,9) > node2 deferred preparation connection > SQL_execute > Data Fetch e. (vado_keeper)SQL_prepare > check key column c1 > SQL_bindParameter(1,9) > node2 deferred preparation connection > SQL_execute > Data Fetch

C1 C2 C3 C4 C5 C6 C7 C1 C2 C3 C4 C5 C6 C7

----------------------------------------------------------------------------------------------------------------------------- -------------------------

9 x 0 abc 1 01-JUN-2021 9 x 0 abc 1 01-JUN-2021

1 row selected.1 row selected.

도 5를 참조하면, 프록시 서버 노드에서 메인 동작이 실행되면 서버 사이드 쿼리 (Server Side Query) 이고, 클라이언트에서 메인 동작이 실행되면 클라이언트 사이드 쿼리(Client Side Query) 이며, 이 때, 서버 사이드 쿼리 (52) 에서 데이터의 병렬 머지(Merge) 처리 주체는 프록시 서버 노드 (2) 가 되고, 클라이언트 사이드 쿼리 (51) 에서 데이터 병렬 머지 처리 주체는 클라이언트 (1) 의 바도 키퍼 (4) 가 된다.Referring to FIG. 5, if the main operation is executed on the proxy server node, it is a server side query (Server Side Query), and if the main operation is executed on the client, it is a client side query (Client Side Query). ), the subject of data parallel merge processing becomes the proxy server node (2), and the subject of data parallel merge processing in client-side query (51) becomes the bardo keeper (4) of the client (1).

복수개의 데이터 노드들 중 단일 데이터 노드로의 연결이 필요한 경우에는 클라이언트 메인 동작을 하는데, 이 경우 클라이언트와 단일 데이터 노드가 연결될 수 있다.When a connection to a single data node among a plurality of data nodes is required, a client main operation is performed. In this case, the client and the single data node can be connected.

복수 개의 데이터 노드들 중 2 이상의 데이터 노드로의 연결이 필요한 경우에는 프록시 서버 메인 동작을 하는데, 이 경우 프록시 서버 노드와 상기 2 이상의 데이터 노드가 연결될 수 있다.When connection to two or more data nodes among a plurality of data nodes is required, a proxy server main operation is performed. In this case, the proxy server node and the two or more data nodes can be connected.

이 때, 종래의 발명에서는 프록시 서버 노드와 복수 개의 데이터 노드의 연결이 순차적으로 처리된다. 반면에, 본 발명에서는, 프록시 서버 노드와 상기 2 이상의 데이터 노드의 연결이 병렬적으로 동시에 처리될 수 있다.At this time, in the prior art, connection between the proxy server node and the plurality of data nodes is sequentially processed. On the other hand, in the present invention, the connection between the proxy server node and the two or more data nodes may be simultaneously processed in parallel.

보다 구체적으로, 도 5를 참조하여, 본 발명에서의 일 실시예로서, 예를 들면, 3번 데이터 노드 (데이터 노드 #3, 203) 로의 연결이 필요한 경우에는 바도 키퍼가 주체로서 클라이언트 사이드 쿼리 (51) 가 동작하고, 바도 키퍼와 3번 데이터 노드 (데이터 노드 #3, 203) 가 연결된다. 예를 들어, select * from where c1 in(#3) 이 실행되어 해당 데이터를 조회한다.More specifically, referring to FIG. 5, as an embodiment of the present invention, for example, when a connection to data node #3 (data node #3, 203) is required, the bardo keeper performs a client-side query as a subject ( 51) operates, and the bardo keeper and data node 3 (data node #3, 203) are connected. For example, select * from where c1 in(#3) is executed to retrieve the corresponding data.

도 5를 참조하면, 예를 들어, 복수개의 데이터 노드들 중 1번 내지 5번의 2 이상의 데이터 노드로의 연결이 필요한 경우에는 프록시 서버 노드 (2) 가 주체로서, 서버 사이드 쿼리 (52) 가 동작하고, 프록시 서버 노드 (2) 와 1번 내지 5번 데이터 노드 (데이터 노드 #1 - #5, 201, 202, 203, 204, 205) 의 연결이 병렬적으로 동시에 처리된다. 예를 들어, select * from where c1 in (#1), select * from where c1 in (#2), select * from where c1 in (#3), select * from where c1 in (#4), select * from where c1 in (#5)가 병렬적으로 동시에 실행되어 해당 데이터를 조회한다.Referring to FIG. 5 , for example, when connection to two or more data nodes of No. 1 to No. 5 among a plurality of data nodes is required, the proxy server node 2 acts as the subject and the server-side query 52 operates. and connections between the proxy server node 2 and the first to fifth data nodes (data nodes #1 to #5, 201, 202, 203, 204, and 205) are simultaneously processed in parallel. For example, select * from where c1 in (#1), select * from where c1 in (#2), select * from where c1 in (#3), select * from where c1 in (#4), select * from where c1 in (#5) is executed concurrently in parallel to retrieve the corresponding data.

도 6을 참조하면, 본 발명에서의 연결은 지연 준비 연결 (Deferred Preparation Connection, 100) 을 포함한다. 일반적인 데이터베이스 연결(DB connection) 동작 방식은 세션 매니저 (Session Manager) 가 복수개의 데이터 노드들과 연결을 먼저 맺어놓은 후, 연결이 필요할 때 해당 세션(session)을 사용할 수 있다. 본 발명에서는, DB 연결을 먼저 맺어 놓고 사용하는 것이 아니라, 해당 연결이 필요하다고 판단될 때, 예를 들어, 세션 매니저 (6) 가 샤딩 방법이 결정된 후에 특정 데이터 노드와 연결이 필요하다고 판단할 때, 연결 대상인 데이터 노드와 연결될 수 있다.Referring to FIG. 6, a connection in the present invention includes a deferred preparation connection (100). In a general DB connection operation method, a session manager first establishes a connection with a plurality of data nodes, and then, when a connection is required, the corresponding session can be used. In the present invention, rather than establishing and using a DB connection, when it is determined that the corresponding connection is necessary, for example, when the session manager (6) determines that a connection with a specific data node is necessary after the sharding method is determined. , it can be connected to the data node that is the connection target.

본 발명의 일 실시예로서, 예를 들어, 도 6을 참조하면, 특정 단일의 데이터 노드와 연결 (101) 이 필요한 경우, 세션 매니저가 상기 단일의 데이터 노드와 연결 (101) 할 수 있다 (연결 사용 중, 41). 상기 단일의 데이터 노드를 제외한 데이터 노드들과 연결을 먼저 맺어 놓고 사용하는 것이 아니라, 상기 단일의 데이터 노드를 제외한 데이터 노드들과 연결이 필요하다고 판단될 때 세션 매니저 (6) 가 상기 데이터 노드들과 연결을 맺을 수 있다. 상기 데이터 노드들과 연결을 맺기 전에는 상기 데이터 노드들과 연결 대기 (102) 한다 (연결 대기 중(42)).As an embodiment of the present invention, for example, referring to FIG. 6, when a connection 101 with a specific single data node is required, the session manager can connect 101 with the single data node (connection 101). in use, 41). When it is determined that a connection with data nodes other than the single data node is necessary, the session manager 6 connects with the data nodes other than the single data node, rather than first establishing and using the connection with data nodes other than the single data node. can make a connection. Prior to establishing a connection with the data nodes, a connection standby 102 is performed with the data nodes (waiting for connection 42).

이로써, 본 발명에서는, 불필요한 연결을 맺지 않으므로 데이터베이스의 리소스를 효율적으로 사용할 수 있다.Accordingly, in the present invention, since unnecessary connections are not established, database resources can be efficiently used.

이러한 듀얼 모드 샤딩 시스템에 의한 듀얼 모드 샤딩 방법은 프로그램을 기록한 컴퓨터 판독 가능 저장 매체에서 수행될 수 있다.The dual mode sharding method using such a dual mode sharding system may be performed in a computer readable storage medium in which a program is recorded.

컴퓨터 판독 가능 저장 매체는 범용 또는 특수 목적 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수도 있다. 비제한적인 예로서, 컴퓨터 판독 가능 매체들은 RAM, ROM, EEPROM, CD-ROM 또는 다른 광디스크 스토리지, 자기디스크 스토리지 또는 다른 자기 저장 디바이스들, 또는 원하는 프로그램 코드 수단을 명령들 또는 데이터 구조들의 형태로 저장하는데 사용될 수 있으며 범용 또는 특수-목적 컴퓨터, 또는 범용 또는 특수-목적 프로세서에 의해 액세스될 수 있는 임의의 다른 매체를 포함할 수 있다. 디스크 (disk) 및 디스크 (disc) 는, 본원에서 사용할 때, 컴팩트 디스크 (CD), 레이저 디스크, 광 디스크, 디지털 다기능 디스크 (DVD), 플로피 디스크 및 Blu-ray 디스크를 포함하며, 디스크들 (disks) 은 데이터를 자기적으로 보통 재생하지만, 디스크들 (discs) 은 레이저로 데이터를 광학적으로 재생한다. 앞에서 언급한 것들의 조합들이 또한 컴퓨터 판독 가능 저장 매체의 범위 내에 포함되어야 한다.Computer readable storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of non-limiting example, computer readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or storage of desired program code means in the form of instructions or data structures. and can include any other medium that can be used by a general purpose or special-purpose computer, or any other medium that can be accessed by a general purpose or special-purpose processor. Disk and disc, as used herein, include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy discs, and Blu-ray discs, and discs (disks) ) usually reproduce data magnetically, but discs reproduce data optically with a laser. Combinations of the above should also be included within the scope of computer readable storage media.

이상 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art to which the present invention pertains can be implemented in other specific forms without changing the technical spirit or essential features of the present invention. you will be able to understand Therefore, the embodiments described above should be understood as illustrative in all respects and not limiting.

1: 클라이언트
2: 프록시서버 노드
3: 데이터 노드
4: 바도 키퍼
5: 애플리케이션
6: 세션 매니저
11: 클라이언트 샤딩
12: 가)요청
13: 가)응답
21: 프록시서버 샤딩
22: 나)요청
23: 나)응답
24: 다)요청
25: 다)응답
31: 샤드 연결
32: 메타 연결
41: 연결 사용 중
42: 연결 대기 중
51: 클라이언트 사이드 쿼리
52: 서버 사이드 쿼리
100: 지연 준비 연결
101: 연결 사용 중일 때 연결
102: 연결 대기 중일 때 지연 준비 연결
201: 1번 데이터 노드(데이터 노드 #1)
202: 2번 데이터 노드(데이터 노드 #2)
203: 3번 데이터 노드(데이터 노드 #3)
204: 4번 데이터 노드(데이터 노드 #4)
205: 5번 데이터 노드(데이터 노드 #5)
S100: 사용자 쿼리 분석
S200: SQL Prepare()
S300: Key column 확인
S400: SQL BindParameter()
S500: Key 값 체크
1: Client
2: proxy server node
3: data node
4: Vado Keeper
5: Applications
6: Session Manager
11: Client sharding
12: a) request
13: A) Response
21: Proxy server sharding
22: b) request
23: B) Response
24: C) request
25: C) Response
31: Shard connection
32: meta link
41: Connection busy
42: Waiting for connection
51: Client side query
52: Server side query
100: delayed ready connection
101: Connect when connection is in use
102: delay ready connection when connection is waiting
201: Data Node 1 (Data Node #1)
202: data node 2 (data node #2)
203: data node 3 (data node #3)
204: data node 4 (data node #4)
205: Data node 5 (data node #5)
S100: User query analysis
S200: SQL Prepare()
S300: Check Key column
S400: SQL BindParameter()
S500: Key value check

Claims (10)

클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템으로서,
클라이언트 샤딩 및 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 클라이언트;
키 분배 정보를 포함하는, 프록시 서버 노드;
복수개의 데이터 노드들; 및
세션 매니저를 포함하며,
상기 클라이언트는 사용자 입력에 의해 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 키 분배 정보의 제공 요청을 송신하며,
상기 프록시 서버 노드는 상기 키 분배 정보의 제공 요청에 대응하여 상기 키 분배 정보를 상기 클라이언트에 송신하고,
상기 클라이언트는 상기 키 분배 정보에 기초하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하고,
상기 세션 매니저는, 상기 클라이언트 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 단일의 데이터 노드와 상기 클라이언트의 연결을 수행하며,
상기 세션 매니저는, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하며,
상기 세션 매니저는, 상기 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행할 때, 상기 프록시 서버 노드와 상기 2 이상의 데이터 노드 간의 연결을 순차적이 아닌 병렬적으로 동시에 처리하며,
상기 세션 매니저는, 상기 복수개의 데이터 노드들과의 연결을 미리 수행하지 않으며, 상기 샤딩 방법이 결정된 후에 연결 대상인 데이터 노드와 연결을 수행하는, 듀얼 모드 샤딩 시스템.
As a dual-mode sharding system supporting client sharding and proxy server sharding,
a client that determines a sharding method of one of client sharding and proxy server sharding;
a proxy server node, containing key distribution information;
a plurality of data nodes; and
Contains a session manager,
The client receives a SQL query request by user input and transmits a request for provision of key distribution information to the proxy server node;
The proxy server node transmits the key distribution information to the client in response to a request for providing the key distribution information;
The client determines one of the client sharding and the proxy server sharding method based on the key distribution information,
When the client sharding is determined, the session manager connects a single data node among the plurality of data nodes with the client;
The session manager, when the proxy server sharding is determined, performs a connection between two or more data nodes among the plurality of data nodes and the proxy server node;
The session manager, when performing the connection between the two or more data nodes and the proxy server node, simultaneously processes the connection between the proxy server node and the two or more data nodes in parallel rather than sequentially,
The dual mode sharding system of claim 1 , wherein the session manager does not perform connection with the plurality of data nodes in advance, and performs connection with a data node to be connected after the sharding method is determined.
제 1 항에 있어서,
상기 프록시 서버 노드는 프록시 서버로서 동작하되, 샤드 구성 정보를 더 포함하며,
상기 데이터 노드는, 관계형 데이터 관리 시스템 (Relational DataBase Management System, RDMS) 으로서, 데이터를 저장하는 기능을 수행하는, 듀얼 모드 샤딩 시스템.
According to claim 1,
The proxy server node operates as a proxy server and further includes shard configuration information;
The data node, as a relational data base management system (RDMS), performs a function of storing data, the dual-mode sharding system.
제 1 항에 있어서,
상기 클라이언트는 바도 키퍼 (Vado Keeper) 가 실행되는 서버이고,
상기 바도 키퍼가 상기 SQL 질의 요청을 수신하면, 상기 바도 키퍼는 상기 프록시 서버 노드에 상기 키 분배 정보의 제공 요청을 송신하고, 상기 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정할 수 있는, 듀얼 모드 샤딩 시스템.
According to claim 1,
The client is a server running Vado Keeper,
When the vado keeper receives the SQL query request, the vado keeper transmits a request to provide the key distribution information to the proxy server node, and determines whether connection to a specific data node is necessary based on the key distribution information. A dual-mode sharding system capable of determining one of the client sharding and the proxy server sharding method by doing this.
제 3 항에 있어서,
상기 바도 키퍼는,
상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고,
상기 프록시 서버 노드는,
상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있는, 듀얼 모드 샤딩 시스템.
According to claim 3,
The bardo keeper,
When the client sharding is determined, sending a connection request to the data node and receiving a response to the connection request from the data node;
The proxy server node,
When the proxy server sharding is determined, a connection request may be received from the bardo keeper, and a connection request may be simultaneously made to two or more data nodes among a plurality of data nodes in parallel by checking a key value in response to the connection request. , a dual-mode sharding system.
제 1 항에 있어서,
상기 프록시 서버 노드 및 상기 데이터 노드는 독립적인 형태 (Stand Alone) 로 구축되고, 이중화될 수 있는 것을 특징으로 하는, 듀얼 모드 샤딩 시스템.
According to claim 1,
The proxy server node and the data node are built in an independent form (Stand Alone), characterized in that they can be duplicated, a dual mode sharding system.
제 1 항에 있어서,
상기 복수개의 데이터 노드들은,
상기 복수개의 데이터 노드들 각각에 대해 각각의 데이터 노드 구성 (configuration) 을 생성하고, 상기 복수개의 데이터 노드들 각각에 대해 각각의 샤드 테이블을 생성하고, 상기 각각의 샤드 테이블에 대한 인덱스 (index) 를 생성하고, 상기 각각의 샤드 테이블에 대해 샤딩 방식을 설정하고, 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법을 설정함으로써 구성되는,
듀얼 모드 샤딩 시스템.
According to claim 1,
The plurality of data nodes,
Creating each data node configuration for each of the plurality of data nodes, creating each shard table for each of the plurality of data nodes, and creating an index for each shard table It is configured by creating, setting a sharding method for each of the shard tables, and setting a sharding operation for data input and an input method to a data node.
Dual mode sharding system.
클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템에 의한 듀얼 모드 샤딩 방법으로서,
상기 듀얼 모드 샤딩 시스템은,
클라이언트 샤딩 및 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 클라이언트, 키 분배 정보를 포함하는 프록시 서버 노드, 복수개의 데이터 노드들, 및 세션 매니저를 포함하며,
상기 듀얼 모드 샤딩 방법은,
상기 클라이언트가 사용자 입력에 의해 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 키 분배 정보의 제공 요청을 송신하는 단계;
상기 프록시 서버 노드가 상기 키 분배 정보의 제공 요청에 대응하여 상기 키 분배 정보를 상기 클라이언트에 송신하는 단계;
상기 클라이언트가 상기 키 분배 정보에 기초하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 단계; 및
상기 세션 매니저가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 단일의 데이터 노드와 상기 클라이언트의 연결을 수행하며,
상기 세션 매니저가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하는 단계를 포함하고,
상기 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하는 단계에서, 상기 세션 매니저가, 상기 프록시 서버 노드와 상기 2 이상의 데이터 노드 간의 연결을 순차적이 아닌 병렬적으로 동시에 처리하고,
상기 세션 매니저는, 상기 복수개의 데이터 노드들과의 연결을 미리 수행하지 않으며, 상기 샤딩 방법이 결정된 후에 연결 대상인 데이터 노드와 연결을 수행하는, 듀얼 모드 샤딩 방법.
A dual-mode sharding method by a dual-mode sharding system supporting client sharding and proxy server sharding,
The dual mode sharding system,
A client for determining one of client sharding and proxy server sharding, a proxy server node including key distribution information, a plurality of data nodes, and a session manager,
The dual mode sharding method,
receiving, by the client, an SQL query request according to a user input, and sending a request for provision of key distribution information to the proxy server node;
transmitting, by the proxy server node, the key distribution information to the client in response to a request for provision of the key distribution information;
determining, by the client, one of the client sharding and the proxy server sharding method based on the key distribution information; and
When the client sharding is determined, the session manager connects a single data node of the plurality of data nodes with the client;
When the proxy server sharding is determined, the session manager performing a connection between two or more data nodes among the plurality of data nodes and the proxy server node;
In the step of connecting the two or more data nodes and the proxy server node, the session manager simultaneously processes the connection between the proxy server node and the two or more data nodes in parallel rather than sequentially;
The dual mode sharding method of claim 1 , wherein the session manager does not perform connection with the plurality of data nodes in advance, and performs connection with a data node to be connected after the sharding method is determined.
제 7 항에 있어서,
상기 클라이언트에서 실행되는 바도 키퍼가,
상기 SQL 질의 요청을 수신하는 단계;
상기 프록시 서버 노드에 상기 키 분배 정보의 제공 요청을 송신하는 단계; 및
상기 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 단계를 포함하는, 듀얼 모드 샤딩 방법.
According to claim 7,
The bar keeper running on the client,
receiving the SQL query request;
sending a request for provision of the key distribution information to the proxy server node; and
And determining whether a connection to a specific data node is required based on the key distribution information to determine one of the client sharding and the proxy server sharding method.
제 8 항에 있어서,
상기 바도 키퍼가,
상기 클라이언트 샤딩이 결정된 경우에,
상기 데이터 노드로 연결 요청을 송신하는 단계; 및
상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하는 단계를 포함하고,
상기 프록시 서버 노드가,
상기 프록시 서버 샤딩이 결정된 경우에,
상기 바도 키퍼로부터 연결 요청을 수신하는 단계;
상기 연결 요청에 대응하여 키 값을 체크하여 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청하는 단계를 포함하는, 듀얼 모드 샤딩 방법.
According to claim 8,
The bardo keeper,
If the client sharding is determined,
sending a connection request to the data node; and
Receiving a response to the connection request from the data node;
The proxy server node,
When the proxy server sharding is determined,
Receiving a connection request from the bardo keeper;
And checking a key value in response to the connection request and simultaneously requesting a connection to two or more data nodes among the plurality of data nodes in parallel.
제 7 항에 있어서,
상기 복수개의 데이터 노드들은,
상기 복수개의 데이터 노드들 각각에 대해 각각의 데이터 노드 구성을 생성하고, 상기 복수개의 데이터 노드들 각각에 대해 각각의 샤드 테이블을 생성하고, 상기 각각의 샤드 테이블에 대한 인덱스를 생성하고, 상기 각각의 샤드 테이블에 대해 샤딩 방식을 설정하고, 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법을 설정함으로써 구성되는, 듀얼 모드 샤딩 방법.
According to claim 7,
The plurality of data nodes,
Creating each data node configuration for each of the plurality of data nodes, creating each shard table for each of the plurality of data nodes, creating an index for each shard table, A dual mode sharding method, configured by setting a sharding method for a shard table, and setting a sharding operation for data input and an input method to a data node.
KR1020210099141A 2021-07-28 2021-07-28 Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding KR102633926B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210099141A KR102633926B1 (en) 2021-07-28 2021-07-28 Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210099141A KR102633926B1 (en) 2021-07-28 2021-07-28 Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding

Publications (2)

Publication Number Publication Date
KR20230017534A true KR20230017534A (en) 2023-02-06
KR102633926B1 KR102633926B1 (en) 2024-02-06

Family

ID=85223798

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210099141A KR102633926B1 (en) 2021-07-28 2021-07-28 Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding

Country Status (1)

Country Link
KR (1) KR102633926B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070037909A (en) * 2005-10-04 2007-04-09 삼성전자주식회사 Method and apparatus for data push service using data pull model
US20130290249A1 (en) * 2010-12-23 2013-10-31 Dwight Merriman Large distributed database clustering systems and methods
US20190068725A1 (en) * 2017-08-28 2019-02-28 Citrix Systems, Inc. Wrapping continuation tokens to support paging for multiple servers across different geolocations
US10425473B1 (en) * 2017-07-03 2019-09-24 Pure Storage, Inc. Stateful connection reset in a storage cluster with a stateless load balancer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070037909A (en) * 2005-10-04 2007-04-09 삼성전자주식회사 Method and apparatus for data push service using data pull model
US20130290249A1 (en) * 2010-12-23 2013-10-31 Dwight Merriman Large distributed database clustering systems and methods
US10425473B1 (en) * 2017-07-03 2019-09-24 Pure Storage, Inc. Stateful connection reset in a storage cluster with a stateless load balancer
US20190068725A1 (en) * 2017-08-28 2019-02-28 Citrix Systems, Inc. Wrapping continuation tokens to support paging for multiple servers across different geolocations

Also Published As

Publication number Publication date
KR102633926B1 (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US11409721B2 (en) System and method for providing access to a sharded database using a cache and a shard technology
US9009116B2 (en) Systems and methods for synchronizing data in a cache and database
US6031978A (en) System, method and program for enabling a client to reconnect to a same server in a network of computer systems after the server has moved to a different network address
US8892509B2 (en) Systems and methods for a distributed in-memory database
US7499905B2 (en) Method and apparatus for accessing information based on distributed file system (DFS) paths
US6883081B2 (en) Storage management software bridges
KR101114149B1 (en) Ultra-shared-nothing parallel database
EP1840766B1 (en) Systems and methods for a distributed in-memory database and distributed cache
US20060106759A1 (en) Computer system, computer, data access method and database system
US20070239791A1 (en) Systems and methods for a distributed cache
US20030182319A1 (en) Method and system for detecting conflicts in replicated data in a database network
US20070112812A1 (en) System and method for writing data to a directory
US7315854B2 (en) Distributed directory replication
US9652346B2 (en) Data consistency control method and software for a distributed replicated database system
CN109815294B (en) Distributed parallel data storage method and system without main nodes
US20080140944A1 (en) Method and apparatus for storage resource management in plural data centers
US11544224B2 (en) Systems and methods for attachable-and-detachable database sessions
CN106415534A (en) Method and device for partitioning association table in distributed database
Aleyasen et al. High-throughput adaptive data virtualization via context-aware query routing
JP2004252938A (en) Wide area storage localization system
US20030145113A1 (en) Method and system for workload balancing in a network of computer systems
KR102633926B1 (en) Dual Mode Sharding System and Method for Supporting Client Sharding and Proxy Server Sharding
CN110347718B (en) REDIS (REDIS) slicing method, REDIS slicing device, computer equipment and storage medium
US8015160B2 (en) System and method for content management over network storage devices
KR20080072813A (en) Transaction protection in a stateless architecture using commodity servers

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant