Processing Concatenated Message Sequences

The method addresses the FIFO ordering issue in Kafka-based systems by distributing messages across partitions based on instance IDs and timestamps, ensuring correct sequencing and high availability and throughput.

JP2024537111AActive Publication Date: 2024-10-10INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024520559
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-12
Filing Date
2022-09-09
Publication Date
2024-10-10
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

Existing Kafka-based event processing systems fail to guarantee first-in-first-out (FIFO) ordering with high availability and high throughput when using multiple partitions, leading to incorrect sequencing of events.

Method used

Implement a method where messages are distributed across multiple partitions based on instance IDs and timestamps, with parallel task messages being reordered and dispatched in a FIFO sequence.

Benefits of technology

Ensures correct FIFO ordering of events while maintaining high availability and throughput by grouping and reordering messages based on instance IDs and timestamps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024537111000001_ABST
    Figure 2024537111000001_ABST
Patent Text Reader

Abstract

A method, computer program product, and computer system for processing instances of a message sequence. Two or more instances are received. Each instance has an instance number and an associated instance ID. Each instance includes one or more streams of messages. Each message of each stream is associated with a respective task. All messages in the two or more instances where a respective task has completed are distributed to partitions in a broker. Different messages within each instance of at least one instance are distributed to different partitions. The messages distributed to the partitions include parallel task messages. The parallel task messages are ordered by grouping by instance number or instance ID and ordering within each group in ascending order of timestamp of arrival of each parallel task message at the broker. The parallel task messages of each instance are dispatched to a service.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] Knative Events is a system designed to address common needs of cloud-native development, providing composable primitives for late-binding event sources and event consumers.

[0002] Figure 1 shows the event flow in Knative events according to the prior art.

[0003] The broker 120 receives multiple events 140 (also called "messages") as a stream of events from one or more event senders 110 (also called "publishers" or "producers"). An event sender 110 can send an event 140 to the broker 120 by POSTing the event 140 to the broker's status.address.url.

[0004] "Event" and "message" have the same meaning and are interchangeable.

[0005] The broker 120 can dispatch the events 140, or a subset of the events 140 determined by filtering, to subscribers 130 (also called "consumers" or "sinks"). Subscribers 130 may be services.

[0006] Events 140 received by broker 120 can be selectively filtered by event attributes via one or more triggers 150. Each trigger 150 describes a filter on one or more event attributes of events 140 to determine which events should be removed from events 140, leaving the selected events (i.e., the remaining events) to be dispatched to subscribers 130.

[0007] The broker 120 may distribute or dispatch the event 140 directly to an addressable subscriber 130 via a direct path 160 without filtering the event 140 .

[0008] FIG. 2 shows an architecture 200 for Knative events according to the prior art.

[0009] The architecture 200 is composed of an Administrator ("Admin") 205, a K8s Master 210, a Knative event structure 220, and a service 230. "K8s" is an abbreviation of "Kubernetes", where the eight characters of "ubernete" are replaced with the number 8.

[0010] The administrator 205 interacts 206 with the K8s master 210 to deploy the process.

[0011] The K8s master 210 includes an application programming interface (API) 212, a controller manager 214, and etcd 216.

[0012] The Knative event structure 220 includes a broker 240.

[0013] The broker 240 includes a receiver 250, a Kafka event streaming platform 260, a dispatcher 270, and a controller 280.

[0014] The Kafka event streaming platform 260 includes topics 261 that are organized into partitions. Although only two partitions (Partition 1 and Partition 2) are explicitly shown in Figure 2, Partition 1 and Partition 2 collectively represent multiple partitions (e.g., 2 partitions, 3 partitions, 4 partitions, etc.).

[0015] In the broker 240, a receiver 250 receives the stream of events and distributes (291) the events to multiple partitions, represented as partition 1 and partition 2, where each event is placed in only one of the multiple partitions. For each event, the Kafka protocol determines in which partition each event is placed. A dispatcher 270 interacts with the multiple partitions (292), extracts events from the multiple partitions, and dispatches (293) the events to services 230 under the control of a controller 280.

[0016] The service 230 may include a container 231 that packages run-time code for processing events received ( 293 ) from a dispatcher 270 of the broker 240 .

[0017] In the service 230 , runtime code within the container 231 processes the events received from the dispatcher 270 .

[0018] In the K8s master 210: (i) etcd 216 stores parameters (e.g., configuration data, state data, metadata, etc.) related to the Knative event structures 220, which may be received (295) by the etcd 216 from the controller 280, (ii) the controller manager 214 manages and coordinates the K8s master and provides the controller 280 with constraints related to dispatching events to services 230 (294), and (iii) the API 212 provides a programming interface between the K8s master 210 and worker nodes or external nodes (e.g., servers, virtual machines, etc.).

[0019] The following example of a candidate recommendation process illustrates the problems with existing Kafka eventing techniques.

[0020] In this example, three managers nominate two employees as training candidates, resulting in a total of five nominated candidates being trained, leaving one candidate untrained.Assuming the nomination rule is first-in-first-out (FIFO), the following sequence of events occurs: (i) a nomination request is sent (e.g., by the system) to each manager, (ii) each manager nominates two candidates, and (iii) the system creates a training list of nominated candidates to be trained.

[0021] The previous recommendation sequence affects the generation of the training list of candidates to be trained. If the previous sequence of events is not executed according to the FIFO rule, the training list of recommended candidates will be inaccurate.

[0022] In a broker implemented in Kafka, there are two partitions (partition 1 and partition 2) as shown in Table 1.

[0023] [Table 1]

[0024] Each manager (M1, M2, M3) recommends two candidates and sends recommendation messages (S_2_2_1, S_2_2_2, S_2_2_3) to the Kafka event streaming platform 260. The three recommendation messages go into two different partitions, as shown in Table 1.

[0025] Because partition 2 delivers messages faster than partition 1, the two recommended candidates for manager M3 are mistakenly accepted for training before the recommended candidates for managers M1 and M2 are considered for training.

[0026] As a result, the five candidates targeted for training are the two recommended candidates of manager M3, the two recommended candidates of manager M1, and one recommended candidate out of the two recommended candidates of manager M2, which is incorrect based on the FIFO rule considering the timestamps shown in Table 1.

[0027] The correct outcome that is not achieved is that five candidates should be trained: two recommended candidates for manager M1, two recommended candidates for manager M2, and one recommended candidate out of two recommended candidates for manager M3.

[0028] Therefore, current technology can guarantee the implementation of the FIFO rule with high availability and low processing power when only one partition is used, but when multiple partitions are used, current technology cannot guarantee the correct implementation of the FIFO rule. Summary of the Invention

[0029] SUMMARY OF THE PRESENT EMBODIMENTS Embodiments of the present invention provide a method, computer program product, and computer system for processing instances of a message sequence.

[0030] One or more processors of a broker in a Knative event structure receive multiple instances, where messages belong to different instances, where each instance has an instance number and an associated instance ID, where each instance includes one or more streams of messages, where each message in each stream is associated with a respective task, where some instances consist of multiple messages where the respective task has completed and executed in parallel, and where the broker includes a Kafka event streaming platform including multiple partitions.

[0031] The one or more processors distribute all messages in the multiple instances for which each task has been completed to the multiple partitions, and different messages in each instance of at least one instance of the at least two instances are distributed to different partitions of the multiple partitions, and the messages distributed to the multiple partitions include multiple parallel task messages.

[0032] The one or more processors order the parallel task messages by grouping them by instance number or instance ID and, within each group, ordering them in ascending order of the timestamp of arrival of each parallel task message at the broker.

[0033] The one or more processors dispatch the parallel task messages of each instance to the service in a governed time sequence by ordering the parallel task messages of each group, and dispatching the parallel task messages according to a first-in, first-out (FIFO) requirement. [Brief description of the drawings]

[0034] [Figure 1] 1 illustrates the event flow in Knative events according to the prior art. [Diagram 2] Shows the prior art Knative event architecture. [Diagram 3] 1 illustrates an architecture for Knative events according to an embodiment of the present invention. [Figure 4] 4 is a flow chart illustrating a method for processing a stream of messages according to an embodiment of the invention. [Figure 5A] 5 is a flow chart illustrating a first embodiment of the steps of FIG. 4 of grouping messages by instance or instance ID, reordering the regrouped messages of each instance by timestamp, and sending each reordered message to a service in accordance with an embodiment of the invention. [Figure 5B] 5 is a flowchart illustrating a second embodiment of the steps of FIG. 4 of reordering messages by timestamp, grouping the reordered messages by instance or instance ID, and sending the reordered messages of each group to a service in accordance with an embodiment of the invention. [Figure 6] 1 illustrates three instances of messages associated with an exemplary task, according to an embodiment of the present invention. [Figure 7] 7 illustrates a runtime topology associated with the three instances depicted in FIG. 6 according to an embodiment of the present invention. [Figure 8] FIG. 1 illustrates a computer system according to an embodiment of the present invention. [Figure 9] FIG. 1 illustrates a cloud computing environment, in accordance with an embodiment of the present invention. [Figure 10] FIG. 2 illustrates abstraction model layers according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0035] FIG. 3 illustrates an architecture 300 for Knative events, according to an embodiment of the invention.

[0036] The architecture 300 includes an Administrator (“Admin”) 305, a K8s Master 310, a Knative event structure 320, and a service 330.

[0037] An administrator 305 interacts 306 with a K8s master 310 to deploy the process.

[0038] The K8s master 310 includes an application programming interface (API) 312, a controller manager 314, and an etcd 316. The controller manager 314 includes a parallel task identifier (ID) 315.

[0039] The Knative event structure 320 includes a broker 340.

[0040] The broker 340 includes an event trace analyzer 345, a receiver 350, a Kafka event streaming platform 360, a dispatcher 370, and a controller 380.

[0041] The Kafka event streaming platform 360 includes topics 361 that are organized into partitions. Although only two partitions (Partition 1 and Partition 2) are explicitly shown in Figure 3, Partition 1 and Partition 2 collectively represent multiple partitions (e.g., 2 partitions, 3 partitions, 4 partitions, etc.).

[0042] The dispatcher 370 includes an event filter 371 and an event sorting manager (EOM) 372 .

[0043] The service 330 may include a container 331 that packages runtime code for processing events (messages) received from a dispatcher 370 of the broker 340 .

[0044] "Event" and "message" have the same meaning and are interchangeable.

[0045] In one embodiment, one or more of the messages received by container 331 trigger execution of a service by container 331 based on content within the one or more messages and / or depending on execution tasks with which the one or more messages are associated, and the execution tasks have been previously received by broker 340 and placed into multiple partitions.

[0046] In the broker 340, a receiver 350 receives the stream of events and distributes (391) the events (messages) to multiple partitions represented by partitions 1 and 2, with each message being placed in only one of the multiple partitions. For each message, the Kafka protocol determines in which partition each message is placed. A dispatcher 370 extracts events from the multiple partitions and dispatches (393) messages to services 330 under the control of a controller 380.

[0047] In the service 330 , runtime code within the container 331 processes messages received from the dispatcher 370 .

[0048] In the K8s Master 310: (i) etcd 316 stores parameters (e.g., configuration data, state data, metadata, etc.) related to the Knative event structures 320, which may be received (395) by the etcd 316 from the controller 380, (ii) the controller manager 314 manages and coordinates the K8s Master and provides the controller 380 with constraints related to dispatching events to services 330 (394), and (iii) the API 312 provides a programming interface between the K8s Master 310 and worker nodes or external nodes (e.g., servers, virtual machines, etc.).

[0049] 4 is a flow chart illustrating a method for processing a stream of messages according to an embodiment of the invention. The method of FIG. 4 executes a process in which instances of a sequence of messages associated with a task are processed. For each instance, one task is executed or multiple tasks are executed in parallel. As each task is completed, a message associated with the completed task is sent to a broker and is eventually dispatched to a container according to the FIFO requirements of the parallel task messages.

[0050] The method of FIG. 4 includes steps 410-490 that utilize the architecture 300 of FIG.

[0051] In step 410, the administrator 305 deploys a process that runs on multiple instances of the streamed messages. Each instance runs one task or multiple tasks in parallel. As each task completes, a message associated with the completed task is sent to the broker.

[0052] In step 420, the parallel task identifier 315 scans the process definition of the process, identifies parallel tasks, adds reordering rules, and sends (398) the process definition, identification of parallel tasks, and reordering rules to etcd 316 for storage in the etcd 316 data store.

[0053] In step 430, the broker 340 receives a number of instances including messages related to a task, which may include a service.

[0054] Each instance received by broker 340 has an instance number and an associated instance ID. Each instance includes one or more streams of messages, and each message in each stream is associated with a respective task. The one or more messages in the stream in each instance of at least two of the multiple instances are composed of multiple messages for which a respective task has been completed and executed in parallel.

[0055] In step 440, the event trace analyzer 345 analyzes trace logs associated with received instances of messages received by the broker 340 to generate a runtime topology, and provides the generated runtime topology to etcd 316 (396).

[0056] In step 450 after all messages have been fetched from the stream of messages, the event filter 371 receives the runtime topology from etcd 316.

[0057] In step 460, all messages that have completed their respective tasks are distributed across multiple partitions 391. The Kafka protocol determines in which partition each message is placed.

[0058] At step 460, different messages in each instance of at least one instance of the at least two instances are distributed to different partitions of the plurality of partitions. The messages distributed to the plurality of partitions include a plurality of parallel task messages.

[0059] A parallel task message is defined as an individual message whose associated message is executed in parallel with at least one other task in the same instance as the individual message. For example, in instance 2 in Figures 7 and 8, each of the three messages whose tasks are B1, B2, and B3 are parallel task messages because each of the tasks B1, B2, and B3 in the same instance 2 execute in parallel.

[0060] Although FIG. 4 shows step 460 being performed after runtime topology steps 440 and 450 are performed, step 460 may alternatively be performed before steps 440 and 450 are performed or after step 430 is performed.

[0061] In step 470, the event filter 371 determines whether the message is a parallel task message.

[0062] If step 470 determines that the message is not a parallel task message (the No branch from step 470), then in step 480, the dispatcher 370 fetches 392 the message from multiple partitions and dispatches 393 the message directly to the service 330.

[0063] If step 470 determines that the message is a parallel task message (the Yes branch from step 470 ), then the parallel task message is sent to the event reordering manager 372 for execution of step 490 .

[0064] In step 490 of processing all parallel task messages together, the parallel task messages are grouped by instance number or instance ID, and within each group, the parallel task messages are ordered by instance and timestamp such that the parallel task messages are ordered in ascending order of the timestamp at which they arrived at the broker.

[0065] In one embodiment of step 490, the event reordering manager 372 groups and reorders the parallel task messages in multiple partitions 392, grouping by instance and reordering by timestamp, and then fetches the reordered parallel task messages from the multiple partitions.

[0066] In a second embodiment of step 490, the event reordering manager 372 fetches parallel task messages from multiple partitions and groups and reorders the parallel task messages, where the grouping is by instance or instance ID and the reordering is by timestamp.

[0067] In step 490, the dispatcher 370 dispatches 393 the reordered messages to the services 330 in a time sequence governed by the ordering of the parallel task messages of each group, dispatching the messages according to FIFO requirements.

[0068] Figure 5A is a flowchart illustrating a first embodiment of step 490 of Figure 4 of grouping parallel task messages by instance or instance ID, reordering the regrouped parallel task messages of each instance by timestamp, and sending the reordered parallel task messages of each group to service 330, according to an embodiment of the present invention. The flowchart of Figure 5A includes steps 510-550.

[0069] In step 510, the event reordering manager 372 groups the parallel task messages by instance or instance ID. The grouping step 510 does not attempt to order the parallel task messages within each instance in a specified sequence, but rather, in one embodiment, randomly orders the parallel task messages within each instance.

[0070] In step 520 for each instance, the event reordering manager 372 determines whether all parallel task messages for the instance have arrived in multiple partitions. Parallel task messages for tasks that are not yet completed have not yet arrived in multiple partitions.

[0071] If, in step 520, it is determined that all of the parallel task messages for the instance have arrived in multiple partitions (the Yes branch from step 520), then, in step 540, the event reordering manager 372 reorders the parallel task messages for the instance by timestamp, and, in step 550, the dispatcher 370 dispatches the parallel task messages for the instance to the services 330 in a time sequence corresponding to the reordered parallel task messages.

[0072] If step 520 determines that all parallel task messages for an instance have not arrived in multiple partitions (the No branch from step 520), then in step 530, the event reordering manager 372 waits for all parallel task messages to arrive before performing the reordering step 540 and the dispatching step 550.

[0073] Figure 5B is a flowchart illustrating a second embodiment of step 490 of Figure 4, which reorders parallel task messages by timestamp, groups parallel task reordered messages by instance or instance ID, and sends each group of reordered parallel task messages to service 330, according to an embodiment of the present invention. The flowchart of Figure 5B includes steps 510-550.

[0074] In the first embodiment of FIG. 5A, the reordering step 540 is performed after the grouping step 510 is performed.

[0075] In the second embodiment of FIG. 5B, a reordering step 540 is performed before the grouping step 510 is performed.

[0076] In step 540, the event reordering manager 372 reorders all parallel task messages by timestamp.

[0077] In step 510 , the event reordering manager 372 groups the reordered parallel task messages by instance or instance ID while maintaining the timestamp reordering performed in step 540 .

[0078] In step 520 for each instance, the event reordering manager 372 determines whether all parallel task messages for the instance have arrived in multiple partitions. Parallel task messages for tasks that are not yet completed have not yet arrived in multiple partitions.

[0079] If step 520 determines that all parallel task messages for an instance have arrived in multiple partitions (the Yes branch from step 520), then in step 550 dispatcher 370 dispatches the reordered parallel task messages for each instance to services 330 in a time sequence corresponding to the reordered parallel task messages.

[0080] If step 520 determines that all parallel task messages for an instance have not arrived in multiple partitions (the No branch from step 520), then in step 530, the event reordering manager 372 waits for all parallel task messages to arrive before performing the dispatch step 550.

[0081] The following example illustrates the method described by FIGS. 4 and 5A with the aid of FIGS. 6 and 7 and Tables 2-6.

[0082] FIG. 6 is a diagram showing three instances of an illustrative example task and associated messages, in accordance with an embodiment of the present invention.

[0083] 6, the instance ID is in the format Ii, where i indicates the instance number. For example, I1 is the instance ID of instance 1, I2 is the instance ID of instance 2, etc.

[0084] 6 illustrates three instances of a task and associated messages 600 (i.e., instances 1, 2, and 3 having instance IDs of I1, I2, and I3, respectively) in accordance with an embodiment of the present invention. The process deployed in step 410 of FIG. 4 is performed for the three instances 1, 2, and 3.

[0085] The timestamp of message 600 has the form T_i_j_k, where i indicates the instance number, j is 2 if the task is running in parallel on instance i and 1 otherwise, and k is a chronological time index such that T_i_j_k2 is later in time than T_i_j_k1 if k2>k1.

[0086] Instance 1 is a sequence of parent task A and its four child tasks (B1, B2, B3, B4) that have previously completed and been dispatched to service. The four child tasks of instance 1 run in parallel. Tasks B1 and B2 of instance 1 have completed, so their respective messages related to tasks B1 and B2 of instance 1 are sent by broker 340 to multiple partitions. Tasks B3 and B4 of instance 1 have not completed, so their messages related to tasks B3 and B4 of instance 1 are not sent by broker 340 to multiple partitions until tasks B3 and B4 of instance 1 are completed, which is why the related messages of instances B3 and B4 of instance 1 are not shown in FIG. 6.

[0087] Instance 2 is a sequence of parent task A and its three child tasks (B1, B2, B3) that were previously completed and offered for service. The three child tasks of Instance 2 run in parallel. Because tasks B1, B2, and B3 of Instance 2 have completed, each message associated with tasks B1 and B2 of Instance 2 is sent by broker 340 to multiple partitions.

[0088] Since instance 3 is the only instance of task A that has completed, messages related to task A in instance 3 are sent from broker 340 to multiple partitions.

[0089] Figure 7 illustrates a runtime topology associated with the three instances depicted in Figure 6, in accordance with an embodiment of the present invention. The runtime topology depicted in Figure 7 is the result of execution of step 440 of Figure 4, in which the runtime topology is generated.

[0090] Note that in Figure 7, task IDs are displayed as a combination of instance ID and task name. For example, a task ID of I2_B1 indicates the combination of instance ID I2 of instance 2 and task name B1.

[0091] The runtime topology specifies that the B tasks in instance 1 (B1, B2, B3, B4) execute in parallel, the B tasks in instance 2 (B1, B2, B3) execute in parallel, and the A task in instance 3 is a single task.

[0092] Table 2 shows how messages are distributed to partitions 1 and 2 in step 460 of FIG.

[0093] [Table 2]

[0094] In Table 2, partition IDs take the form Pp, where p represents the partition number. For example, P1 is the partition ID for partition 1, and P2 is the partition ID for partition 2. The Kafka protocol determines which partition each message is placed in.

[0095] Because message S_3_1_1 is not a parallel task message (No branch from step 470 in FIG. 4), Table 3 shows the result when message S_3_1_1 of task A is removed from partition 1 and dispatched to service 330.

[0096] [Table 3]

[0097] The messages in Table 3 are parallel task messages that are sequenced by grouping and reordering according to step 490 of FIG. 4, which is performed according to the flowchart of FIG. 5A.

[0098] Table 4 groups the messages of Table 3 by instance or instance ID according to step 510 of FIG. 5A.

[0099] [Table 4]

[0100] The grouping step 510 does not attempt to reorder the messages within each instance in a specified sequence, but rather, in one embodiment, randomly orders the messages within each instance.

[0101] Table 5 is the result of performing steps 520 and 530 of Figure 5A, where messages of Instance 1 in Table 4 have been deleted and placed in "waiting" status because all messages of Instance 1 have not arrived to the multiple partitions. As noted above, tasks B3 and B4 of Instance 1 have not completed and therefore have not arrived to the multiple partitions.

[0102] [Table 5]

[0103] Table 6 reorders the messages of Table 5 by timestamp and performs step 540 of FIG. 5A.

[0104] [Table 6]

[0105] The three messages of instance 2 of Table 6 are then dispatched by dispatcher 370 to service 330 in a time sequence corresponding to the reordered messages, and step 550 of FIG. 5A is performed.

[0106] FIG. 8 illustrates a computer system 90 according to an embodiment of the present invention.

[0107] The computer system 90 includes a processor 91, an input device 92 coupled to the processor 91, an output device 93 coupled to the processor 91, and memory devices 94 and 95 each coupled to the processor 91. The processor 91 represents one or more processors and can represent a single processor or multiple processors. The input device 92 may be, among other things, a keyboard, a mouse, a camera, a touch screen, and the like, or a combination thereof. The output device 93 may be, among other things, a printer, a plotter, a computer screen, a magnetic tape, a removable hard disk, a floppy disk, and the like, or a combination thereof. The memory devices 94 and 95 may each be, among other things, a hard disk, a floppy disk, a magnetic tape, an optical storage device such as a compact disk (CD) or a digital video disk (DVD), a dynamic random access memory (DRAM), a read only memory (ROM), and the like, or a combination thereof. The memory device 95 includes computer code 97. The computer code 97 includes algorithms for carrying out embodiments of the present invention. The processor 91 executes the computer code 97. The memory device 94 includes input data 96. Input data 96 includes inputs required by computer code 97. Output device 93 displays output from computer code 97. Either or both of memory devices 94 and 95 (or one or more additional memory devices, such as read-only memory device 96) may include algorithms and may be used as computer usable media (or computer readable media or program storage devices) having computer readable program code embodied therein and / or having other data stored therein, the computer readable program code including computer code 97. In general, a computer program product (or, alternatively, an article of manufacture) of computer system 90 may include a computer usable medium (or program storage device).

[0108] In some embodiments, rather than being stored and accessed from a hard drive, optical disk, or other writable, rewritable, or removable hardware memory device 95, the stored computer program code 98 (e.g., including algorithms) may be stored in a static, non-removable, read-only storage medium 99, such as a read-only memory (ROM) unit 99, or may be accessed directly by the processor 91 from such static, non-removable, read-only medium 99. Similarly, in some embodiments, the stored computer program code 97 may be stored as computer readable firmware 99, or may be accessed directly by the processor 91 from such firmware 99, rather than from a more dynamic or removable hardware data storage device 95, such as a hard drive or optical disk.

[0109] Nonetheless, any of the components of the present invention may be created, integrated, hosted, maintained, deployed, managed, serviced, etc., by a service supplier that provides cross-referencing metrics associated with the plug-in components, generating software code modules, and improving software technology related to enabling operational functionality of the target cloud components. Thus, the present invention discloses a process for deploying, creating, integrating, hosting, maintaining, or integrating, or a combination thereof, a computing infrastructure, including integrating computer readable code into a computer system 90, the code in combination with the computer system 90, capable of performing a method for improving software technology related to cross-referencing metrics associated with the plug-in components, generating software code modules, and enabling processes for enabling operational functionality of the target cloud components. In another embodiment, the present invention provides a business method for performing the process steps of the present invention on a subscription, advertising, or fee basis, or a combination thereof. That is, a service supplier, such as a solution integrator, may provide cross-referencing metrics associated with the plug-in components, generating software code modules, and enabling processes for improving software technology related to enabling operational functionality of the target cloud components. In this case, the service supplier may create, maintain, support, etc., a computer infrastructure that performs the process steps of the present invention for one or more customers. In return, the service supplier may receive payments from the customer based on a subscription or fee agreement, or both, and / or the service supplier may receive payments from the sale of advertising content to one or more third parties.

[0110] Although Figure 8 illustrates computer system 90 as a particular configuration of hardware and software, any configuration of hardware and software known to one of ordinary skill in the art may be utilized for the purposes described above in combination with the particular computer system 90 of Figure 8. For example, memory devices 94 and 95 may be part of a single memory device rather than separate memory devices.

[0111] The present invention may be a system, method or computer program product, or combination thereof, integrated at any possible level of technical detail. The computer program product may include a computer readable storage medium having stored thereon computer readable program instructions for causing a processor to carry out aspects of the present invention.

[0112] A computer-readable storage medium may be a tangible device capable of holding and storing instructions used by an instruction execution device. A computer-readable storage medium may be, by way of example and not limitation, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or a suitable combination thereof. A more specific example of a computer-readable storage medium may be, by way of example and not limitation, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or a suitable combination thereof. A more specific example of a computer-readable storage medium may be, by way of example and not limitation, a portable computer diskette, a hard disk, a RAM, a ROM, an EPROM (or flash memory), an SRAM, a CD-ROM, a DVD, a memory stick, a floppy disk, a mechanically encoded device having instructions recorded on a punch card or a ridge structure in a groove, or the like, and a suitable combination thereof. A computer-readable storage medium as used herein should not be construed as a transitory signal per se, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted over a wire.

[0113] The computer readable program instructions described herein can be downloaded from the computer readable storage medium to each computing / processing device or to an external computer or storage device via a network (e.g., the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof). The network may be comprised of copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface of each computing / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage in the computer readable storage medium within the respective computing / processing device.

[0114] The computer readable program instructions for carrying out the operations of the present invention may be either source code or object code written in any combination of one or more programming languages, including assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or object oriented programming languages ​​such as Smalltalk, C++, etc., and procedural programming languages ​​such as the "C" programming language and similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, as a stand-alone software package, or partially on the user's computer. Alternatively, they may be executed partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can execute computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the computer readable program instructions to perform aspects of the invention.

[0115] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0116] These computer readable program instructions can be provided to a processor of a computer or other programmable data processing apparatus to generate a machine, such that the instructions, executed via a processor of the computer or other programmable data processing apparatus, generate means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium connectable to a computer, programmable data processing apparatus, or other device or combination that functions in a particular way, such that the computer readable storage medium having the instructions stored thereon constitutes one of a product including instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0117] Computer readable program instructions, such as instructions to perform the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams on a computer, other programmable apparatus, or other device, may also be loaded into a computer, other programmable data processing apparatus, or other device to perform a series of operational steps on the computer, other programmable apparatus, or other device to generate a computer-implemented process.

[0118] The flowcharts and block diagrams in the figures illustrate the configuration, functionality, and operation of executable implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or part of an instruction, which constitutes one or more executable instructions for implementing a specified logical function. In some alternative embodiments, the functions shown in the blocks may differ from the order shown in the figures. For example, two blocks shown in succession may in fact be accomplished as one step and executed simultaneously, substantially simultaneously, partially or fully in a time-overlapping manner, or the blocks may be executed in reverse order depending on the functions involved. It should also be noted that each block of the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a special purpose hardware-based system that executes the specified functions or operations or executes a combination of special purpose hardware and computer instructions.

[0119] The computer program product of the present invention includes one or more computer readable hardware storage devices having computer readable program code stored therein, said program code including instructions executable by one or more processors of a computer system to perform the methods of the present invention.

[0120] The computer system of the present invention comprises one or more processors, one or more memories, and one or more computer-readable hardware storage devices, the one or more hardware storage devices containing program code executable by the one or more processors via the one or more memories to implement the methods of the present invention.

[0121] <Cloud computing environment> Although this disclosure includes detailed descriptions of cloud computing, implementation of the teachings described herein is not limited to a cloud computing environment. Rather, embodiments of the invention may be practiced in conjunction with any other type of computing environment now known or developed in the future.

[0122] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal administrative effort or interaction with a service provider. The cloud model may include at least five characteristics, at least three service models, and at least four implementation models.

[0123] The characteristics are as follows:

[0124] On-Demand Self-Service: Cloud consumers can unilaterally provision computing capacity, such as server time or network storage, automatically as needed, without the need for human interaction with the service provider.

[0125] Broad network access: Computing power is available over the network and can be accessed through standard mechanisms, facilitating use by heterogeneous thin- and thick-client platforms (e.g., cell phones, laptops, PDAs).

[0126] Resource Pooling: Computing resources from a provider are pooled and offered to multiple consumers using a multi-tenant model. Different physical and virtual resources are dynamically allocated and reallocated depending on demand. Consumers generally have no control or knowledge of the exact location of the resources provided to them, so there is a sense of location independence, although consumers may be able to determine location at a higher level of abstraction (e.g. country, state, data center).

[0127] Rapid elasticity: Computing capacity can be provisioned quickly and elastically, in some cases automatically, to scale out immediately and to be released quickly to scale in immediately. To the consumer, the computing capacity available for provisioning often appears unlimited and can be purchased at any time and in any quantity.

[0128] Metered Services: Cloud systems leverage metering capabilities at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, active user accounts) to automatically control and optimize resource usage. Resource usage can be monitored, controlled, and reported to provide transparency to both providers and consumers of the services utilized.

[0129] The service model is as follows:

[0130] Software as a Service (SaaS): The functionality offered to the consumer is the availability of a provider's applications running on a cloud infrastructure that can be accessed from a variety of client devices through a thin-client interface such as a web browser (e.g., webmail). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even the individual application functions, except for limited user-specific application configuration settings.

[0131] Platform as a Service (PaaS): The capability offered to the consumer is to deploy applications that the consumer creates or acquires using programming languages ​​and tools supported by the provider onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but does have control over the deployed applications and, in some cases, the configuration of the hosting environment.

[0132] Infrastructure as a Service (IaaS): The functionality offered to the consumer is the provision of processors, storage, networking, and other basic computing resources onto which the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but has control over the operating systems, storage, and deployed applications, and may have partial control over some network components (e.g., host firewalls).

[0133] The deployment model is as follows:

[0134] Private Cloud: The cloud infrastructure is dedicated to a specific organization. It can be managed by that organization or a third party and can exist on-premise or off-premise.

[0135] Community Cloud: The cloud infrastructure is shared by multiple organizations to support a specific community with common concerns (e.g., mission, security requirements, policies, and compliance). The cloud infrastructure can be managed by the organizations or a third party and can exist on-premise or off-premise.

[0136] Public cloud: The cloud infrastructure is available to the general public or large industry organizations and is owned by an organization that sells cloud services.

[0137] Hybrid Cloud: This cloud infrastructure combines two or more cloud models (private, community or public), each of which retains its inherent semantics but is bound together by standards or specific technologies that enable data and application portability (e.g. cloud bursting for load balancing between clouds).

[0138] A cloud computing environment is a service-oriented environment with an emphasis on statelessness, low coupling, modularity and semantic interoperability. At the core of cloud computing is an infrastructure that includes a network of interconnected nodes.

[0139] Referring to FIG. 9, an exemplary cloud computing environment 50 is shown. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10, to which local computing devices used by cloud consumers (e.g., personal digital assistants (PDAs) or mobile phones 54A, desktop computers 54B, laptop computers 54C, or automobile computer systems 54N, or combinations thereof) can communicate. The nodes 40 can communicate with each other. The nodes 40 can be physically or virtually grouped (not shown) in one or more networks, such as, for example, a private, community, public, or hybrid cloud, or combinations thereof, as described above. This allows the cloud computing environment 50 to provide infrastructure, platform, or software, or combinations thereof, as a service, for which the cloud consumer does not need to maintain resources on the local computing device. It should be understood that the types of computing devices 54A-N shown in FIG. 9 are merely exemplary, and that the computing nodes 10 and the cloud computing environment 50 can communicate with any type of electronic device over any type of network or network addressable connection (e.g., using a web browser), or both.

[0140] Referring to Figure 10, a set of functional abstraction layers provided by cloud computing environment 50 (Figure 9) is shown. It should be understood in advance that the components, layers and functions shown in Figure 10 are merely exemplary and the embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided:

[0141] Hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframe 61, reduced instruction set computer (RISC) architecture based servers 62, servers 63, blade servers 64, storage devices 65, and networks and network components 66. In some embodiments, software components include network application server software 67 and database software 68.

[0142] The virtualization layer 70 provides an abstraction layer from which the following virtual entities can be provided, for example: virtual servers 71, virtual storage 72, virtual networks including virtual private networks 73, virtual applications and operating systems 74, and virtual clients 75.

[0143] By way of example, the management layer 80 may provide the following functions: Resource provisioning 81 allows dynamic procurement of computing and other resources utilized to execute tasks within the cloud computing environment. Metering and pricing 82 allows cost tracking as resources are utilized within the cloud computing environment and billing or invoicing for the consumption of these resources. By way of example, these resources may include application software licenses. Security allows for identification and verification of cloud consumers and tasks as well as protection for data and other resources. User portal 83 provides consumers and system administrators with access to the cloud computing environment. Service level management 84 allows for allocation and management of cloud computing resources such that requested service levels are met. Service level agreement (SLA) planning and fulfillment 85 allows for pre-arranging and procurement of anticipated future needs for cloud computing resources according to SLAs.

[0144] The workload layer 30 provides examples of functionality available to a cloud computing environment. Examples of workloads and functionality that can be provided from this layer include mapping and navigation 31, software development and lifecycle management 32, virtual classroom instruction delivery 33, data analytics processing 34, transaction processing 35, and message sequence instance processing 36.

[0145] The examples and embodiments of the invention described herein are presented for illustrative purposes and should not be construed as exhaustive. Although the embodiments of the invention are described herein for illustrative purposes, many modifications and variations will become apparent to those skilled in the art. The description of the invention herein is intended to explain the principles underlying these examples and embodiments in order to explain the practical application and technical improvements of the invention to known technologies, computer systems, or products or combinations thereof.

Claims

1. 1. A method for processing an instance of a message sequence, the method comprising: receiving, by one or more processors of a broker in a Knative event structure, a plurality of instances, each instance having an instance number and an associated instance ID, each instance including one or more streams of messages, each message of each stream being associated with a respective task, the one or more messages of the streams of each instance of at least two instances of the plurality of instances being composed of a plurality of messages where a respective task has completed and executed in parallel, the broker including a Kafka event streaming platform including a plurality of partitions; distributing, by the one or more processors, all messages in the plurality of instances for which a respective task has been completed to the plurality of partitions, wherein different messages in each instance of at least one instance of the at least two instances are distributed to different partitions of the plurality of partitions, and the messages distributed to the plurality of partitions include a plurality of parallel task messages; ordering, by the one or more processors, the parallel task messages by grouping the parallel task messages by the instance number or instance ID and ordering within each group by ascending order of a timestamp of arrival of each parallel task message at the broker; dispatching, by the one or more processors, the parallel task messages of each instance to a service in a time sequence governed by the ordering of the parallel task messages of each group, where the parallel task messages are dispatched according to a first-in, first-out (FIFO) requirement; A method comprising:

2. 2. The method of claim 1 , wherein the ordering includes grouping the parallel task messages by the instance number or instance ID, and then reordering the parallel task messages within each group by the timestamp of arrival of each parallel task message at the broker.

3. 2. The method of claim 1 , wherein the ordering comprises reordering the parallel task messages by the timestamp of arrival of each parallel task message at the broker, and then grouping the reordered messages by instance or instance ID while maintaining the timestamp reordering.

4. The method comprises: determining, by the one or more processors, that a message in the plurality of partitions is not a parallel task message, and in response, dispatching, by the one or more processors, the message to the service. The method of claim 1 further comprising:

5. The plurality of instances includes an instance including two or more parallel task messages that have arrived at the plurality of partitions and at least one parallel task message that has not yet arrived at the plurality of partitions, and the method further comprises: waiting for the at least one parallel task message to complete and arrive at the plurality of partitions before performing the ordering and dispatching for the one instance, by the one or more processors. The method of claim 1.

6. The method comprises: analyzing, using the one or more processors, trace logs associated with the instances received by the broker with an event trace analyzer in the broker; generating, using the one or more processors, a runtime topology associated with the plurality of instances based on the analysis by the event trace analyzer; Using the one or more processors, providing the generated runtime topology by the event trace analyzer to etcd of a K8s master; The method of claim 1 further comprising:

7. The method comprises: receiving the runtime topology from the etcd by an event filter in the broker using the one or more processors to determine if the fetched messages are parallel task messages after all messages have been fetched from the stream of messages; The method of claim 6 further comprising:

8. A computer program product comprising one or more computer readable hardware storage devices having computer readable program code stored therein, said program code comprising instructions executable by one or more processors of a computer system to perform a method for processing instances of a message sequence, said method comprising: receiving, by the one or more processors of a broker in a Knative event structure, a plurality of instances, each instance having an instance number and an associated instance ID, each instance including one or more streams of messages, each message of each stream being associated with a respective task, the one or more messages of the streams of each instance of at least two instances of the plurality of instances being composed of a plurality of messages where a respective task has completed and executed in parallel, the broker including a Kafka event streaming platform including a plurality of partitions; distributing, by the one or more processors, all messages in the plurality of instances for which a respective task has been completed to the plurality of partitions, wherein different messages in each instance of at least one instance of the at least two instances are distributed to different partitions of the plurality of partitions, and the messages distributed to the plurality of partitions include a plurality of parallel task messages; ordering, by the one or more processors, the parallel task messages by grouping the parallel task messages by the instance number or instance ID and ordering within each group by ascending order of a timestamp of arrival of each parallel task message at the broker; dispatching, by the one or more processors, the parallel task messages of each instance to a service in a time sequence governed by the ordering of the parallel task messages of each group, where the parallel task messages are dispatched according to a first-in, first-out (FIFO) requirement; 2. A computer program product comprising:

9. 9. The computer program product of claim 8, wherein the ordering comprises grouping the parallel task messages by the instance number or instance ID, and then reordering the parallel task messages within each group by the timestamp of arrival of each parallel task message at the broker.

10. 9. The computer program product of claim 8, wherein the ordering comprises reordering the parallel task messages by the timestamp of arrival of each parallel task message at the broker, and then grouping the reordered messages by instance or instance ID while maintaining the timestamp reordering.

11. The method comprises: determining, by the one or more processors, that a message in the plurality of partitions is not a parallel task message, and in response, dispatching, by the one or more processors, the message to the service.

9. The computer program product of claim 8, further comprising:

12. The plurality of instances includes an instance including two or more parallel task messages that have arrived at the plurality of partitions and at least one parallel task message that has not yet arrived at the plurality of partitions, and the method further comprises: waiting for the at least one parallel task message to complete and arrive at the plurality of partitions before performing the ordering and dispatching for the one instance, by the one or more processors.

9. A computer program product as claimed in claim 8.

13. The method comprises: analyzing, using the one or more processors, trace logs associated with the instances received by the broker with an event trace analyzer in the broker; generating, using the one or more processors, a runtime topology associated with the plurality of instances based on the analysis by the event trace analyzer; Using the one or more processors, providing the generated runtime topology by the event trace analyzer to etcd of a K8s master; 9. The computer program product of claim 8, further comprising:

14. The method comprises: receiving the runtime topology from the etcd by an event filter in the broker using the one or more processors to determine if the fetched messages are parallel task messages after all messages have been fetched from the stream of messages; 14. The computer program product of claim 13, further comprising:

15. 1. A computer system comprising one or more processors, one or more memories, and one or more computer readable hardware storage devices, the one or more hardware storage devices including program code executable by the one or more processors via the one or more memories to implement a method for processing instances of message sequences, the method comprising: receiving, by the one or more processors of a broker in a Knative event structure, a plurality of instances, each instance having an instance number and an associated instance ID, each instance including one or more streams of messages, each message of each stream being associated with a respective task, the one or more messages of the streams of each instance of at least two instances of the plurality of instances being composed of a plurality of messages where a respective task has completed and executed in parallel, the broker including a Kafka event streaming platform including a plurality of partitions; distributing, by the one or more processors, all messages in the plurality of instances for which a respective task has been completed to the plurality of partitions, wherein different messages in each instance of at least one instance of the at least two instances are distributed to different partitions of the plurality of partitions, and the messages distributed to the plurality of partitions include a plurality of parallel task messages; ordering, by the one or more processors, the parallel task messages by grouping the parallel task messages by the instance number or instance ID and ordering within each group by ascending order of a timestamp of arrival of each parallel task message at the broker; dispatching, by the one or more processors, the parallel task messages of each instance to a service in a time sequence governed by the ordering of the parallel task messages of each group, where the parallel task messages are dispatched according to a first-in, first-out (FIFO) requirement; 2. A computer system comprising:

16. 16. The computer system of claim 15, wherein the ordering comprises grouping the parallel task messages by the instance number or instance ID, and then reordering the parallel task messages within each group by the timestamp of arrival of each parallel task message at the broker.

17. the ordering includes reordering the parallel task messages by the timestamp of arrival of each parallel task message at the broker, and then grouping the reordered messages by instance or instance ID while maintaining the timestamp reordering.

16. The computer system of claim 15.

18. The method comprises: determining, by the one or more processors, that a message in the plurality of partitions is not a parallel task message, and in response, dispatching, by the one or more processors, the message to the service.

16. The computer system of claim 15, further comprising:

19. The plurality of instances includes an instance including two or more parallel task messages that have arrived at the plurality of partitions and at least one parallel task message that has not yet arrived at the plurality of partitions, and the method further comprises: waiting for the at least one parallel task message to complete and arrive at the plurality of partitions before performing the ordering and dispatching for the one instance, by the one or more processors.

16. The computer system of claim 15.

20. The method comprises: analyzing, using the one or more processors, trace logs associated with the instances received by the broker with an event trace analyzer in the broker; generating, using the one or more processors, a runtime topology associated with the plurality of instances based on the analysis by the event trace analyzer; Using the one or more processors, providing the generated runtime topology by the event trace analyzer to etcd of a K8s master; 16. The computer system of claim 15, further comprising:

Citation Information

Patent Citations

  • Information processing system, information processing device, information processing method, and program

    JP2020154381A

  • Streaming Platform Reader

    US20190182188A1