System for maintaining consistency across a decentralized database cluster and method therefor
First Claim
1. A system comprising:
- a plurality of database servers each hosting a copy of data stored in a database, each database server of the plurality of database servers comprising one or more processing modules and one or more non-transitory storage modules storing computing instructions configured to run on the one or more processing modules and perform acts of;
receiving a stream of document update messages broadcast, via a messaging system, to the plurality of database servers, wherein a checkpoint marker message is embedded into at least one of the document update messages with an associated checkpoint ID; and
when a database server of the plurality of database servers is active;
adding a node representing the database server of the plurality of database servers to a list of active database servers stored on an external data store; and
receiving one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, wherein the checkpoint marker message causes the database server to pause further processing of other messages until after a roll call of the each database server on the list of active database servers is completed to indicate that the each database server on the list of active database servers has checked in with its own node under a checkpoint roll call node;
after receiving the one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, determining whether the checkpoint roll call node exists at the external data store for the associated checkpoint ID;
when the checkpoint roll call node is determined to exist at the external data store for the associated checkpoint ID, checking in to the external data store by adding a node representing the database server under the checkpoint roll call node;
when the checkpoint roll call node is determined to not exist at the external data store for the associated checkpoint ID, first creating the checkpoint roll call node and a checkpoint flag node at the external data store for the checkpoint ID, and then checking in to the external data store by adding the node representing the database server under the checkpoint roll call node;
after the node representing the database server is added under the checkpoint roll call node, determining whether the roll call is complete, wherein;
the roll call is complete when the each database server on the list of active database servers has processed the checkpoint marker message as indicated by an addition of their own node under the checkpoint roll call node at the external data store at which point the external data store deletes the checkpoint roll call node, nodes under the checkpoint roll call node, and the checkpoint flag node; and
when the roll call is not complete, monitor the checkpoint flag node at the external data store for the associated checkpoint ID until the each database server on the list of active database servers has processed the checkpoint marker message indicated by the addition of its own node under the checkpoint roll call node;
after the roll call is complete and after the checkpoint roll call node and the checkpoint flag node are deleted, receiving an update broadcasted to each database server on the list of active database servers so that the database server can update its data with the update during a common point in time with all other database servers on the list of active database servers;
updating the data on the database server during the common point in time in response to receiving the update; and
reactivating the database server to resume normal processing of the document update messages until the database server receives another one of the document update messages comprising another checkpoint message marker.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for maintaining consistency across a decentralized database cluster is presented. A database cluster can contain a plurality of database servers, each hosting a copy of the same database. In a system without a centralized coordinating server, a message queue can be used to simultaneously provide updates to each database server in the database cluster. A When a database server receives an index update message, it adds message to a queue indicating it has received the message and watches an index update node. Once every server in the cluster has added a message to the queue, it is known that every database server has received the message. The update can be performed for each server and the changes committed simultaneously. In such a manner, all database servers in the cluster perform an update at approximately the same time. Other embodiments also are disclosed.
-
Citations
20 Claims
-
1. A system comprising:
a plurality of database servers each hosting a copy of data stored in a database, each database server of the plurality of database servers comprising one or more processing modules and one or more non-transitory storage modules storing computing instructions configured to run on the one or more processing modules and perform acts of; receiving a stream of document update messages broadcast, via a messaging system, to the plurality of database servers, wherein a checkpoint marker message is embedded into at least one of the document update messages with an associated checkpoint ID; and when a database server of the plurality of database servers is active; adding a node representing the database server of the plurality of database servers to a list of active database servers stored on an external data store; and receiving one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, wherein the checkpoint marker message causes the database server to pause further processing of other messages until after a roll call of the each database server on the list of active database servers is completed to indicate that the each database server on the list of active database servers has checked in with its own node under a checkpoint roll call node; after receiving the one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, determining whether the checkpoint roll call node exists at the external data store for the associated checkpoint ID; when the checkpoint roll call node is determined to exist at the external data store for the associated checkpoint ID, checking in to the external data store by adding a node representing the database server under the checkpoint roll call node; when the checkpoint roll call node is determined to not exist at the external data store for the associated checkpoint ID, first creating the checkpoint roll call node and a checkpoint flag node at the external data store for the checkpoint ID, and then checking in to the external data store by adding the node representing the database server under the checkpoint roll call node; after the node representing the database server is added under the checkpoint roll call node, determining whether the roll call is complete, wherein; the roll call is complete when the each database server on the list of active database servers has processed the checkpoint marker message as indicated by an addition of their own node under the checkpoint roll call node at the external data store at which point the external data store deletes the checkpoint roll call node, nodes under the checkpoint roll call node, and the checkpoint flag node; and when the roll call is not complete, monitor the checkpoint flag node at the external data store for the associated checkpoint ID until the each database server on the list of active database servers has processed the checkpoint marker message indicated by the addition of its own node under the checkpoint roll call node; after the roll call is complete and after the checkpoint roll call node and the checkpoint flag node are deleted, receiving an update broadcasted to each database server on the list of active database servers so that the database server can update its data with the update during a common point in time with all other database servers on the list of active database servers; updating the data on the database server during the common point in time in response to receiving the update; and reactivating the database server to resume normal processing of the document update messages until the database server receives another one of the document update messages comprising another checkpoint message marker. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
10. A method comprising:
-
receiving, by a computer system with one or more processors, a stream of document update messages broadcast, via a messaging system, each database server of a plurality of database servers hosting a copy of data stored in a database, wherein a checkpoint marker message is embedded into at least one of the document update messages with an associated checkpoint ID; when a database server of the plurality of database servers is active; adding, by the computer system, a node representing the database server of the plurality of database servers, to a list of active database servers stored on an external data store; and receiving, with the computer system, one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, wherein the checkpoint marker message causes the database server to pause further processing of other messages until after a roll call of the each database server on the list of active database servers is completed to indicate that the each database server on the list of active database servers has checked in with its own node under a checkpoint roll call node; after receiving the one of the document update messages comprising the checkpoint marker message with the associated checkpoint ID, determining, with a checkpoint roll call node detection system, whether the checkpoint roll call node exists at the external data store for the associated checkpoint ID; when the checkpoint roll call node is determined to exist at the external data store for the associated checkpoint ID, checking in to the external data store by adding a node representing the database server under the checkpoint roll call node; when the checkpoint roll call node is determined to not exist at the external data store for the associated checkpoint ID, first creating the checkpoint roll call node and a checkpoint flag node at the external data store for the associated checkpoint ID, and then checking in to the external data store by adding the node representing the database server under the checkpoint roll call node; after the node representing the database server is added under the checkpoint roll call node, determining, with a roll call node completion detection system, whether the roll call is complete, wherein; the roll call is complete when the each database server on the list of active database servers has processed the checkpoint marker message as indicated by an addition of their own node under the checkpoint roll call node at the external data store at which point the external data store deletes the checkpoint roll call node, nodes under the checkpoint roll call node, and the checkpoint flag node; and when the roll call is not complete, monitor the checkpoint flag node at the external data store for the associated checkpoint ID until the each database server on the list of active database servers has processed the checkpoint marker message indicated by the addition of its own node under the checkpoint roll call mode; after the roll call is complete and after the checkpoint roll call node and the checkpoint flag node are deleted, receiving an update broadcasted to the each database server on the list of active database servers so that the database server can update its data with the update during a common point in time with all other database servers on the list of active database servers; updating the data on the database server during the common point in time in response to receiving the update; and reactivating the database server to resume normal processing of the document update messages until the database server receives another one of the document update messages comprising another checkpoint message marker. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification