KR20110071785A - Apparatus and method for replicating data in distributed database system - Google Patents
Apparatus and method for replicating data in distributed database system Download PDFInfo
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital 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
Description
본 발명은 분산 데이터베이스 시스템 상에서 발생하는 부하에 따라 데이터의 복제를 통해 한 파티션 서버에 가해지는 부하를 감소하는 기술에 관한 것이다. 더욱 자세하게는, 가해지는 부하에 근거하여 복제할 파티션 서버를 선정하고, 복제 데이터를 관리하는 파티션 서버에 로그파일 및 파티션을 제공하여 로그파일을 통해 일괄적으로 복제 데이터를 관리할 수 있도록 하는 기술에 관한 것이다.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
본 발명의 실시 예에서의 분산 데이터베이스 시스템은 로그 기반의 저장모델을 사용하고 있다. 로그기반의 저장 모델은 데이터를 디스크에 바로 반영하지 않고 로그파일에 순차적으로 기록한 수 메모리 캐쉬에 저장하는 방식을 사용한다. 랜덤으로 파일을 쓰는 것을 순차적인 기록으로 변환하기 때문에, 디스크상에서 랜덤한 접근을 감소시켜 기록 연산을 최적화할 수 있는 저장 모델이다.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
선정부(101)는, 복제 대상이 되는 원본 파티션 서버가 관리하는 데이터의 복제를 위한 복제 파티션 서버를 선정한다. 따라서 선정부(101)는, 복제의 대상이 되는 원본 파티션 서버를 구분하는 기능과, 복제 파티션 서버를 선정하는 기능을 동시에 수행한다.The selecting
선정부(101)는 복제 대상이 되는 원본 파티션 서버를 구분한다. 본 발명의 실시 예에서는 선정부(101)는 네트워크(104)를 통해 분산 데이터베이스 시스템에 연결된 복수의 파티션 서버들을 실시간으로 감시한다. 더욱 자세하게는 복수의 파티션 서버들에 가해지는 부하, 즉 얼마나 많은 사용자가 특정 파티션 서버에 접속하여 데이터를 사용하고 있는지를 감시하게 된다. 복수의 파티션 서버들에 가해지는 부하가 소정 값을 초과하면, 측 부하 초과 상태가 되면, 부하가 초과된 파티션 서버를 복제 대상이 되는 원본 파티션 서버로 설정하게 된다.The selecting
또는, 파티션 서버들 각각이 네트워크(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
선정부(101)는, 파티션 할당부(103) 및 로그파일 관리부(102)에 원본 파티션 서버에 대한 정보를 전달하는 기능을 더 포함할 수 있을 것이다. 네트워크를 통해서 일일이 파티션 할당부(103) 및 로그파일 관리부(102)에 원본 파티션 서버의 복제를 위한 원본 파티션 서버에 대한 정보를 전달하기 어렵고, 선정부(101)와 통신을 함으로써 원본 파티션에 대한 정보의 통일성을 이룰 수 있기 때문이다. 따라서 선정부(101)는 원본 파티션 서버가 설정되면 설정된 원본 파티션 서버에 대한 정보를 파티션 할당부(103) 및 로그파일 관리부(102)에 송신할 수 있을 것이다.The selecting
선정부(101)는 상기 언급한 파티션 서버들에 대한 감시를 통해 원본 파티션 서버가 복제될 복제 파티션 서버를 선정한다. 원본 파티션 서버의 내용을 포함할 수 있는 가용한 파티션 서버를 검색한다. 가용한 파티션 서버를 복제 파티션 서버로 선정하여, 데이터의 복제를 수행하게 한다.The selecting
파티션 할당부(103)는, 복제될 데이터를 포함하는 파티션들, 즉 원본 파티션 서버에 포함된 파티션들을 복제 파티션 서버에 할당하는 기능을 수행한다. 이를 통해서, 복제 파티션 서버는 원본 파티션 서버에 포함된 파티션과 동일한 파티션을 할당받아 관리하게 되어, 데이터의 복제가 이루어 지는 것이다.The
파티션 할당부(103)는 선정부로부터 복제대상 파티션 서버, 즉 원본 파티션 서버에 대한 위치 정보 및 복제 파티션 서버에 대한 위치정보를 수신할 수 있다. 어떠한 파티션 서버에 포함된 파티션들을 어느 복제 파티션 서버에 할당할지를 결정해야 하기 때문이다. 원본 파티션 서버에 대한 정보를 수신하면, 원본 파티션 서버에 포함된 파티션들을 동일하게 복제 파티션 서버에 할당하도록 명령하게 된다.The
파티션 할당부(103)는 원본 파티션 서버에 복제 파티션 서버로의 파티션 할당을 명령하는 기능을 더 포함할 수 있다. 파티션 할당부(102) 자체에서 파티션을 할당받고 할당받은 파티션을 다시 복제 파티션 서버에 할당할 수도 있을 것이다.The
로그파일 관리부(102)는 원본 파티션 서버에 존재하는 로그파일의 위치정보를 복제 파티션 서버에 전달하는 기능을 수행한다. 로그파일 관리부(102)는 따라서, 전체 파티션 서버에 포함된 복수의 파티션들의 로그파일의 위치정보를 저장하여 관리하는 기능을 더 포함할 수 있다.The
로그파일 관리부(102)는 또한 선정부(101)로부터 복제대상 파티션 서버, 즉 원본 파티션 서버에 대한 위치 정보 또는 복제 대상 파티션 서버에 대한 위치 정보를 수신할 수 있다. 파티션 할당부(103)와 마찬가지로, 어떠한 파티션 서버에 포함된 파티션에 대한 로그파일을 어디에 전송해야 할지 결정해야 하기 때문이다.The log
기본적으로 로그파일은 데이터의 업데이트 내용을 저장하고 있다. 따라서, 로그파일 관리부(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
로그파일 관리부(102)는 파티션 서버에 로그파일 위치정보를 전송하며, 복제 파티션 서버는 로그파일을 로딩하여 메모리의 상태를 원본 메모리 상태와 동일하도록 한다. 따라서 데이터의 복제를 수행할 경우 원본 파티션 서버는 복제 파티션 서버에 일일이 업데이트 내용을 전송할 필요가 없어지며, 로그파일의 위치정보만을 전송하여 업데이트를 순조롭게 진행할 수 있다. 이에 따라서 복제 데이터 서버 들 및 복제 데이터 서버를 사이의 파일의 동기화를 용이하게 이룰 수 있는 효과가 있을 것이다.The log
도 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
사용자 단말기(201)는 데이터의 사용을 위하여 마스터 서버에 데이터를 포함하고 있는 파티션이 속한 파티션 서버의 위치 정보를 요청한다. 마스터 서버는 요청되는 데이터를 포함하는 파티션 서버의 위치 정보를 사용자 단말기(201)에 전달하고, 사용자 단말기(201)는 네트워크(203) 통해 전달받은 위치 정보에 대응하는 파티션 서버에 접속하여 데이터를 사용하게 된다.The
데이터 복제 장치(200)는 파티션 서버군(202)을 실시간 감시하게 되고, 부하가 초과된 원본 파티션 서버(예를 들어 PA) 정보가 수신되면 원본 파티션 서버 PA를 복제할 수 있는 가용한 파티션 서버를 검색한다. The
파티션 서버 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
도 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
부하가 초과된 파티션 서버 PA로부터 부하 초과 신호를 수신하면, 선정부(301)는 파티션 할당부(303)와 로그파일 관리부(302)에 복제 대상 파티션 서버, 즉 원본 파티션 서버 PA에 대한 위치정보를 송신하게 된다. 선정부(301)는 원본 파티션 서버 PA에 대한 위치정보 이외에도, 복제 파티션 서버 Pn에 대한 위치 정보 역시 송신할 수 있을 것이다. When the load overload signal is received from the overloaded partition server PA, the
파티션 할당부(303)는, 원본 파티션 서버 PA에 대한 위치정보 및 복제 파티션 서버 Pn에 대한 위치정보에 근거하여 원본 파티션 서버 PA에 복제 파티션 서버 Pn으로 원본 파티션 서버 PA와 동일한 파티션을 할당할 것을 명령하거나, 직접 상기 동일한 파티션을 복제 파티션 서버 Pn으로 할당할 수 있을 것이다.The
로그파일 관리부(302)는 선정부(301)로부터 원본 파티션 서버 PA에 대한 위치정보 또는 복제 파티선 서버 Pn에 대한 위치정보를 수신한다. 원본 파티션 서버 PA에 대한 위치정보에 근거하여 원본 파티션 서버 PA에 포함된 파티션들의 로그파 일의 위치정보를 검색한다. 검색된 로그파일의 위치정보를 복제 파티션 서버 Pn의 위치정보에 대응하는 주소로 송신하게 된다.The
도 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)
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)
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 |
-
2009
- 2009-12-21 KR KR1020090128434A patent/KR20110071785A/en not_active Application Discontinuation
Cited By (2)
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 |