High-performance memory queue
First Claim
Patent Images
1. A method of managing message queues, said method comprising:
- issuing a transaction to access a queue containing messages resident in volatile memory;
selectively locking the queue during processing of said transaction, wherein the queue remains unlocked for one or more aspects of the transaction processing; and
maintaining persistence of one or more messages of said queue, said maintaining persistence comprisingperforming a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage;
between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the one or more messages of the queue to a log in persistent storage; and
wherein the performing of the checkpoint of the queue further comprises;
(i) obtaining and locking a checkpoint control record;
(ii) setting a variable “
current queue”
equal to a local queue;
(iii) determining whether the “
current queue”
is equal to zero;
(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;
(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;
(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
1 Assignment
0 Petitions
Accused Products
Abstract
A highly available, high-performance memory queue. Locking of the queue is minimized in order to provide a highly available queue and to improve performance of the queue. Multiple updates of the queue can occur under a single lock. Further, messages of the queue are persistent. A time-initiated checkpointing process, as well as the storing of message information on a recovery log, ensures the persistence of the queue messages.
-
Citations
69 Claims
-
1. A method of managing message queues, said method comprising:
-
issuing a transaction to access a queue containing messages resident in volatile memory; selectively locking the queue during processing of said transaction, wherein the queue remains unlocked for one or more aspects of the transaction processing; and maintaining persistence of one or more messages of said queue, said maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the one or more messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 67, 68, 69)
-
-
16. A method of managing message queues, said method comprising:
-
requesting as part of a transaction a plurality of updates to a queue containing messages in volatile memory; committing the plurality of updates to the queue under a single lock of the queue, wherein the queue remains unlocked for one or more aspects of processing the transaction; maintaining persistence of one or more messages of the queue, the maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, and between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, storing information regarding an update of the one or more messages in at least one of a log and one or more checkpoint records; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(iv) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A method of managing message queues, said method comprising:
-
issuing a first transaction to access a queue containing messages in volatile memory, wherein one or more messages of said queue are persistent messages; issuing a second transaction to access the queue, wherein at least a part of processing of the second transaction is concurrent with at least a part of processing of the first transaction; obtaining a lock of the queue, during an aspect of processing of said first transaction, to commit a plurality of updates to the queue under the lock, wherein the queue remains unlocked for one or more other aspects of processing of the first transaction, and wherein said second transaction is capable of locking the queue to perform one or more updates of the queue when the queue is unlocked during processing of the first transaction; and maintaining persistence of the persistent messages of said queue, said maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the persistent messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
-
22. A system of managing message queues, said system comprising:
-
means for issuing a transaction to access a queue containing messages resident in volatile memory; means for selectively locking the queue during processing of said transaction, wherein the queue remains unlocked for one or more aspects of the transaction processing; and means for maintaining persistence of one or more messages of said queue, said means for maintaining persistence comprising means for performing a checkpoint of said queue at predefined time intervals, said means for performing comprising means for copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; means for writing information, between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, regarding an update of the one or more messages of the queue to a log in persistent storage; and wherein the means for performing the checkpointing of the queue further comprises means for; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
-
37. A system of managing message queues, said system comprising:
-
means for requesting as part of a transaction a plurality of updates to a queue containing messages in volatile memory; means for committing the plurality of updates to the queue under a single lock of the queue wherein the queue remains unlocked for one or more aspects of processing the transaction; means for maintaining persistence of one or more messages of the queue, the means for maintaining persistence comprising means for performing a checkpoint of said queue at predefined time intervals, said means for performing comprising means for copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, and means for storing information, between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, regarding an update of the one or more messages in at least one of a log and one or more checkpoint records; and wherein the means for performing the checkpointing of the queue further comprises means for; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (38, 39, 40, 41)
-
-
42. A system of managing message queues, said system comprising:
-
means for issuing a first transaction to access a queue containing messages in volatile memory, wherein one or more messages of said queue are persistent messages; means for issuing a second transaction to access the queue, wherein at least a part of processing of the second transaction is concurrent with at least a part of processing of the first transaction; means for obtaining a lock of the queue, during an aspect of processing of said first transaction, to commit a plurality of updates to the queue under the lock, wherein the queue remains unlocked for one or more other aspects of processing of the first transaction, and wherein said second transaction is capable of locking the queue to perform one or more updates of the queue when the queue is unlocked during processing of the first transaction; and means for maintaining persistence of the persistent messages of said queue, said means for maintaining persistence comprising means for performing a checkpoint of said queue at predefined time intervals, said means for performing a checkpoint comprising means for copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; means for writing information, between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, regarding an update of the persistent messages of the queue to a log in persistent storage; and wherein the means for performing the checkpointing of the queue further comprises means for; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
-
43. A system of managing message queues, said system comprising:
-
a transaction to access a queue containing messages resident in volatile memory; at least one manager used to selectively lock the queue during processing of said transaction, wherein the queue remains unlocked for one or more aspects of the transaction processing; and wherein the at least one manager maintains persistence of one or more messages of said queue by performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the one or more messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
-
44. A system of managing message queues, said system comprising:
-
a plurality of updates to be made in a queue containing messages in volatile memory, and requested as part of a transaction; a manager used to commit the plurality of updates to the queue under a single lock of the queue, wherein the queue remains unlocked for one or more aspects of processing the transaction; wherein the manager maintains persistence of one or more messages of the queue by performing a checkpoint of said queue at predefined intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, and between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, storing information regarding an update of the one or more messages in at least one of a log and one or more checkpoint records; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
-
45. A system of managing message queues, said system comprising:
-
a first transaction to access a queue containing messages in volatile memory, wherein one or more messages of said queue are persistent messages; a second transaction to access the queue, wherein at least a part of processing of the second transaction is concurrent with at least a part of processing of the first transaction; a manager used to obtain a lock of the queue, during an aspect of processing of said first transaction, to commit a plurality of updates to the queue under the lock, wherein the queue remains unlocked for one or more other aspects of processing of the first transaction, and wherein said second transaction is capable of locking the queue to perform one or more updates of the queue when the queue is unlocked during processing of the first transaction; and wherein the manager maintains persistence of the persistent messages of said queue by performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the persistent messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
-
46. At least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform a method of managing message queues, said method comprising:
-
issuing a transaction to access a queue containing messages resident in volatile memory; selectively locking the queue during processing of said transaction, wherein the queue remains unlocked for one or more aspects of the transaction processing; and maintaining persistence of one or more messages of said queue, said maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the one or more messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60)
-
-
61. At least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform a method of managing message queues, said method comprising:
-
requesting as part of a transaction a plurality of updates to a queue containing messages in volatile memory; committing the plurality of updates to the queue under a single lock of the queue, wherein the queue remains unlocked for one or more aspects of processing the transaction; maintaining persistence of one or more messages of the queue, the maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage, and between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, storing information regarding an update of the one or more messages in at least one of a log and one or more checkpoint records; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing. - View Dependent Claims (62, 63, 64, 65)
-
-
66. An article of manufacture, comprising:
-
at least one computer usable medium having computer readable program code means embodied therein for causing the managing of message queues, the computer readable program code means in said article of manufacture comprising; computer readable program code means for causing a computer to issue a first transaction to access a queue containing messages in volatile memory, wherein one or more messages of said queue are persistent messages; computer readable program code means for causing a computer to issue a second transaction to access the queue, wherein at least a part of processing of the second transaction is concurrent with at least a part of processing of the first transaction; computer readable program code means for causing a computer to obtain a lock of the queue, during an aspect of processing of said first transaction, to commit a plurality of updates to the queue under the lock, wherein the queue remains unlocked for one or more other aspects of processing of the first transaction, and wherein said second transaction is capable of locking the queue to perform one or more updates of the queue when the queue is unlocked during processing of the first transaction; computer readable program code means for causing a computer to maintain persistence of the persistent messages of said queue, said maintaining persistence comprising performing a checkpoint of said queue at predefined time intervals, said performing the checkpoint comprising copying a definition of said queue and contents of said queue, including said one or more messages, to persistent storage; and between time interval based checkpoints comprising copying said definition of said queue and said contents of said queue, writing information regarding an update of the persistent messages of the queue to a log in persistent storage; and wherein the performing of the checkpoint of the queue further comprises; (i) obtaining and locking a checkpoint control record; (ii) setting a variable “
current queue”
equal to a local queue;(iii) determining whether the “
current queue”
is equal to zero;(iv) if the “
current queue”
is equal to zero, then waiting for created processes to finish, and thereafter updating the checkpoint control record to indicate checkpointing is complete, and unlocking the record;(v) if the “
current queue”
is not zero, then determining whether the local queue has changed since the last checkpoint;(vi) if the local queue has changed, then creating an asynchronous process to checkpoint the local queue, and thereafter, or if the local queue has not changed since the last checkpoint, then setting the variable “
current queue”
equal to a next local queue and repeating said steps (iii)–
(vi) until each local queue has undergone checkpointing.
-
Specification