US11609803B2ActiveUtilityA1

Managing event delivery in a serverless computing environment

Assignee: RED HAT INCPriority: Sep 16, 2020Filed: Sep 16, 2020Granted: Mar 21, 2023
Est. expirySep 16, 2040(~14.1 yrs left)· nominal 20-yr term from priority
G06F 9/5083G06F 9/4881G06F 9/542G06F 21/602G06F 9/546
75
PatentIndex Score
1
Cited by
22
References
20
Claims

Abstract

Event delivery can be managed in a serverless computing environment. For example, an event broker can determine that each event message in a group of event messages from one or more event producers includes a particular key among a set of keys, and can determine a target event consumer that is to receive the group of event messages. Based on each event message in the group of event messages including the particular key, the event broker can add each event message to a dispatching queue in a sequential order in which the plurality of event messages were received. The event broker can then provide the group of event messages in the dispatching queue to the target event consumer in the sequential order in which the group of event messages are in the dispatching queue.

Claims

exact text as granted — not AI-modified
The invention claimed is: 
     
       1. A system comprising:
 a processor; and 
 a memory including instructions for an event broker, the event broker being executable by the processor for causing the processor to:
 determine that each event message in a plurality of event messages from one or more event producers includes a particular key among a plurality of possible keys; 
 determine a target event consumer that is to receive the plurality of event messages; 
 select a dispatching queue from among a plurality of dispatching queues based on the determined target event consumer and the particular key, wherein the plurality of dispatching queues are assigned to the target event consumer and different keys, and wherein the selected dispatching queue is a first-in-first-out queue that is assigned to the particular key and the target event consumer; 
 based on each event message in the plurality of event messages including the particular key, add each event message to the selected dispatching queue in a sequential order in which the plurality of event messages were received by the event broker; and 
 subsequent to adding each event message to the selected dispatching queue, provide the plurality of event messages in the dispatching queue to the target event consumer in the sequential order in which the plurality of event messages are positioned in the dispatching queue; 
 
 wherein the one or more event producers are configured to:
 access a predefined mapping between a plurality of nodes of the event broker and a plurality of keys, the plurality of nodes being different from target event consumers; and 
 distribute the plurality of event messages to a particular node among the plurality of nodes based on the predefined mapping. 
 
 
     
     
       2. The system of  claim 1 , wherein the dispatching queue is configured to only include event messages that are designated for the target event consumer and that have the particular key. 
     
     
       3. The system of  claim 1 , wherein the one or more event producers and the target event consumer are included in a serverless computing environment, and wherein the serverless computing environment includes an adjustable number of instances of the target event consumer, the adjustable number of instances being automatically scalable by the serverless computing environment in response to one or more conditions. 
     
     
       4. The system of  claim 1 , wherein the target event consumer includes a serverless function or a microservice. 
     
     
       5. The system of  claim 1 , wherein the event broker is formed from the plurality of nodes, each node in the plurality of nodes being assigned a respective set of keys that does not overlap with other sets of keys assigned to the other nodes in the plurality of nodes, and each node in the plurality of nodes being configured for providing a respective set of event messages associated with the respective set of keys to one or more target event consumers for balancing a load on the event broker among the plurality of nodes. 
     
     
       6. The system of  claim 1 , wherein the predefined mapping includes a hashing function configured to convert the keys into hashed values corresponding to the plurality of nodes. 
     
     
       7. The system of  claim 1 , wherein the memory further includes instructions that are executable by the processor for causing the processor to:
 prior to adding the plurality of event messages to the dispatching queue, determine that the dispatching queue does not exist in a memory device accessible to the event broker and responsively generate the dispatching queue in the memory device; and 
 subsequent to transmitting the plurality of event messages to the target event consumer, determine that the dispatching queue is empty and responsively remove the dispatching queue from the memory device. 
 
     
     
       8. The system of  claim 1 , wherein the one or more event producers include the predefined mapping. 
     
     
       9. A method comprising:
 determining, by a processor, that each event message in a plurality of event messages from one or more event producers includes a particular key among a plurality of possible keys; 
 determining, by the processor, a target event consumer that is to receive the plurality of event messages; 
 selecting, by the processor, a dispatching queue from among a plurality of dispatching queues based on the determined target event consumer and the particular key, wherein the plurality of dispatching queues are assigned to the target event consumer and different keys, and wherein the selected dispatching queue is a first-in-first-out queue that is assigned to the particular key and the target event consumer; 
 based on selecting the dispatching queue, adding, by the processor, each event message to the selected dispatching queue in a sequential order in which the plurality of event messages were received by the processor; and 
 subsequent to adding each event message to the dispatching queue, providing, by the processor, the plurality of event messages in the dispatching queue to the target event consumer in the sequential order in which the plurality of event messages are positioned in the dispatching queue; 
 wherein the one or more event producers are configured to:
 access a predefined mapping between a plurality of nodes of an event broker and a plurality of keys, the plurality of nodes being different from target event consumers; and 
 distribute the plurality of event messages to a particular node among the plurality of nodes based on the predefined mapping. 
 
 
     
     
       10. The method of  claim 9 , wherein the dispatching queue is only assigned to the target event consumer and the particular key. 
     
     
       11. The method of  claim 9 , further comprising automatically scaling an adjustable number of instances of the target event consumer in a serverless computing environment in response to one or more conditions. 
     
     
       12. The method of  claim 9 , wherein the target event consumer includes a serverless function or a microservice. 
     
     
       13. The method of  claim 9 , wherein the predefined mapping includes a hashing function configured to convert keys into hashed values corresponding to the plurality of nodes. 
     
     
       14. The method of  claim 9 , further comprising:
 prior to adding the plurality of event messages to the dispatching queue, determining that the dispatching queue does not exist in a memory device and responsively generating the dispatching queue in the memory device; and 
 subsequent to transmitting the plurality of event messages to the target event consumer, determining that the dispatching queue is empty and responsively removing the dispatching queue from the memory device. 
 
     
     
       15. The method of  claim 9 , wherein the one or more event producers include the predefined mapping. 
     
     
       16. A non-transitory computer-readable medium comprising program code that is executable by a processor for causing the processor to:
 determine that each event message in a plurality of event messages from one or more event producers includes a particular key among a plurality of possible keys; 
 determine a target event consumer that is to receive the plurality of event messages; 
 based on each event message in the plurality of event messages including the particular key, add each event message to a dispatching queue in a sequential order in which the plurality of event messages were received by the processor, wherein the dispatching queue is a first-in-first-out queue that is assigned to the particular key and the target event consumer; and 
 provide the plurality of event messages in the dispatching queue to the target event consumer in the sequential order in which the plurality of event messages are positioned in the dispatching queue; 
 wherein the one or more event producers are configured to:
 access a predefined mapping between a plurality of nodes of an event broker and a plurality of keys, the plurality of nodes being different from target event consumers; and 
 distribute the plurality of event messages to a particular node among the plurality of nodes based on the predefined mapping. 
 
 
     
     
       17. The non-transitory computer-readable medium of  claim 16 , wherein the target event consumer includes a serverless function or a microservice. 
     
     
       18. The non-transitory computer-readable medium of  claim 16 , wherein the predefined mapping includes a hashing function configured to convert the keys into hashed values corresponding to the plurality of nodes. 
     
     
       19. The non-transitory computer-readable medium of  claim 16 , further comprising program code that is executable by the processor for causing the processor to:
 prior to adding the plurality of event messages to the dispatching queue, determine that the dispatching queue does not exist in a memory device and responsively generate the dispatching queue in the memory device; and 
 subsequent to transmitting the plurality of event messages to the target event consumer, determine that the dispatching queue is empty and responsively remove the dispatching queue from the memory device. 
 
     
     
       20. The non-transitory computer-readable medium of  claim 16 , further comprising program code that is executable by the processor for causing the processor to select the dispatching queue based on the target event consumer prior to adding each event message to the dispatching queue.

Join the waitlist — get patent alerts

Track US11609803B2 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.