System and method for efficiently writing data from an in-memory database to a disk database
First Claim
1. A processor-implemented method of efficiently writing records from an in-memory database to a disk database comprising:
- linking the records by a linked list;
creating a header data structure of the linked records;
linking a new record in the in-memory database to the header data structure;
transferring the records in the linked list and the new record from the in-memory database to the disk database using the header data structure;
wherein transferring the records includes transferring blocks of the records as a single transaction to the disk database, in order to minimize a number of transfers from the in-memory database to the disk database;
dynamically setting a last commit pointer and a last flush pointer to keep track of;
(i) a block of the records that have been transferred to the disk database but not yet committed;
(ii) a block of the records that have not been transferred to the disk database; and
(iii) a block of the records that have been transferred and committed to the disk database, in order to maintain synchronization between the in-memory database and the disk database; and
determining whether a committing operation of the block of the records that have been transferred to the disk database but not yet committed is successful, and if the committing operation is determined to be unsuccessful, deeming the committing operation of all the records in the block of the records that have been transferred to the disk database but not yet committed is successful, to have failed.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and associated method write data from an in-memory database to a disk database in an efficient manner and with a relatively short lag time. The integration of data from in-memory to disk is achieved by limiting the operations of the in-memory database to insert only. The system shortens lag time by reducing the number of transactions required to transfer data from in-memory database to disk memory. The system compiles into an RDBMS, knowledge about the structure of the in-memory database, and then uses the end of the transaction callbacks from the RDBMS to keep the in-memory database and the disk memory in synch. The RDBMS includes a daemon that runs periodically to find records in the in-memory database that have not yet been written to the RDBMS, and then writes the found records to the RDBMS as part of a single transaction. If the transaction completes successfully, the in-memory database is updated to reflect which records have been “flushed” to the RDBMS. If the transaction fails, no action is taken. The present system synchronizes the in-memory database with the RDBMS.
-
Citations
29 Claims
-
1. A processor-implemented method of efficiently writing records from an in-memory database to a disk database comprising:
-
linking the records by a linked list; creating a header data structure of the linked records; linking a new record in the in-memory database to the header data structure; transferring the records in the linked list and the new record from the in-memory database to the disk database using the header data structure; wherein transferring the records includes transferring blocks of the records as a single transaction to the disk database, in order to minimize a number of transfers from the in-memory database to the disk database; dynamically setting a last commit pointer and a last flush pointer to keep track of;
(i) a block of the records that have been transferred to the disk database but not yet committed;
(ii) a block of the records that have not been transferred to the disk database; and
(iii) a block of the records that have been transferred and committed to the disk database, in order to maintain synchronization between the in-memory database and the disk database; anddetermining whether a committing operation of the block of the records that have been transferred to the disk database but not yet committed is successful, and if the committing operation is determined to be unsuccessful, deeming the committing operation of all the records in the block of the records that have been transferred to the disk database but not yet committed is successful, to have failed. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24)
-
-
18. A computer program product having instruction codes stored on a computer-readable medium for efficiently writing records from an in-memory database to a disk database, comprising:
-
a set of instruction codes for linking the records by a linked list; a set of instruction codes for creating a header data structure of the linked records; a set of instruction codes for linking a new record in the in-memory database to the header data structure; and a set of instruction codes for transferring the records in the linked list and the new record from the in-memory database to the disk database using the header data structure; wherein the set of instruction codes for transferring the records includes a set of instruction codes for transferring blocks of the records as a single transaction to the disk database, in order to minimize a number of transfers from the in-memory database to the disk database; a set of instruction codes for dynamically setting a last commit pointer and a last flush pointer to keep track of;
(i) a block of the records that have been transferred to the disk database but not yet committed;
(ii) a block of the records that have not been transferred to the disk database; and
(iii) a block of the records that have been transferred and committed to the disk database, in order to maintain synchronization between the in-memory database and the disk database; anda set of instruction codes for determining whether a committing operation of the block of the records that have been transferred to the disk database but not yet committed is successful, and if the committing operation is determined to be unsuccessful, deeming the committing operation of all the records in the block of the records that have been transferred to the disk database but not yet committed is successful, to have failed. - View Dependent Claims (19)
-
-
25. A processor-implemented system for efficiently writing records from an in-memory database to a disk database, comprising:
-
means for linking the records by a linked list; means for creating a header data structure of the linked records; means for linking a new records in the in-memory database to the header data structure; means for transferring records in the linked list and the new record from the in-memory database to the disk database using the header data structure; wherein the means for transferring the records includes a means for transferring blocks of records as a single transaction to the disk database, in order to minimize a number of transfers from the in-memory database to the disk database; means for dynamically setting a last commit pointer and a last flush pointer to keep track of;
(i) a block the records that have been transferred to the disk database but not yet committed;
(ii) a block the records that have not been transferred to the disk database; and
(iii) a block of the records that have been transferred and committed to the disk database, in order to maintain synchronization between the in-memory database and the disk database; andmeans for determining whether a committing operation of the block of the records that have been transferred to the disk database but not yet committed is successful, and if the committing operation is determined to be unsuccessful, deeming the committing operation of all the records in the block of the records that have been transferred to the disk database but not yet committed is successful, to have failed. - View Dependent Claims (26, 27, 28, 29)
-
Specification