Commit-time ordered message queue supporting arbitrary read and dequeue patterns from multiple subscribers
First Claim
1. A computer-implemented method, comprising:
- in response to a request, from a client of a database system, to enqueue one or more first messages, the database system adding said one or more first messages to a message queue, said one or more first messages associated with a first database transaction being executed for said client,after adding said one or more first messages to the message queue;
committing the first database transaction; and
determining a unique system commit time corresponding to the first database transaction, wherein system commit times corresponding to respective database transactions are based on transactional dependencies among database transactions;
after determining a unique system commit time;
associating the unique system commit time with the one or more first messages; and
ordering messages in the message queue based on the unique system commit time;
in response to a request to dequeue one or more messages from the message queue,determining whether any message of the one or more messages is associated with a system commit time that is less than a first high watermark that is associated with the message queue; and
if there are no messages, of the one or more messages, that are associated with a system commit time that is less than the first high watermark, then generating a second high watermark for association with the message queue, wherein the second high watermark is greater than the first high watermark,wherein the method steps are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Data consistency in the context of information sharing requires maintenance of dependencies among information being shared. Transactional dependency ordering is implemented in a database system message queue, by associating a unique system commit time with each transactional message group. Read consistency is implemented in such a queue by allowing only messages with a fully determined order to be visible. A fully determined order is implemented through use of a high watermark, which guarantees that future transactions, for which messages are entering the queue, have commit times that are greater than the current high watermark. Therefore, only messages below the current high watermark are visible and can be dequeued, with no chance of other new messages enqueuing below the current high watermark.
86 Citations
24 Claims
-
1. A computer-implemented method, comprising:
-
in response to a request, from a client of a database system, to enqueue one or more first messages, the database system adding said one or more first messages to a message queue, said one or more first messages associated with a first database transaction being executed for said client, after adding said one or more first messages to the message queue; committing the first database transaction; and determining a unique system commit time corresponding to the first database transaction, wherein system commit times corresponding to respective database transactions are based on transactional dependencies among database transactions; after determining a unique system commit time; associating the unique system commit time with the one or more first messages; and ordering messages in the message queue based on the unique system commit time; in response to a request to dequeue one or more messages from the message queue, determining whether any message of the one or more messages is associated with a system commit time that is less than a first high watermark that is associated with the message queue; and if there are no messages, of the one or more messages, that are associated with a system commit time that is less than the first high watermark, then generating a second high watermark for association with the message queue, wherein the second high watermark is greater than the first high watermark, wherein the method steps are performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification