Log-base data replication from a source database to a target database
First Claim
1. A system for data replication between a source database and a target database, comprising:
- a computer including a micro-processor;
a source database having data stored therein, and one or more binary logs associated therewith which record event data describing changes made to the data during a transaction at the source database;
a replication module running on the computer and including a plurality of reader and processor classes, each class executing on a dedicated thread, to replicate the changes made to the data at the source database, for use with a target database, byreading, from the one or more binary logs, the event data describing the changes made to the data during the transaction,processing the event data to determine events describing one or more full or partial data changes at the source database, andstoring records into a record queue of a particular size, wherein the records reflect the determined events;
wherein, upon a subsequent request to replicate data to the target database, the system invokes a plurality of record classes to retrieve the records stored in the record queue to create a trail file, wherein the trail file is then communicated to the target database and used therein to replicate the changes made to the data, from the source database to the target database.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for transferring data between different types of systems, and in particular uses log-based replication to transfer data between different types of systems. In accordance with an embodiment, the system can be used to perform a one-time or initial copy of the MySQL data from a source database system to a target database system, and/or to replicate the on-going transactions captured from a MySQL database'"'"'s binary log into one or additional non-MySQL database(s) on a continuous basis, such that the two systems are synchronized for transactions of interest. In accordance with an embodiment, full or partial data changes can be extracted from the MySQL binary log, optionally transformed, skipped or augmented, output or written to a file, and then applied at any of one or more target systems (e.g. another MySQL database, or a non-MySQL database), thereby synchronizing the source and target systems.
-
Citations
20 Claims
-
1. A system for data replication between a source database and a target database, comprising:
-
a computer including a micro-processor; a source database having data stored therein, and one or more binary logs associated therewith which record event data describing changes made to the data during a transaction at the source database; a replication module running on the computer and including a plurality of reader and processor classes, each class executing on a dedicated thread, to replicate the changes made to the data at the source database, for use with a target database, by reading, from the one or more binary logs, the event data describing the changes made to the data during the transaction, processing the event data to determine events describing one or more full or partial data changes at the source database, and storing records into a record queue of a particular size, wherein the records reflect the determined events; wherein, upon a subsequent request to replicate data to the target database, the system invokes a plurality of record classes to retrieve the records stored in the record queue to create a trail file, wherein the trail file is then communicated to the target database and used therein to replicate the changes made to the data, from the source database to the target database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method that uses log-based replication to transfer data between a source database and a target database, comprising:
-
providing a replication module including a plurality of reader and processor classes on a computing device, wherein the computing device includes a processor and a source database having data stored therein, and one or more binary logs associated therewith which record event data describing changes made to the data during a transaction at the source database; using the plurality of reader and processor classes, each class executing on a dedicated thread, to replicate, the changes made to the data at the source database, for use with a target database, including reading, from the one or more binary logs, the event data describing the changes made to the data during the transaction, processing the event data to determine events describing one or more full or partial data changes at the source database, and storing records into a record queue of a particular size, wherein the records reflect the determined events; and invoking a plurality of record classes to retrieve the records stored in the record queue to create a trail file, upon a subsequent request to replicate data to the target database, wherein the trail file is then communicated to the target database and used therein to replicate the changes made to the data, from the source database to the target database. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer readable storage medium, including instructions stored thereon, wherein the instructions, when read and executed by a computer, cause the computer to perform the steps comprising:
-
providing a replication module including a plurality of reader and processor classes on a computing device, wherein the computing device includes a processor and a source database having data stored therein, and one or more binary logs associated therewith which record event data describing changes made to the data during a transaction at the source database; using the plurality of reader and processor classes, each class executing on a dedicated thread, to replicate, the changes made to the data at the source database, for use with a target database, including reading, from the one or more binary logs, the event data describing the changes made to the data during the transaction, processing the event data to determine events describing one or more full or partial data changes at the source database, and storing records into a record queue of a particular size, wherein the records reflect the determined events; and invoking a plurality of record classes to retrieve the records stored in the record queue to create a trail file, upon a subsequent request to replicate data to the target database, wherein the trail file is then communicated to the target database and used therein to replicate the changes made to the data, from the source database to the target database. - View Dependent Claims (18, 19, 20)
-
Specification