KR20110071785A - Apparatus and method for replicating data in distributed database system - Google Patents

Apparatus and method for replicating data in distributed database system Download PDF

Info

Publication number
KR20110071785A
KR20110071785A KR1020090128434A KR20090128434A KR20110071785A KR 20110071785 A KR20110071785 A KR 20110071785A KR 1020090128434 A KR1020090128434 A KR 1020090128434A KR 20090128434 A KR20090128434 A KR 20090128434A KR 20110071785 A KR20110071785 A KR 20110071785A
Authority
KR
South Korea
Prior art keywords
partition
data
partition server
server
replication
Prior art date
Application number
KR1020090128434A
Other languages
Korean (ko)
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 KR1020090128434A priority Critical patent/KR20110071785A/en
Publication of KR20110071785A publication Critical patent/KR20110071785A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: A data duplication device of a distributed database system using log files and a method thereof are provided to make up the state same with a memory state of an original partition server based on log files, thereby easily maintaining the consistency of data among partition servers storing duplicate data. CONSTITUTION: A selection unit(101) selects a duplicate partition server for the duplication of data which an original partition server manages. A partition assigner(103) assigns partitions of the original partition server in the duplicate partition server. A log file manager(102) transfers the location information of a log file to the duplicate partition server. The log file comprises the update information about data of the partitions of the original partition server.

Description

분산 데이터베이스 시스템의 데이터 복제 장치 및 방법{APPARATUS AND METHOD FOR REPLICATING DATA IN DISTRIBUTED DATABASE SYSTEM}APPARATUS AND METHOD FOR REPLICATING DATA IN DISTRIBUTED DATABASE SYSTEM}

본 발명은 분산 데이터베이스 시스템 상에서 발생하는 부하에 따라 데이터의 복제를 통해 한 파티션 서버에 가해지는 부하를 감소하는 기술에 관한 것이다. 더욱 자세하게는, 가해지는 부하에 근거하여 복제할 파티션 서버를 선정하고, 복제 데이터를 관리하는 파티션 서버에 로그파일 및 파티션을 제공하여 로그파일을 통해 일괄적으로 복제 데이터를 관리할 수 있도록 하는 기술에 관한 것이다.The present invention relates to a technique for reducing the load on one partition server through the replication of data according to the load occurring on a distributed database system. More specifically, the technology to select a partition server to be replicated based on the load applied, and to provide a log file and partitions to the partition server managing the replication data to manage the replication data collectively through the log file It is about.

유무선 통신 기술의 발달, 및 컴퓨터 관련 기술의 발달에 따라 데이터를 효과적으로 관리하는 기술에 관한 연구가 이루어지고 있다. 사용자가 제작한 데이터, 예를 들어 UCC, 사용자 중심 어플리케이션 등의 등장으로 인해 한번에 관리해야 하는 데이터의 양 또한 급속도로 늘어나고 있는 추세이다.With the development of wired and wireless communication technologies and the development of computer-related technologies, researches have been conducted on technologies for effectively managing data. With the advent of user-generated data such as UCC and user-centric applications, the amount of data to be managed at once is also increasing rapidly.

또한, 멀티미디어 데이터의 고용량화와, 컴퓨터 처리 속도의 발전에 따라서, 개개의 데이터의 크기 역시 매우 커지고 있다. 따라서, 크기와 양에 있어서 모두 급속도로 그 총량이 늘어나고 있는 데이터 관리 기술이 절실하게 필요하다.In addition, with the increase in the capacity of multimedia data and the development of computer processing speed, the size of individual data is also very large. Therefore, there is an urgent need for data management techniques that are rapidly increasing in both size and quantity.

대용량의 데이터를 관리하기 위한 시스템으로 분산 데이터베이스 시스템이 존재한다. 분산 데이터베이스 시스템은 마스터 서버와 다수의 파티션 서버로 구성된다. 마스터 서버는 파티션 서버들을 관리하고 데이터가 속한 파티션 서버의 위치 등을 관리하게 된다. 파티션 서버는 실제 데이터가 속한 파티션을 관리하는 서버고, 데이터는 키를 기반으로 순차적으로 정렬되어 관리된다.There is a distributed database system for managing a large amount of data. A distributed database system consists of a master server and a number of partition servers. The master server manages partition servers and manages the location of partition servers to which data belongs. The partition server manages the partition to which the actual data belongs, and the data is arranged and managed sequentially based on the key.

사용자 측에서 데이터 검색 시, 마스터 서버가 먼저 어느 파티션 서버에 데이터가 존재하는지에 대한 정보를 제공하며, 사용자는 제공된 정보에 근거하여 직접 파티션 서버에 접속하고, 데이터를 사용하게 된다. 이러한 경우, 다수의 클라이언트가 특정 파티션 또는 특정 데이터에 대해 접근할 경우, 특정 파티션을 관리해야 하는 파티션 서버에는 큰 부하가 걸리게 된다. 따라서 이러한 경우 특정 파티션을 분할하여 다른 파티션 서버에서 관리하거나, 특정 파티션 서버 자체를 다른 파티션 서버에 복제하여 두 개의 같은 데이터를 포함하는 파티션 서버로 부하를 분산시키는 방법이 소개되어왔다.When retrieving data from the user side, the master server first provides information on which partition server exists, and the user directly accesses the partition server based on the provided information and uses the data. In such a case, when a large number of clients access a specific partition or a specific data, there is a heavy load on the partition server that needs to manage a specific partition. Therefore, in this case, a method of partitioning a specific partition and managing it in another partition server or replicating a specific partition server itself to another partition server has been introduced.

그러나, 데이터를 단순하게 복제하는 방법은, 대용량의 데이터를 복제할 경우 막대한 비용이 소모되는 문제점이 있었다. 또한, 데이터를 관리하는 복수의 파티션 서버들 중 일부에서 고장이 일어나거나 갱신이 되어 복제된 데이터들 간의 조정이 필요할 때, 데이터의 일관성을 유지하기 힘든 문제점이 지적되어왔다.However, the method of simply replicating data has a problem in that a huge cost is consumed when replicating a large amount of data. In addition, it has been pointed out that it is difficult to maintain data consistency when some of the plurality of partition servers managing data fail or are updated to adjust the replicated data.

상기 언급한 문제점을 해결하기 위하여, 본 발명은 분산 저장시스템 중 로그 기반의 분산 저장 시스템을 사용하여 복제되는 데이터들 간의 일관성 유지를 용이하게 할 수 있게 하는 데 그 목적이 있다. 또한, 복제되는 원본 파티션 서버의 선택을 능동적으로 선택할 수 있도록 하고 로그파일의 전송 및 파티션 할당을 수행하게 하는 기술을 제공하는 데 그 목적이 있다.In order to solve the above-mentioned problems, an object of the present invention is to make it easy to maintain consistency among data to be replicated using a log-based distributed storage system of the distributed storage system. It is also an object of the present invention to provide a technique for actively selecting a source partition server to be replicated and for performing log file transfer and partition allocation.

상기 언급한 목적을 달성하기 위하여, 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치는, 원본 파티션 서버가 관리하는 데이터의 복제를 위한 복제 파티션 서버를 선정하는 선정부와, 원본 파티션 서버에 포함된 파티션들을 복제 파티션 서버에 할당하는 파티션 할당부와, 원본 파티션 서버에 포함된 파티션들의 로그파일 위치정보를 복제 파티션 서버에 전달하는 로그파일 관리부를 포함하는 것을 특징으로 한다.In order to achieve the above object, a data replication apparatus of a distributed database system according to an embodiment of the present invention, the selection unit for selecting a replication partition server for the replication of data managed by the source partition server, and the source partition server A partition allocator for allocating the included partitions to the replica partition server and a log file manager for transmitting the log file location information of the partitions included in the original partition server to the replica partition server.

또한 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 방법은, 선정부가 원본 파티션 서버가 관리하는 데이터의 복제를 위한 복제 파티션 서버를 선정하는 단계; 파티션 할당부가 원본 파티션 서버에 포함된 파티션들을 복제 파티션 서버에 할당하는 단계; 및 로그파일 관리부가 원본 파티션 서버에 포함된 파티션들의 로그파일 위치정보를 복제 파티션 서버에 전달하는 단계를 포함하는 것을 특징으로 한다.In addition, the data replication method of the distributed database system according to an embodiment of the present invention, the selection unit selecting a replication partition server for the replication of data managed by the original partition server; Assigning, by the partition allocator, partitions included in the original partition server to the replica partition server; And transmitting log file location information of partitions included in the original partition server to the replication partition server.

또한, 선정부는 복제 대상이 되는 원본 파티션 서버 선택 시, 파티션 서버에 걸리는 부하가 임계값을 초과하는 경우 복제 대상이 되는 원본 파티션 서버로 선택하는 기능을 더 포함하는 것을 특징으로 한다.The selection unit may further include a function of selecting a source partition server to be a replication target when the load on the partition server exceeds a threshold when selecting a source partition server to be a replication target.

본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치 및 방법에 의하면, 파티션을 할당한 뒤 로그파일을 복사하는 방식을 통해서, 로그파일을 로딩하여 원본 파티션 서버의 메모리 상태와 동일한 상태로 만들 수 있기 때문에, 복제 데이터를 저장하는 복수의 파티션 서버들 사이에 갱신 등의 데이터 변환 시에 로그 파일을 이용하여 데이터의 일관성을 유지하기 용이한 효과가 있다. 또한 로그파일의 복사를 통해 능동적인 데이터 복사가 가능한 효과도 있다.According to the data replication apparatus and method of a distributed database system according to an embodiment of the present invention, a log file may be loaded and made into the same state as the memory state of the original partition server by allocating partitions and copying log files. Therefore, there is an effect that it is easy to maintain the consistency of data by using a log file when converting data such as an update between a plurality of partition servers storing duplicate data. It also has the effect of actively copying data by copying log files.

이하, 도 1을 참조하여 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치에 대해서 설명하기로 한다.Hereinafter, a data replication apparatus of a distributed database system according to an exemplary embodiment of the present invention will be described with reference to FIG. 1.

도 1은 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치의 블록도이다.1 is a block diagram of a data replication apparatus of a distributed database system according to an exemplary embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시 예에 따른 분산 데이터 베이스 시스템의 데이터 복제 장치는, 선정부(101), 파티션 할당부(103) 및 로그파일 관리부(102)를 포함하는 것을 특징으로 한다.Referring to FIG. 1, a data replication apparatus of a distributed database system according to an exemplary embodiment of the present invention may include a selector 101, a partition allocator 103, and a log file manager 102.

본 발명의 실시 예에서의 분산 데이터베이스 시스템은 로그 기반의 저장모델을 사용하고 있다. 로그기반의 저장 모델은 데이터를 디스크에 바로 반영하지 않고 로그파일에 순차적으로 기록한 수 메모리 캐쉬에 저장하는 방식을 사용한다. 랜덤으로 파일을 쓰는 것을 순차적인 기록으로 변환하기 때문에, 디스크상에서 랜덤한 접근을 감소시켜 기록 연산을 최적화할 수 있는 저장 모델이다.The distributed database system in the embodiment of the present invention uses a log-based storage model. The log-based storage model uses a method of storing data in numerical memory caches that are sequentially written to log files instead of being reflected directly to disk. Since a file is randomly written into a sequential recording, it is a storage model that can optimize recording operations by reducing random access on disk.

로그 기반의 저장 시스템 구조는 클라이언트가 시스템에 데이터 업데이트를 요청하면 시스템은 데이터의 일관성을 위하여 로그파일에 업데이트 내용을 기록한다. 그리고 메모리내에 데이터를 저장한다. 디스크상에 기록된 로그파일은 오류 복구 시 시스템이 재가동될 때 매모리내의 상태를 복구하기 위해 사용된다. 메모리내에 데이터를 저장할 공간이 없는 경우 또는 주기적으로 메모리내의 데이터를 디스크에 저장한다. 메모리내의 데이터를 디스크에 저장하게 되면 디스크로 저장된 데이터 엔트리를 로그파일에서 삭제한다.In the log-based storage system structure, when a client requests data update from the system, the system records the update in a log file for data consistency. The data is then stored in memory. Log files written to disk are used to recover the state in memory when the system is restarted during error recovery. When there is no space to store data in the memory or periodically, the data in the memory is stored on the disk. When data in memory is saved to disk, data entries saved to disk are deleted from the log file.

디스크에 저장된 다수의 데이터 파일들이 소정 개수를 초과하게 되면, 데이터파일을 병합하여 하나의 데이터 파일로 변환한다. 이 때 불필요한 데이터들은 삭제되어 디스크의 낭비를 줄일 수 있게 된다.When a plurality of data files stored on the disk exceeds a predetermined number, the data files are merged into one data file. At this time, unnecessary data is deleted to reduce the waste of the disk.

본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치(100)는 상기 언급한 로그파일 기반의 저장 시스템을 사용하여 데이터의 복제 시에 로그파일을 복제하는 기능을 수행하게 된다.The data replication apparatus 100 of the distributed database system according to an exemplary embodiment of the present invention performs a function of replicating log files when data is replicated using the above-described storage system based on log files.

선정부(101)는, 복제 대상이 되는 원본 파티션 서버가 관리하는 데이터의 복제를 위한 복제 파티션 서버를 선정한다. 따라서 선정부(101)는, 복제의 대상이 되는 원본 파티션 서버를 구분하는 기능과, 복제 파티션 서버를 선정하는 기능을 동시에 수행한다.The selecting unit 101 selects a replication partition server for replicating data managed by the original partition server to be replicated. Therefore, the selecting unit 101 simultaneously performs a function of identifying a source partition server to be cloned and a function of selecting a duplicate partition server.

선정부(101)는 복제 대상이 되는 원본 파티션 서버를 구분한다. 본 발명의 실시 예에서는 선정부(101)는 네트워크(104)를 통해 분산 데이터베이스 시스템에 연결된 복수의 파티션 서버들을 실시간으로 감시한다. 더욱 자세하게는 복수의 파티션 서버들에 가해지는 부하, 즉 얼마나 많은 사용자가 특정 파티션 서버에 접속하여 데이터를 사용하고 있는지를 감시하게 된다. 복수의 파티션 서버들에 가해지는 부하가 소정 값을 초과하면, 측 부하 초과 상태가 되면, 부하가 초과된 파티션 서버를 복제 대상이 되는 원본 파티션 서버로 설정하게 된다.The selecting unit 101 distinguishes an original partition server to be cloned. In an embodiment of the present invention, the selector 101 monitors a plurality of partition servers connected to a distributed database system through a network 104 in real time. More specifically, it monitors the load on multiple partition servers, how many users are accessing and using data on a particular partition server. When the load on the plurality of partition servers exceeds a predetermined value, when the load exceeds the side load state, the overload partition server is set as a source partition server to be replicated.

또는, 파티션 서버들 각각이 네트워크(104)를 통해서 선정부(101)에 파티션 서버 각각에 부하가 초과되었는지 여부를 알려주는 기능을 수행할 수도 있을 것이다. 따라서, 선정부(101)는 특정 파티션 서버에서 자신에게 가해지는 부하가 소정 값을 초과한다는 신호를 수신하면, 신호를 송신한 특정 파티션 서버를 복제 대상이 되는 원본 파티션 서버로 설정하게 되는 것이다.Alternatively, each of the partition servers may perform a function of notifying whether the load of the partition servers is exceeded to the selecting unit 101 through the network 104. Therefore, when the selector 101 receives a signal indicating that the load applied to the specific partition server exceeds a predetermined value, the selector 101 sets the specific partition server that has transmitted the signal as the original partition server to be replicated.

선정부(101)는, 파티션 할당부(103) 및 로그파일 관리부(102)에 원본 파티션 서버에 대한 정보를 전달하는 기능을 더 포함할 수 있을 것이다. 네트워크를 통해서 일일이 파티션 할당부(103) 및 로그파일 관리부(102)에 원본 파티션 서버의 복제를 위한 원본 파티션 서버에 대한 정보를 전달하기 어렵고, 선정부(101)와 통신을 함으로써 원본 파티션에 대한 정보의 통일성을 이룰 수 있기 때문이다. 따라서 선정부(101)는 원본 파티션 서버가 설정되면 설정된 원본 파티션 서버에 대한 정보를 파티션 할당부(103) 및 로그파일 관리부(102)에 송신할 수 있을 것이다.The selecting unit 101 may further include a function of transferring information on the original partition server to the partition allocating unit 103 and the log file managing unit 102. It is difficult to transfer information about the original partition server for replication of the original partition server to the partition allocator 103 and the log file manager 102 through the network, and the information about the original partition by communicating with the selector 101. This is because unity can be achieved. Therefore, when the original partition server is set, the selector 101 may transmit information about the set original partition server to the partition allocator 103 and the log file manager 102.

선정부(101)는 상기 언급한 파티션 서버들에 대한 감시를 통해 원본 파티션 서버가 복제될 복제 파티션 서버를 선정한다. 원본 파티션 서버의 내용을 포함할 수 있는 가용한 파티션 서버를 검색한다. 가용한 파티션 서버를 복제 파티션 서버로 선정하여, 데이터의 복제를 수행하게 한다.The selecting unit 101 selects a replication partition server to which the original partition server is to be replicated by monitoring the aforementioned partition servers. Search for an available partition server that can contain the contents of the original partition server. Select an available partition server as a replication partition server to perform data replication.

파티션 할당부(103)는, 복제될 데이터를 포함하는 파티션들, 즉 원본 파티션 서버에 포함된 파티션들을 복제 파티션 서버에 할당하는 기능을 수행한다. 이를 통해서, 복제 파티션 서버는 원본 파티션 서버에 포함된 파티션과 동일한 파티션을 할당받아 관리하게 되어, 데이터의 복제가 이루어 지는 것이다.The partition allocating unit 103 performs a function of allocating partitions including data to be replicated, that is, partitions included in the original partition server, to the replica partition server. Through this, the replication partition server is managed by receiving the same partition as the partition included in the original partition server, the data is replicated.

파티션 할당부(103)는 선정부로부터 복제대상 파티션 서버, 즉 원본 파티션 서버에 대한 위치 정보 및 복제 파티션 서버에 대한 위치정보를 수신할 수 있다. 어떠한 파티션 서버에 포함된 파티션들을 어느 복제 파티션 서버에 할당할지를 결정해야 하기 때문이다. 원본 파티션 서버에 대한 정보를 수신하면, 원본 파티션 서버에 포함된 파티션들을 동일하게 복제 파티션 서버에 할당하도록 명령하게 된다.The partition allocating unit 103 may receive location information on the replication target partition server, that is, the original partition server, and location information on the replication partition server, from the selection unit. This is because you have to decide which replica partition server to assign which partition server. When receiving the information on the source partition server, the command to assign the partitions included in the source partition server to the replica partition server.

파티션 할당부(103)는 원본 파티션 서버에 복제 파티션 서버로의 파티션 할당을 명령하는 기능을 더 포함할 수 있다. 파티션 할당부(102) 자체에서 파티션을 할당받고 할당받은 파티션을 다시 복제 파티션 서버에 할당할 수도 있을 것이다.The partition allocator 103 may further include a function of instructing an original partition server to allocate a partition to the replica partition server. The partition allocator 102 may allocate the partition and allocate the partition to the replica partition server again.

로그파일 관리부(102)는 원본 파티션 서버에 존재하는 로그파일의 위치정보를 복제 파티션 서버에 전달하는 기능을 수행한다. 로그파일 관리부(102)는 따라서, 전체 파티션 서버에 포함된 복수의 파티션들의 로그파일의 위치정보를 저장하여 관리하는 기능을 더 포함할 수 있다.The log file manager 102 transmits the location information of the log file existing in the original partition server to the replica partition server. The log file manager 102 may thus further include a function of storing and managing location information of log files of a plurality of partitions included in the entire partition server.

로그파일 관리부(102)는 또한 선정부(101)로부터 복제대상 파티션 서버, 즉 원본 파티션 서버에 대한 위치 정보 또는 복제 대상 파티션 서버에 대한 위치 정보를 수신할 수 있다. 파티션 할당부(103)와 마찬가지로, 어떠한 파티션 서버에 포함된 파티션에 대한 로그파일을 어디에 전송해야 할지 결정해야 하기 때문이다.The log file management unit 102 may also receive location information on the replication target partition server, that is, the source partition server or location information on the replication target partition server, from the selection unit 101. This is because, like the partition allocator 103, it is necessary to determine where to send log files for partitions included in which partition server.

기본적으로 로그파일은 데이터의 업데이트 내용을 저장하고 있다. 따라서, 로그파일 관리부(102)에 의해 원본 파티션 서버에 포함된 파티션들의 로그파일 위치정보를 전송함으로써, 원본 파티션 서버의 업데이트 정보와 동일한 업데이트를 수행할 수 있다. 이에 따라서, 동일한 데이터를 포함하고 있는 복수의 파티션 서버들 사이의 데이터의 일관성이 유지될 수 있는 능동적인 데이터 복제가 가능한 효과가 있다.By default, log files store data updates. Therefore, by transmitting the log file position information of the partitions included in the original partition server by the log file management unit 102, it is possible to perform the same update as the update information of the original partition server. Accordingly, there is an effect capable of active data replication in which data consistency between a plurality of partition servers containing the same data can be maintained.

로그파일 관리부(102)는 파티션 서버에 로그파일 위치정보를 전송하며, 복제 파티션 서버는 로그파일을 로딩하여 메모리의 상태를 원본 메모리 상태와 동일하도록 한다. 따라서 데이터의 복제를 수행할 경우 원본 파티션 서버는 복제 파티션 서버에 일일이 업데이트 내용을 전송할 필요가 없어지며, 로그파일의 위치정보만을 전송하여 업데이트를 순조롭게 진행할 수 있다. 이에 따라서 복제 데이터 서버 들 및 복제 데이터 서버를 사이의 파일의 동기화를 용이하게 이룰 수 있는 효과가 있을 것이다.The log file management unit 102 transmits log file position information to the partition server, and the replica partition server loads the log file so that the state of the memory is the same as that of the original memory. Therefore, when the data is replicated, the original partition server does not need to transmit the update contents to the replication partition server, and the update can be smoothly performed by transmitting only the location information of the log file. Accordingly, there will be an effect of facilitating synchronization of files between the replica data servers and the replica data server.

도 2는 본 발명의 실시 예에 따른 분산 데이터베이스 시스템을 개략적으로 도시한 것이다. 이하의 설명에서는 도 1에 대한 설명과 중복되는 부분은 설명을 생략하기로 한다.2 schematically illustrates a distributed database system according to an embodiment of the present invention. In the following description, portions that overlap with the description of FIG. 1 will be omitted.

도 2를 참조하면, 데이터를 요청하고 파티션 서버에 접속하여 사용하는 사용 자 단말기(201), 본 발명의 실시 예에 다른 분산 데이터베이스 시스템의 데이터 복제 장치(200), 네트워크(203), 및 파티션 서버(PA, PB, PC ~ PN)들로 이루어진 파티션 서버군(202)가 분산 데이터베이스 시스템을 구성하고 있다. 파티션 서버군(202)을 관리하는 마스터 서버(도시되지 않음)에 본 발명의 실시 예에 다른 분산 데이터베이스 시스템의 데이터 복제 장치(200)가 포함될 수 있을 것이다.2, a user terminal 201 for requesting data and accessing and using a partition server, a data replication apparatus 200, a network 203, and a partition server of a distributed database system according to an embodiment of the present invention. A partition server group 202 consisting of (PA, PB, PC to PN) constitutes a distributed database system. A master server (not shown) managing the partition server group 202 may include a data replication apparatus 200 of another distributed database system in an embodiment of the present invention.

사용자 단말기(201)는 데이터의 사용을 위하여 마스터 서버에 데이터를 포함하고 있는 파티션이 속한 파티션 서버의 위치 정보를 요청한다. 마스터 서버는 요청되는 데이터를 포함하는 파티션 서버의 위치 정보를 사용자 단말기(201)에 전달하고, 사용자 단말기(201)는 네트워크(203) 통해 전달받은 위치 정보에 대응하는 파티션 서버에 접속하여 데이터를 사용하게 된다.The user terminal 201 requests location information of the partition server to which the partition containing data belongs to the master server in order to use the data. The master server transmits the location information of the partition server including the requested data to the user terminal 201, and the user terminal 201 accesses the partition server corresponding to the location information received through the network 203 and uses the data. Done.

데이터 복제 장치(200)는 파티션 서버군(202)을 실시간 감시하게 되고, 부하가 초과된 원본 파티션 서버(예를 들어 PA) 정보가 수신되면 원본 파티션 서버 PA를 복제할 수 있는 가용한 파티션 서버를 검색한다. The data replication apparatus 200 monitors the partition server group 202 in real time, and receives an available partition server capable of replicating the original partition server PA when information of an overloaded source partition server (for example, PA) is received. Search.

파티션 서버 PN이 가용한 복제 파티션 서버로 선정되면, 선정부(101)는 원본 파티션 서버 PA의 위치 정보 또는 복제 파티션 서버의 위치정보를 각각 파티션 할당부(103) 및 로그파일 관리부(102)에 송신할 수 있다. 그리고 상기 언급한 바와 같이 복제 파티션 서버 PN에 원본 파티션 서버 PA와 동일한 파티션을 할당하고, 원본 파티션 서버 PA의 로그파일의 위치정보를 복제 파티션 서버 PN에 전달함으로써, 복제 파티션 서버 PN와 원본 파티션 서버 PA 간에 데이터의 변화도 동일하게 적용되는 능동적인 데이터 복제가 가능해지는 것이다.If the partition server PN is selected as an available replication partition server, the selecting unit 101 transmits the location information of the original partition server PA or the location information of the replication partition server to the partition allocating unit 103 and the log file management unit 102, respectively. can do. As mentioned above, by assigning the same partition as the original partition server PA to the replication partition server PN and transferring the location information of the log file of the source partition server PA to the replication partition server PN, the replication partition server PN and the source partition server PA In the meantime, it is possible to proactively copy data, which is equally applicable to changes in data.

도 3은 본 발명의 다른 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치의 기능 흐름도이다. 이하의 설명에서 도 1 및 도 2의 설명과 중복되는 부분은 설명을 생략하기로 한다.3 is a functional flowchart of a data replication apparatus of a distributed database system according to another embodiment of the present invention. In the following description, portions that overlap with the description of FIGS. 1 and 2 will be omitted.

도 3을 참조하면, 복수의 파티션 서버 PA, PB, PC 내지 PN으로 이루어지는 파티션 서버군(304)에서는 선정부(301)에 부하가 초과되었다는 것을 알리게 된다. 도 1 및 도 2에서 선정부(101)가 파티션 서버들을 감시하는 것과 달리, 도 3의 실시 예에서는 파티션 서버 각각이 선정부(301)에 부하 초과 여부 신호를 송신하게 되는 것이다.Referring to FIG. 3, in the partition server group 304 including the plurality of partition servers PA, PB, PC, and PN, the selection unit 301 notifies that the load is exceeded. Unlike in FIG. 1 and FIG. 2, the selector 101 monitors the partition servers, in the embodiment of FIG. 3, each partition server transmits an overload signal to the selector 301.

부하가 초과된 파티션 서버 PA로부터 부하 초과 신호를 수신하면, 선정부(301)는 파티션 할당부(303)와 로그파일 관리부(302)에 복제 대상 파티션 서버, 즉 원본 파티션 서버 PA에 대한 위치정보를 송신하게 된다. 선정부(301)는 원본 파티션 서버 PA에 대한 위치정보 이외에도, 복제 파티션 서버 Pn에 대한 위치 정보 역시 송신할 수 있을 것이다. When the load overload signal is received from the overloaded partition server PA, the selector 301 informs the partition allocator 303 and the log file management unit 302 of the location information of the replication target partition server, that is, the original partition server PA. Will be sent. The selection unit 301 may also transmit location information on the replication partition server Pn in addition to the location information on the original partition server PA.

파티션 할당부(303)는, 원본 파티션 서버 PA에 대한 위치정보 및 복제 파티션 서버 Pn에 대한 위치정보에 근거하여 원본 파티션 서버 PA에 복제 파티션 서버 Pn으로 원본 파티션 서버 PA와 동일한 파티션을 할당할 것을 명령하거나, 직접 상기 동일한 파티션을 복제 파티션 서버 Pn으로 할당할 수 있을 것이다.The partition allocating unit 303 instructs the original partition server PA to allocate the same partition as the original partition server PA to the replication partition server Pn based on the location information on the source partition server PA and the location information on the replication partition server Pn. Alternatively, the same partition may be directly assigned to the replica partition server Pn.

로그파일 관리부(302)는 선정부(301)로부터 원본 파티션 서버 PA에 대한 위치정보 또는 복제 파티선 서버 Pn에 대한 위치정보를 수신한다. 원본 파티션 서버 PA에 대한 위치정보에 근거하여 원본 파티션 서버 PA에 포함된 파티션들의 로그파 일의 위치정보를 검색한다. 검색된 로그파일의 위치정보를 복제 파티션 서버 Pn의 위치정보에 대응하는 주소로 송신하게 된다.The log file manager 302 receives the location information of the original partition server PA or the location information of the duplicate partition line server Pn from the selector 301. Retrieve location information of log files of partitions included in the source partition server PA based on the location information of the source partition server PA. The location information of the retrieved log file is transmitted to an address corresponding to the location information of the replication partition server Pn.

도 4는 데이터 복제 장치에 의해 생성된 복제 파티션 서버 및 원본 파티션 서버의 로그 기반 파일 저장에 대한 플로우 차트이다. 이하의 설명에서는 도 1 내지 도 3에 대한 설명과 중복되는 부분에 대한 설명은 생략하기로 한다.4 is a flow chart for log-based file storage of a replication partition server and an original partition server generated by a data replication device. In the following description, a description of portions overlapping with the description of FIGS. 1 to 3 will be omitted.

도 4를 참조하면, 원본 파티션 서버와 복제 파티션 서버는 동일한 로그 파일을 공유하고 있으며, 동일한 데이터를 포함하는 복수의 파티션들을 관리하게 된다.Referring to FIG. 4, the source partition server and the replica partition server share the same log file and manage a plurality of partitions including the same data.

사용자 단말기로부터 데이터의 업데이트 요청이 수신되면(S401), 파티션 서버 또는 전체 파티션 서버를 관리하는 마스터 서버는 파티션 서버의 위치정보에 근거하여 데이터를 포함하는 파티션 서버에 대한 로그파일을 검색하게 된다. 검색된 로그파일에 데이터(또는 데이터를 포함하는 복수의 파티션들)에 대한 업데이트 내용을 기록하는 단계(S403)를 수행한다. 이후, 메모리 내에 업데이트 된 데이터를 저장한다(S403).When a request for updating data is received from the user terminal (S401), the partition server or the master server managing the entire partition server searches the log file for the partition server including the data based on the location information of the partition server. In step S403, the update contents of the data (or a plurality of partitions including the data) are recorded in the retrieved log file. Thereafter, the updated data is stored in the memory (S403).

마스터 서버는 만약 시스템이 서버의 오류 복구 등에 의해 재가동되는 경우 또는 소정 주기가 지난 경우인지 판단하는 단계(S404)를 실시간으로 수행하게 된다. 시스템이 서버의 오류 복구 등에 의해 재가동 되거나 소정 주기가 지난 것으로 판단되면, 메모리 내의 데이터를 디스크에 저장하는 단계(S405)를 수행하여 실질적인 데이터의 업데이트를 수행하게 된다.The master server performs a step (S404) in real time to determine if the system is restarted by the error recovery of the server or if a predetermined period has passed. If it is determined that the system is restarted due to error recovery of the server or the like, the predetermined period has passed, the step of storing the data in the memory on the disk (S405) is performed to perform the actual data update.

데이터가 디스크에 저장되면, 저장된 데이터의 엔트리, 즉 저장된 데이터에 대응하는 데이터의 업데이트 내용은 필요없게 된다. 따라서, 파티션 서버는 저장된 데이터에 대응하는 데이터의 업데이트 내용, 즉 저장된 데이터의 엔트리를 로그파일에서 삭제하는 단계(S406)를 수행한다.When data is stored on the disk, entries of stored data, i.e., update contents of data corresponding to the stored data, are not necessary. Therefore, the partition server deletes the update contents of the data corresponding to the stored data, that is, the entry of the stored data from the log file (S406).

상기 S401 단계 내지 S406단계는 저장된 데이터의 개수가 소정 개수 이상을 초과하기 전까지 반복된다. 저장된 데이터의 개수가 소정 개수를 초과하면(S407), 파티션 서버는 자신이 관리하는 파티션들에 포함된 데이터를 병합하여 하나의 데이터 파일로 변환한다(S408). 또는, 분산된 데이터가 각각 저장되어 병합할 필요가 있을 경우에도, 데이터를 병합할 수 있다. 이 때, 불필요한 데이터들은 삭제된다.Steps S401 to S406 are repeated until the number of stored data exceeds a predetermined number or more. If the number of stored data exceeds a predetermined number (S407), the partition server merges the data included in the partitions managed by the partition server into one data file (S408). Alternatively, data may be merged even when distributed data are each stored and need to be merged. At this time, unnecessary data are deleted.

상기의 단계를 통하여 파티션 서버에 포함된 로그파일과, 데이터의 업데이트가 관리된다. 상기 언급한 바와 같이, 원본 파티션 서버와 복제 파티션 서버는 같은 내용의 파티션을 관리하게 되고, 동일한 로그파일을 포함하기 때문에, 로그파일의 업데이트만을 통해서 전체 파티션서버에 포함된 파티션의 데이터에 대한 업데이트를 동일하게 적용할 수 있다. Through the above steps, the log file included in the partition server and the update of data are managed. As mentioned above, since the original partition server and the replica partition server manage the partitions having the same contents and include the same log file, only the update of the log file can update the data of the partition included in the entire partition server. The same can be applied.

따라서, 단순한 데이터 복제와는 달리, 능동적으로 데이터의 업데이트 상황까지 동일하게 하는 능동적인 복제가 가능하다. 이를 통하여, 원본과 복제 파티션 서버의 데이터의 일관성을 용이하게 유지할 수 있는 효과가 있다.Thus, unlike simple data replication, active replication is possible, which enables the same update status of the data. Through this, it is possible to easily maintain the consistency of the data of the original and replica partition server.

도 5는 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 방법에 대한 플로우차트이다. 이하의 설명에서, 도 1 내지 도 4와 중복되는 설명은 생략하기로 한다.5 is a flowchart illustrating a data replication method of a distributed database system according to an embodiment of the present invention. In the following description, description overlapping with FIGS. 1 to 4 will be omitted.

도 5를 참조하면, 먼저 선정부가 특정 파티션 서버에 부하 초과현상이 발생하는지 감시하는 단계(S501)가 수행된다. 특정 파티션 서버에 부하 초과현상이 발 생하면, 선정부는 상기 특정 파티션 서버를 원본 파티션 서버로 설정하고, 가용한 다른 파티션 서버를 검색하여 복제 파일을 관리할 복제 파티션 서버를 선정하는 단계(S502)를 수행한다.Referring to FIG. 5, a first step S501 of monitoring whether an overload occurs in a specific partition server is performed. When a load overload occurs in a specific partition server, the selecting unit sets the specific partition server as the original partition server, searches for another available partition server, and selects a replication partition server to manage a replication file (S502). Perform.

파티션 할당부는 복제 파티션 서버가 선정되면, 원본 파티션 서버의 위치 정보 및 복제 파티션 서버의 위치 정보에 근거하여 원본 파티션 서버와 동일한 파티션을 복제 파티션 서버에 할당하는 단계(S503)를 수행한다. 동시에, 로그파일 관리부는 원본 파티션 서버의 위치 정보 및 복제 파티션 서버의 위치정보에 근거하여 원본 파티션 서버에 포함되는 파티션들의 로그파일의 위치정보를 복제 파티션 서버에 전달하는 단계(S504)를 수행한다. 이후, 로그 파일을 메모리에 로딩하는 단계(S505)를 포함한 상기 도 4에 설명된 기능을 수행하게 되는 것이다.When the replica partition server is selected, the partition allocating unit allocates the same partition to the replica partition server based on the location information of the source partition server and the location information of the replica partition server (S503). At the same time, the log file manager transmits the location information of the log files of the partitions included in the original partition server to the replica partition server based on the location information of the source partition server and the location information of the replica partition server (S504). Subsequently, the function described in FIG. 4 is performed, including the step of loading the log file into the memory (S505).

본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치 및 방법에 대한 설명은 오로지 설명적인 용도로만 사용되어야 할 것이며, 특허청구범위를 제한하는 것은 아니다. 또한, 본 발명의 실시 예 이외에도, 본 발명과 동일한 기능을 하는 균등한 발명 역시 본 발명의 권리범위에 속할 것임은 당연할 것이다.Description of the data replication apparatus and method of the distributed database system according to an embodiment of the present invention should be used only for descriptive purposes, and do not limit the claims. In addition, besides the embodiments of the present invention, it will be obvious that equivalent inventions having the same functions as the present invention will also belong to the scope of the present invention.

도 1은 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치의 블록도이다.1 is a block diagram of a data replication apparatus of a distributed database system according to an exemplary embodiment of the present invention.

도 2는 본 발명의 실시 예에 따른 분산 데이터베이스 시스템을 개략적으로 도시한 것이다.2 schematically illustrates a distributed database system according to an embodiment of the present invention.

도 3은 본 발명의 다른 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 장치의 기능 흐름도이다.3 is a functional flowchart of a data replication apparatus of a distributed database system according to another embodiment of the present invention.

도 4는 데이터 복제 장치에 의해 생성된 복제 파티션 서버 및 원본 파티션 서버의 로그 기반 파일 저장에 대한 플로우 차트이다.4 is a flow chart for log-based file storage of a replication partition server and an original partition server generated by a data replication device.

도 5는 본 발명의 실시 예에 따른 분산 데이터베이스 시스템의 데이터 복제 방법에 대한 플로우차트이다.5 is a flowchart illustrating a data replication method of a distributed database system according to an embodiment of the present invention.

Claims (1)

원본 파티션 서버가 관리하는 데이터의 복제를 위한 복제 파티션 서버를 선정하는 선정부와,A selection unit for selecting a replication partition server for replicating data managed by the original partition server; 상기 원본 파티션 서버에 포함된 파티션들을 상기 복제 파티션 서버에 할당하는 파티션 할당부와,A partition allocator for allocating partitions included in the original partition server to the replica partition server; 상기 원본 파티션 서버에 포함된 파티션들의 데이터에 대한 업데이트 정보를 포함하는 로그파일의 위치정보를 상기 복제 파티션 서버에 전달하는 로그파일 관리부를 포함하는 것을 특징으로 하는 분산 데이터베이스 시스템의 데이터 복제 장치.And a log file management unit for transmitting location information of a log file including update information of data of partitions included in the original partition server, to the replica partition server.
KR1020090128434A 2009-12-21 2009-12-21 Apparatus and method for replicating data in distributed database system KR20110071785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090128434A KR20110071785A (en) 2009-12-21 2009-12-21 Apparatus and method for replicating data in distributed database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090128434A KR20110071785A (en) 2009-12-21 2009-12-21 Apparatus and method for replicating data in distributed database system

Publications (1)

Publication Number Publication Date
KR20110071785A true KR20110071785A (en) 2011-06-29

Family

ID=44402801

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090128434A KR20110071785A (en) 2009-12-21 2009-12-21 Apparatus and method for replicating data in distributed database system

Country Status (1)

Country Link
KR (1) KR20110071785A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101631039B1 (en) 2015-11-30 2016-06-24 (주)클로닉스 System and method for migrating file except for unnecessary file among operating system and data of computer system
US11157512B2 (en) 2017-12-22 2021-10-26 Warevalley Co., Ltd. Method and system for replicating data to heterogeneous database and detecting synchronization error of heterogeneous database through SQL packet analysis

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101631039B1 (en) 2015-11-30 2016-06-24 (주)클로닉스 System and method for migrating file except for unnecessary file among operating system and data of computer system
US11157512B2 (en) 2017-12-22 2021-10-26 Warevalley Co., Ltd. Method and system for replicating data to heterogeneous database and detecting synchronization error of heterogeneous database through SQL packet analysis

Similar Documents

Publication Publication Date Title
JP6479020B2 (en) Hierarchical chunking of objects in a distributed storage system
JP6708948B2 (en) Block storage
EP3014487B1 (en) Grouping of objects in a distributed storage system based on journals and placement policies
JP4265245B2 (en) Computer system
CN105549905A (en) Method for multiple virtual machines to access distributed object storage system
US20110153606A1 (en) Apparatus and method of managing metadata in asymmetric distributed file system
CN113672175A (en) Distributed object storage method, device and equipment and computer storage medium
CN102523279A (en) Distributed file system and hot file access method thereof
CN104750757B (en) A kind of date storage method and equipment based on HBase
KR20130123897A (en) Method and appratus for managing file in hybrid storage system
KR101236477B1 (en) Method of processing data in asymetric cluster filesystem
US20180004430A1 (en) Chunk Monitoring
US10057348B2 (en) Storage fabric address based data block retrieval
CN105760391B (en) Method, data node, name node and system for dynamically redistributing data
CN111708894A (en) Knowledge graph creating method
CN101483668A (en) Network storage and access method, device and system for hot spot data
KR20110071785A (en) Apparatus and method for replicating data in distributed database system
JP2014021690A (en) Data store managing device, data providing system and data providing method
KR100785774B1 (en) Obeject based file system and method for inputting and outputting
CN115277858B (en) Data processing method and system for big data
KR20150083276A (en) Remote Memory Data Management Method and System for Data Processing Based on Mass Memory
CN111399763B (en) Method, device, system, equipment and storage medium for data storage
CN114579514B (en) File processing method, device and equipment based on multiple computing nodes
CN117667987A (en) Storage system, data updating method and device
CN117331493A (en) Method, apparatus, device and computer readable medium for data storage

Legal Events

Date Code Title Description
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid