KR102633926B1 - 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
KR102633926B1
KR102633926B1 KR1020210099141A KR20210099141A KR102633926B1 KR 102633926 B1 KR102633926 B1 KR 102633926B1 KR 1020210099141 A KR1020210099141 A KR 1020210099141A KR 20210099141 A KR20210099141 A KR 20210099141A KR 102633926 B1 KR102633926 B1 KR 102633926B1
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
KR20230017534A (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

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 supporting client sharding and proxy server sharding are provided. According to an embodiment of the present invention, a dual-mode sharding system supporting client sharding and proxy server sharding includes a client that determines one of the sharding methods of client sharding and proxy server sharding, a proxy server node that includes key distribution information, and Includes 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 exploded, technology for distributing and storing data to process large amounts of data is rapidly developing. Among them, sharding is a technology that partitions data to distribute and store and process large amounts of data in a relational database.

종래에, 샤딩 동작은 애플리케이션의 요구사항에 의해 하나의 방법으로 초기에 결정된다. Conventionally, sharding behavior is initially determined in 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, there is a disadvantage in that the cost of rebuilding the system is high when the data distribution policy is changed.

이러한 단점을 극복하기 위해 서버 및 클라이언트 샤딩 시스템을 동시에 지원하는 듀얼 모드 샤딩 시스템 제공함으로써, 애플리케이션의 요구사항에 따른 두 가지 방향으로의 효율적인 데이터분산을 통해 성능 및 시스템의 최적화를 이룰 수 있다.To overcome these shortcomings, 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 the requirements of the application.

본 발명은, 듀얼 모드 샤딩을 지원하는 시스템에서 애플리케이션의 요구사항에 따라 샤딩 동작이 동적으로 선택되어 동작하게 하여, 성능 및 리소스의 효율적인 운영을 가능하게 하는 것을 과제로 한다.The goal of the present invention is to enable efficient operation of performance and resources by dynamically selecting and operating sharding operations according to application requirements in a system that supports 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 that determines one of the sharding methods of client sharding and proxy server sharding; a proxy server node, including key distribution information; a plurality of data nodes; and a session manager, wherein the client receives a SQL query request by a user input and 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. The key distribution information is transmitted to the client, the client determines one of the client sharding and the proxy server sharding based on the key distribution information, and the session manager determines the client sharding. In this case, the client is connected to a single data node among the plurality of data nodes, and the session manager connects the client with two or more data nodes among the plurality of data nodes when proxy server sharding is determined. When performing the connection of the proxy server node, the session manager connects the proxy server node and the two or more data nodes in parallel rather than sequentially. Processed simultaneously, the session manager does not perform connection to the plurality of data nodes in advance, but connects to 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 is a relational data management system and may perform the function of storing data.

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

상기 바도 키퍼가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고, 상기 프록시 서버 노드가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있다.The vado 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, In this case, the bar can receive a connection request from the keeper, check the key value in response to the connection request, and simultaneously request a connection to two or more data nodes among a plurality of data nodes in parallel.

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

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

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

상기 바도 키퍼는, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고, 상기 프록시 서버 노드는, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있다.The vado 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, In this case, the bar can receive a connection request from the keeper, check the key value in response to the connection request, and simultaneously request a connection to two or more data nodes among a plurality of data nodes in parallel.

상기 바도 키퍼가, 상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하는 단계, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하는 단계를 포함하고, 상기 프록시 서버 노드가, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하는 단계, 상기 연결 요청에 대응하여 키 값을 체크하여 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청하는 단계를 포함할 수 있다. When the client sharding is determined, the vado keeper includes the step of sending a connection request to the data node, receiving a response to the connection request from the data node, and the proxy server node, the proxy When server sharding is determined, receiving a connection request from the Vado 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 It can be included.

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

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

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

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

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

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

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

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

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

도 1 및 도 3을 참조하면, 본 발명의 일 실시예에 따른 클라이언트 샤딩 (11) 및 프록시 서버 샤딩 (21) 을 지원하는 듀얼 모드 샤딩 시스템은 클라이언트 (1), 프록시 서버 노드 (2), 데이터 노드 (3) 및 세션 매니저 (6) 를 포함한다.Referring to Figures 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), and data Includes node (3) and session manager (6).

도 1을 참조하면, 클라이언트 (1) 는 애플리케이션이 실행되는 서버일 수 있고, 바도 키퍼 (Vado Keeper) 가 실행되는 서버일 수 있으며, 바도 키퍼 (4) 에 의해 클라이언트 샤딩 (11) 및 프록시 서버 샤딩 (21) 중 어느 하나의 샤딩 방법을 결정할 수 있다. Referring to Figure 1, the client (1) may be a server on which an application runs, or a server on which Vado Keeper runs, and client sharding (11) and proxy server sharding are performed 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 perform the role of a proxy server, may have shard configuration information, and may be the data node (3). It may have data key distribution information.

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

다음으로, 도 3을 참고하여, 바도 키퍼가 샤딩 방법을 선택하는 알고리즘을 기술한다.Next, with reference to Figure 3, the algorithm by which Vado Keeper selects the sharding method is 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 a SQL query request by user input, the bardokeeper (4) of the client (1) can receive the SQL query (user query analysis, S100). At this time, the bardo 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 key distribution information to the client ( 1) It can be sent to . Afterwards, Vado Keeper (4) can operate in the order of executing SQL_Prepare (S200), checking key column (S300), executing SQL_BindParameter (S400), and checking key value (S500).

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

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

도 2를 참조하면, 클라이언트 메인 동작에서, 클라이언트의 바도 키퍼 (4) 가 데이터 노드 (3) 로 가)요청 (12) 을 하고, 가)요청 (12) 을 받은 데이터 노드 (3) 은 가)요청 (12) 에 대한 가)응답 (13) 을 줄 수 있다.Referring to Figure 2, in the main operation of the client, the client's bardo keeper (4) makes a) request (12) to the data node (3), and the data node (3) that receives request (12) a) A) Response (13) can be given to 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 bardo keeper (4) sends a) request (22) to the proxy server node (2), and the proxy server node (2) that receives request (22) sends the Key value By checking, multi-request (24) can be made in parallel operation to two or more data nodes (3) among a plurality of data nodes. c) The data node (3) that received the request (24) can send the execution result to the proxy server node (2) c) response (25). The proxy server node 3 may collect responses received from two or more data nodes 3 among the plurality of data nodes and send 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 vado keeper (4), a proxy server node (2), and a plurality of data nodes (3). The client has a shard connection (31) with the proxy server node and the data node, and a meta connection (32) between the proxy server node (2) and the data node (3).

본 발명에서는, 프록시 서버 노드 및 데이터 노드를 독립적인 (Stand Alone) 형태로 구축 가능할 수 있고, 또한 프록시 서버 노드 및 데이터 노드 간 이중화를 이용할 수 있다.In the present invention, proxy server nodes and data nodes can be built in an independent (Stand Alone) form, and duplication between proxy server nodes and data nodes can 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 on one physical server. Referring to FIG. 4, as an embodiment of the present invention, for example, 8 DBMSs may be configured. In this case, the DBMS that is activated and provides normal service is the activated DBMS, and the DBMS that is provisionally configured is the standby DBMS. Applies to DBMS in use.

본 발명의 일 실시예로서, 이중화를 이용하는 것은 대기 중인 DBMS를 구성함으로써, 활성화된 DBMS가 파손될 경우에 대기 중인 DBMS를 사용할 수 있는 것이며, 이중화를 통해 안정적인 데이터 관리 기술을 제공할 수 있다.As an embodiment of the present invention, using redundancy means configuring a standby DBMS so that when the activated DBMS is damaged, the standby DBMS can be used, 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 redundancy operation method is, for example, the redundancy transmitting processor of the activated DBMS reads the Redo Log (Transaction Logging File), processes it into a redundancy log, and sends TCP/RBC to the redundancy receiving processor of the waiting DBMS. It can be transmitted through IP communication. The duplication receiving processor can restore the received duplication log into a transaction log and reflect it in the waiting DBMS. Data changes corresponding to insert/update/delete in the activated DBMS are equally applied to the standby DBMS.

한편, 비용 부족 등의 이유로 대기 중인 DBMS이 구성되지 않고, 활성화된 DBMS만이 구성될 수 있는 경우가 Stand Alone에 해당한다. Meanwhile, Stand Alone refers to a 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, the client main operation and proxy server main operation for data input or data inquiry are 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 a 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 index for 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 sharding method for table of data node */

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) Assuming 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', 'Gananada', 1, sysdate);

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

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

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

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

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

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

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

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

j. insert into tb_test1 values( 9, 'x', 0, 'abc', '가나다', 1, sysdate);j. insert into tb_test1 values( 9, 'x', 0, 'abc', 'Gananada', 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 main client operation is loading the shard configuration information of the proxy server from Vado Keeper (4) when the application is first run, executing SQL_Prepare on the SQL executed by Vado Keeper (4), checking key columns, and executing SQL_BindParameter(). It includes steps that proceed in order. Vado Keeper (4) can know the data node based on the shard key value of the bind value corresponding to the key, for example, the hash value. Afterwards, a connection is made only to the corresponding data node (Deferred Preparation Connection). You can execute SQL_execute through a connected session and receive a success request under normal circumstances.

본 발명에서의 일 예로서, 데이터 입력에 대한 클라이언트 메인 동작 과정은 다음과 같다.As an example in the present invention, the main client 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, proxy server main operation for data input may be performed. An application can establish a connection using a generic driver to a proxy server and execute SQL. The main operation of the proxy server can proceed in order of executing SQL_Prepare, checking key columns, executing SQL_BindParameter(), and selecting nodes.

프록시 서버의 메인 동작은 키에 해당되는 바인드 값의 샤드 키 값, 일 예로서, 해쉬 값을 기준으로 데이터 노드를 알 수 있다. 이 때, 프록시 서버의 세션 매니저 (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 proxy server's session manager to the corresponding data node. You can execute SQL_execute through a connected session and receive a success request in normal cases.

본 발명에서의 일 예로서, 데이터 입력에 대한 프록시 서버 메인 동작 과정은 다음과 같다.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 inquiry.

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

ex) hash값 가정( node1 = 0~4의 값, node2= 5~9 )ex) Assuming 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, the client main operation for data inquiry can be performed. When running the application for the first time, the shard configuration information of the proxy server can be loaded from Vado Keeper. In the case of a client query in a typical invention, query SQL for multiple nodes returns an error or generates a guide alarm on how to use, but the present invention automatically transfers the SQL to the proxy server, so that the SQL is executed in the following procedure without any problem.

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

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

본 발명에서의 일 예로서, 각 SQL에 대한 동작과정과 결과는 다음과 같다.As an example in the present invention, the operation process and results 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 Figure 5, when the main operation is executed on the proxy server node, it is a server side query, and when the main operation is executed on the client, it is a client side query. At this time, the server side query (52 ), the subject of parallel merge processing of data is the proxy server node (2), and in client-side query (51), the subject of data parallel merge processing is the bardo keeper (4) of the client (1).

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

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

이 때, 종래의 발명에서는 프록시 서버 노드와 복수 개의 데이터 노드의 연결이 순차적으로 처리된다. 반면에, 본 발명에서는, 프록시 서버 노드와 상기 2 이상의 데이터 노드의 연결이 병렬적으로 동시에 처리될 수 있다.At this time, in the conventional invention, the connections between the proxy server node and a plurality of data nodes are processed sequentially. On the other hand, in the present invention, the connection of the proxy server node and the two or more data nodes can be processed simultaneously and 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 Vado Keeper is the subject and performs a client-side query ( 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 query 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 numbered 1 to 5 among a plurality of data nodes is required, the proxy server node 2 is the main agent, and the server side query 52 operates. And, the connection between the proxy server node (2) and data nodes #1 to #5 (data nodes #1 - #5, 201, 202, 203, 204, 205) is processed simultaneously and 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 in parallel and retrieves the data.

도 6을 참조하면, 본 발명에서의 연결은 지연 준비 연결 (Deferred Preparation Connection, 100) 을 포함한다. 일반적인 데이터베이스 연결(DB connection) 동작 방식은 세션 매니저 (Session Manager) 가 복수개의 데이터 노드들과 연결을 먼저 맺어놓은 후, 연결이 필요할 때 해당 세션(session)을 사용할 수 있다. 본 발명에서는, DB 연결을 먼저 맺어 놓고 사용하는 것이 아니라, 해당 연결이 필요하다고 판단될 때, 예를 들어, 세션 매니저 (6) 가 샤딩 방법이 결정된 후에 특정 데이터 노드와 연결이 필요하다고 판단할 때, 연결 대상인 데이터 노드와 연결될 수 있다.Referring to FIG. 6, the connection in the present invention includes a Deferred Preparation Connection (100). The general way a database connection works is that the Session Manager first establishes a connection with multiple data nodes, and then uses the session when a connection is needed. In the present invention, a DB connection is not first established and then used, but rather when the connection is deemed necessary, for example, when the session manager (6) determines that a connection to a specific data node is necessary after the sharding method is determined. , 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 Figure 6, when connection 101 with a specific single data node is required, the session manager can connect 101 with the single data node (connection In use, 41). Rather than first establishing a connection with data nodes other than the single data node and then using it, 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. A connection can be made. Before establishing a connection with the data nodes, the device waits (102) for connection with the data nodes (waiting for connection (42)).

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

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

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

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

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: Application
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 connections
32: meta connection
41: Connection in use
42: Waiting for connection
51: Client-side query
52: Server-side query
100: Delay ready connection
101: Connect when connection is busy
102: Delay ready connection when waiting for connection
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: Check Key value

Claims (10)

클라이언트 샤딩 및 프록시 서버 샤딩을 지원하는 듀얼 모드 샤딩 시스템으로서,
클라이언트 샤딩 및 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 클라이언트;
키 분배 정보를 포함하는, 프록시 서버 노드;
복수개의 데이터 노드들; 및
세션 매니저를 포함하며,
상기 클라이언트는 사용자 입력에 의해 SQL 질의 요청을 수신하고, 상기 프록시 서버 노드에 키 분배 정보의 제공 요청을 송신하며,
상기 프록시 서버 노드는 상기 키 분배 정보의 제공 요청에 대응하여 상기 키 분배 정보를 상기 클라이언트에 송신하고,
상기 클라이언트는 상기 키 분배 정보에 기초하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하고,
상기 세션 매니저는, 상기 클라이언트 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 단일의 데이터 노드와 상기 클라이언트의 연결을 수행하며,
상기 세션 매니저는, 상기 프록시 서버 샤딩이 결정된 경우에, 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행하며,
상기 세션 매니저는, 상기 2 이상의 데이터 노드와 상기 프록시 서버 노드의 연결을 수행할 때, 상기 프록시 서버 노드와 상기 2 이상의 데이터 노드 간의 연결을 순차적이 아닌 병렬적으로 동시에 처리하며,
상기 세션 매니저는, 상기 복수개의 데이터 노드들과의 연결을 미리 수행하지 않으며, 상기 샤딩 방법이 결정된 후에 연결 대상인 데이터 노드와 연결을 수행하는, 듀얼 모드 샤딩 시스템.
A dual-mode sharding system that supports client sharding and proxy server sharding,
A client that determines a sharding method, either client sharding or proxy server sharding;
a proxy server node, including key distribution information;
a plurality of data nodes; and
Includes 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 provision of the key distribution information,
The client determines one of the client sharding and the proxy server sharding based on the key distribution information,
When the client sharding is determined, the session manager connects the client to a single data node among the plurality of data nodes,
When proxy server sharding is determined, the session manager connects two or more data nodes among the plurality of data nodes with the proxy server node,
When performing a connection between 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 session manager does not perform connection with the plurality of data nodes in advance, but performs connection with the 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 is a relational data management system (RDMS), a dual mode sharding system that performs the function of storing data.
제 1 항에 있어서,
상기 클라이언트는 바도 키퍼 (Vado Keeper) 가 실행되는 서버이고,
상기 바도 키퍼가 상기 SQL 질의 요청을 수신하면, 상기 바도 키퍼는 상기 프록시 서버 노드에 상기 키 분배 정보의 제공 요청을 송신하고, 상기 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정할 수 있는, 듀얼 모드 샤딩 시스템.
According to claim 1,
The client is a server on which Vado Keeper runs,
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 a connection to a specific data node is necessary based on the key distribution information. A dual mode sharding system that can determine either the client sharding or the proxy server sharding method.
제 3 항에 있어서,
상기 바도 키퍼는,
상기 클라이언트 샤딩이 결정된 경우에, 상기 데이터 노드로 연결 요청을 송신하고, 상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하고,
상기 프록시 서버 노드는,
상기 프록시 서버 샤딩이 결정된 경우에, 상기 바도 키퍼로부터 연결 요청을 수신하고, 상기 연결 요청에 대응하여 키 값을 체크하여 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청을 할 수 있는, 듀얼 모드 샤딩 시스템.
According to claim 3,
The Vado Keeper is,
When the client sharding is determined, transmitting a connection request to the data node and receiving a response to the connection request from the data node,
The proxy server node is,
When the proxy server sharding is determined, the bar can receive a connection request from the keeper, check the key value in response to the connection request, and simultaneously request a connection to two or more data nodes among a plurality of data nodes in parallel. A dual-mode sharding system.
제 1 항에 있어서,
상기 프록시 서버 노드 및 상기 데이터 노드는 독립적인 형태 (Stand Alone) 로 구축되고, 이중화될 수 있는 것을 특징으로 하는, 듀얼 모드 샤딩 시스템.
According to claim 1,
A dual mode sharding system, characterized in that the proxy server node and the data node are built in an independent form (Stand Alone) and can be duplicated.
제 1 항에 있어서,
상기 복수개의 데이터 노드들은,
상기 복수개의 데이터 노드들 각각에 대해 각각의 데이터 노드 구성 (configuration) 을 생성하고, 상기 복수개의 데이터 노드들 각각에 대해 각각의 샤드 테이블을 생성하고, 상기 각각의 샤드 테이블에 대한 인덱스 (index) 를 생성하고, 상기 각각의 샤드 테이블에 대해 샤딩 방식을 설정하고, 데이터 입력에 대한 샤딩 동작 및 데이터 노드로의 입력 방법을 설정함으로써 구성되는,
듀얼 모드 샤딩 시스템.
According to claim 1,
The plurality of data nodes are,
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 is configured by creating, setting the sharding method for each shard table, and setting the sharding operation for data input and the input method to the 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 is,
It includes a client that determines 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,
The dual mode sharding method is,
The client receiving a SQL query request based on a user input, and transmitting a request for providing 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, a sharding method among the client sharding and the proxy server sharding based on the key distribution information; and
When the client sharding is determined, the session manager connects the client to a single data node among the plurality of data nodes,
When the proxy server sharding is determined, the session manager performs a connection between two or more data nodes among the plurality of data nodes and the proxy server node,
In performing the connection between 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 session manager does not perform connection with the plurality of data nodes in advance, but performs connection with the data node to be connected after the sharding method is determined.
제 7 항에 있어서,
상기 클라이언트에서 실행되는 바도 키퍼가,
상기 SQL 질의 요청을 수신하는 단계;
상기 프록시 서버 노드에 상기 키 분배 정보의 제공 요청을 송신하는 단계; 및
상기 키 분배 정보에 기초하여 특정한 데이터 노드로의 연결이 필요한지 여부를 판단하여 상기 클라이언트 샤딩 및 상기 프록시 서버 샤딩 중 어느 하나의 샤딩 방법을 결정하는 단계를 포함하는, 듀얼 모드 샤딩 방법.
According to claim 7,
The Vado Keeper running on the client,
Receiving the SQL query request;
transmitting a request to provide the key distribution information to the proxy server node; and
A dual-mode sharding method comprising determining whether a connection to a specific data node is necessary based on the key distribution information and determining one of the client sharding and the proxy server sharding.
제 8 항에 있어서,
상기 바도 키퍼가,
상기 클라이언트 샤딩이 결정된 경우에,
상기 데이터 노드로 연결 요청을 송신하는 단계; 및
상기 데이터 노드로부터 상기 연결 요청에 대한 응답을 수신하는 단계를 포함하고,
상기 프록시 서버 노드가,
상기 프록시 서버 샤딩이 결정된 경우에,
상기 바도 키퍼로부터 연결 요청을 수신하는 단계;
상기 연결 요청에 대응하여 키 값을 체크하여 상기 복수개의 데이터 노드들 중 2 이상의 데이터 노드에 병렬적으로 동시에 연결 요청하는 단계를 포함하는, 듀얼 모드 샤딩 방법.
According to claim 8,
The Vado Keeper is
If the client sharding is decided,
transmitting a connection request to the data node; and
Receiving a response to the connection request from the data node,
The proxy server node is,
When the proxy server sharding is decided,
Receiving a connection request from the Vado Keeper;
A dual mode sharding method comprising checking a key value in response to the connection request and simultaneously requesting 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 are,
Generating 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, and generating each of the plurality of data nodes. A dual-mode sharding method configured by setting the sharding method for the shard table, setting the sharding operation for data input, and the input method to the 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 KR20230017534A (en) 2023-02-06
KR102633926B1 true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100727993B1 (en) * 2005-10-04 2007-06-14 삼성전자주식회사 Method and apparatus for data push service using data pull model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
KR20230017534A (en) 2023-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
CN107787490B (en) Direct connect functionality in a distributed database grid
US6883081B2 (en) Storage management software bridges
AU2005231230B2 (en) Ultra-shared-nothing parallel database
JP5078384B2 (en) Methods, servers, and programs (web service database cluster architecture) for executing web services that use database clusters such as e-commerce
US7676516B2 (en) System and method for the optimization of database access in data base networks
US9830372B2 (en) Scalable coordination aware static partitioning for database replication
US8892509B2 (en) Systems and methods for a distributed in-memory database
US20150012483A1 (en) Open database-based far-distance bicentric online processing method and system
CN111581234B (en) RAC multi-node database query method, device and system
US20080250272A1 (en) Logging last resource system
US20030182319A1 (en) Method and system for detecting conflicts in replicated data in a database network
CN109815294B (en) Distributed parallel data storage method and system without main nodes
US20040148397A1 (en) Loosely coupled database clusters with client connection fail-over
US20070239797A1 (en) Systems and methods for synchronizing data in a cache and database
EP1148430A2 (en) Optimization of a star join operation using a bitmap index structure
US20050278458A1 (en) Analysis services database synchronization
US20070239791A1 (en) Systems and methods for a distributed cache
US20070239661A1 (en) Systems and methods for a distributed in-memory database and distributed cache
US20060106759A1 (en) Computer system, computer, data access method and database system
CN110750584A (en) Data management method and system
CN110347718B (en) REDIS (REDIS) slicing method, REDIS slicing device, computer equipment and storage medium
Aleyasen et al. High-throughput adaptive data virtualization via context-aware query routing
CN106415534A (en) Method and device for partitioning association table in distributed database
JP2004252938A (en) Wide area storage localization system

Legal Events

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