Generation and vending of unique sequence values
AssigneeAmazon Technologies, Inc.
InventorBrian O'Neill
Life of this patent
Estimating the term…
Abstract
Techniques for generating and vending of unique sequence values are described. Each master of a ring of masters is configured to create and vend the unique sequence values downstream to filling pools for eventual client consumption. When a ring of masters is employed, each master communicates with one another to agree on a current range of values that should next be vended. A master may then vend these values to a layer of one or more filling pools, at least of which includes or has access to persistent and non-persistent storage memories.
Claims23
A system for vending unique sequence values for use in creating customer order identifications, the system comprising:
- at least one computing device configured to implement one or more services, wherein the one or more services provide:
- a ring of multiple masters, individual ones of the masters to generate the unique sequence values for use in the customer order identifications and store the unique sequence values in a persistent memory of individual ones of the masters, the unique sequence values being generated utilizing a two-pass process whereby a first pass includes ensuring that individual ones of the masters agree on a batch of unique sequence values to be vended and a second pass includes confirming that the batch of unique sequence values has not been consumed during and after the first pass;
- and
- a layer of multiple filling pools to receive the batch of unique sequence values from a master of the ring of multiple masters after the two-pass process is complete, at least one of the filling pools comprising a persistent memory and a non-persistent memory and being configured to:
- provide a unique sequence value stored in the non-persistent memory of the filling pool to a client, responsive to the client requesting a unique sequence value;
- and
- monitor an amount of unique sequence values stored in the non-persistent memory of the filling pool and, if the amount of unique sequence values stored in the non-persistent memory of the filling pool falls below a threshold amount, transfer unique sequence values from the persistent memory of the filling pool to the non-persistent memory of the filling pool.
A system comprising:
- one or more hardware processors;
- a first filling pool comprising a first cache and a first source, the first cache comprising a memory accessible by at least one of the one or more hardware processors to store unique sequence values for a second filling pool and the first source comprising a remote pool to request additional unique sequence values from a master that generates and vends the unique sequence values
- the second filling pool comprising:
- a second cache comprising a non-persistent memory accessible by at least one of the one or more hardware processors to store unique sequence values for use by a client,
- a second source comprising a persistent memory to store the unique sequence values for use by the second cache, and
- a sequence value monitor to monitor an amount of the unique sequence value stored in the second cache, and in response to determining that the amount of the unique value sequences stored in the second cache is less than a threshold amount, cause at least one unique sequence value stored in the second source to be transferred to the second cache;
- and
- the second filling pool maintaining a sufficient number of the unique sequence values to provide to the client for at least a predetermined amount of time.
One or more non-transitory-computer-readable media storing computer-executable instructions that, when executed on one or more processors, perform acts comprising:
- sending, from a first master configured to generate and vend unique sequence values and to a second master also configured to generate and vend unique sequence values, a request to generate and vend a first range of unique sequence values corresponding to a high water mark of the first master;
- if a denial of the request is received from the second master or another master, then:
- updating the high water mark of the first master;
- and
- sending, from the first master and to the second master, a request to generate and vend a second range of unique sequence values that is based at least in part on the updated high water mark of the first master;
- if a denial of the request is not received from the second master or another master, then sending, from the first master and to the second master, an indication that first master will generate and vend the first range of unique sequence values to a downstream filling pool, the downstream filling pool being configured to periodically, randomly, or continually compute a rolling average of vended unique sequence values for a specified period of time;
- and
- receiving a request for additional unique sequence values when it is determined that the computed rolling average for the specified period of time indicates an increase above a predetermined threshold.
A method implemented at least in part by one or more computing devices, comprising:
- receiving a batch of unique sequence values generated by a master configured to generate and vend the unique sequence values;
- storing a first portion of the batch of unique sequence values in a non-persistent memory accessible by a filling pool and storing another portion of the batch of unique sequence values in a persistent memory accessible by the filling pool, the filling pool maintaining a sufficient number of the unique sequence values so that filling pool can provide the unique sequence values to a client for at least a predetermined amount of time;
- providing a unique sequence value stored in the non-persistent memory to the client in response to receiving a request for a unique sequence value from the client;
- monitoring a rate that the filling pool provides the unique sequence values to one or more clients to calculate an average consumption by the one or more clients for the predetermined amount of time;
- calculating an amount of the unique sequence values to store within the persistent and non-persistent memories accessible by the filling pool based at least in part on the calculated average consumption;
- and
- transferring at least some of the unique sequence values stored in the persistent memory accessible by the filling pool to the non-persistent memory.
One or more non-transitory-computer-readable media storing computer-executable instructions that, when executed on the one or more processors, perform acts comprising:
- determining a high water mark for a first master of a ring of masters, individual masters of the ring of masters being configured to generate and vend unique sequence values;
- requesting, by the first master and to a second master of the ring of masters, permission to generate and vend a range of unique sequence values, the range being determined at least in part by the high water mark of the first master;
- generating and vending the range of unique sequence values to one or more filling pools, wherein a first portion of the range of unique sequence values are stored in a non-persistent memory of the one or more filling pools and a second portion is stored in a persistent memory of the one or more filling pools;
- and
- receiving a request for additional unique sequence values when it is determined that a computed rolling average of the vended unique sequence values determined by the one or more filling pools indicates an increase above a predetermined threshold.
Dependencies are inferred from the claim text.