Patent ID: 12200052

DETAILED DESCRIPTION

Detailed embodiments of the claimed structures and methods are disclosed herein; however, it can be understood that the disclosed embodiments are merely illustrative of the claimed structures and methods that may be embodied in various forms. This invention may, however, be embodied in many different forms and should not be construed as limited to the exemplary embodiments set forth herein. In the description, details of well-known features and techniques may be omitted to avoid unnecessarily obscuring the presented embodiments.

Data streaming involves continually transferring data from one or more reliable data sources at high speed for processing into specific outputs, such as a data sink or a subscriber. However, if a data sink is unreliable, an impedance mismatch often results between the reliable streaming data source and the unreliable non-streaming data sink. The impedance mismatch can often stem from the inability of the target system to receive messages due to internal processing backlog, intermittent network outages, or other potential causes that affect streaming pipeline availability. Preventing an impedance mismatch between a reliable streaming data source and an unreliable, non-streaming data sink is important, particularly because an impedance mismatch can result in data loss.

An example of when such impedance mismatch occurs may involve data delivery from a streaming system to a full-text search engine using batch requests. Sometimes while merging its own indexes, the full-text search engine may reject batch requests. The request rejections are not atomic, i.e., part of a batch request may succeed, and part of the batch request may fail. Furthermore, the segments of the successful batch request and the segments of the failed records in the batch may not be continuous. For example, while attempting to deliver a batch of one thousand (1,000) records from a streaming system to the full-text search engine for indexing, the full-text search engine may momentarily freeze after the first three hundred (300) batch records and remain frozen until the batch is trying to write batch record eight hundred (800). As a result, records one through three hundred (1-300) and eight hundred through one thousand (800-1,000) can be delivered successfully, while batch records three hundred one through seven hundred ninety-nine (301-799) fail. Given that the full-text search engine can return the list of the successful and failed record IDs only after the batch completes, there can be no determinate stream offset that could be committed and that would effectively rewind the stream for re-delivery of the failed records. Additionally, the commit cannot be retried at batch record three hundred (300) because the successful commits between eight hundred through one thousand (800-1,000) would be ignored and resubmitted; likewise, the commit cannot be retried at one thousand (1,000) because the failures from three hundred through seven hundred ninety-nine (300-799) would be ignored and lost.

Therefore, preventing impedance mismatches between a reliable streaming data source and an unreliable, non-streaming data sink is important to prevent data loss. To further improve the prevention of impedance mismatches resulting from unreliable data sinks, there is a need to prevent data loss specifically caused by partially failed batch requests when delivering data to an unreliable, non-streaming target system.

Currently, the existing methods attempt to handle impedance mismatches resulting from unreliable data sinks using various methods. One way in which current methods attempt to address problems with impedance mismatches resulting from unreliable data sinks is by employing numerous secondary devices, such as full-time fallback servers/systems, to handle data loss at the network or system level. However, this approach requires additional hardware and software, therefore increasing costs. Additionally, this approach primarily handles continuous successes and failures, and thus, intermediate successes and failures persist. Another way in which current methods attempt to handle impedance mismatches resulting from unreliable data sinks is by rewinding an incoming data stream. However, rewinding a data stream blocks the continuous stream of incoming new data, resulting in reduced system performance as well as compounding the problem. Therefore, shortcomings remain with handling unreliable data sinks.

Embodiments of the present invention can remedy the above-mentioned deficiencies by providing a recovery mechanism that prevents data loss caused by partially failed batch requests while delivering data to an unreliable, non-streaming target system. Specifically, embodiments of the present invention can provide zero-message loss capability while only retransmitting failed data, wherein the data sink is too unreliable to receive messages upon a first transmission attempt. Additionally, embodiments of the present invention can employ “N” queues to handle unreceived messages by the unreliable sink, for retransmission, thereby ensuring all fallback occurs within the stream handler. Thus, all fallback occurs within the stream handler. Furthermore, embodiments of the present invention can provide on-demand queuing for only the necessary handling of failed messages in the case of the presence of an unreliable sink without employing full-time fallback duplicate servers/systems.

Embodiments of the present invention have the capacity to improve the prevention of data loss caused by partially failed batch requests when delivering data to an unreliable, non-streaming target system by providing a processor-implemented method, a computer system, and a computer program product for handling unreliable data sinks. Specifically, the present invention can read, continuously, via a stream processor, a batch of data entering the stream processor via a reliable input stream, the stream processor comprising a daisy chain of sink nodes, wherein a first sink node of the daisy chain is a primary sink node and a subsequent plurality of sink nodes in the daisy chain are fallback sink nodes, output, via the stream processor, processed data to a non-streaming target system, upon completion of the processed data to the non-streaming target system, invoke on the primary sink node, an asynchronous callback function listing successful and failed record IDs of the processed data, and pass, via the primary sink node, one or more failed records to a first fallback sink within the daisy chain of sink nodes, while the primary sink node concurrently continues submitting one or more new batches of data to the non-streaming target system.

Various aspects of the present disclosure are described by narrative text, flowcharts, block diagrams of computer systems, and/or block diagrams of the machine logic included in computer program product (CPP) embodiments. With respect to any flowcharts, depending upon the technology involved, the operations can be performed in a different order than what is shown in a given flowchart. For example, again depending upon the technology involved, two operations shown in successive flowchart blocks may be performed in reverse order, as a single integrated step, concurrently, or in a manner at least partially overlapping in time.

A computer program product embodiment (“CPP embodiment” or “CPP”) is a term used in the present disclosure to describe any set of one, or more, storage media (also called “mediums”) collectively included in a set of one, or more, storage devices that collectively include machine readable code corresponding to instructions and/or data for performing computer operations specified in a given CPP claim. A “storage device” is any tangible device that can retain and store instructions for use by a computer processor. Without limitation, the computer-readable storage medium may be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these mediums include: diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as punch cards or pits/lands formed in a major surface of a disc) or any suitable combination of the foregoing. A computer-readable storage medium, as that term is used in the present disclosure, is not to be construed as storage in the form of transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through a fiber optic cable, electrical signals communicated through a wire, and/or other transmission media. As will be understood by those of skill in the art, data is typically moved at some occasional points in time during normal operations of a storage device, such as during access, de-fragmentation, or garbage collection, but this does not render the storage device as transitory because the data is not transitory while it is stored.

The following described exemplary embodiments provide a system, method, and program product for handling unreliable data sinks, comprising reading, continuously, via a stream processor, a batch of data entering the stream processor via a reliable input stream, the stream processor comprising a daisy chain of sink nodes, wherein a first sink node of the daisy chain is a primary sink node and a subsequent plurality of sink nodes in the daisy chain are fallback sink nodes, outputting, via the stream processor, processed data to a non-streaming target system, upon completion of the processed data to the non-streaming target system, invoking on the primary sink node, an asynchronous callback function listing successful and failed record IDs of the processed data, and passing, via the primary sink node, one or more failed records to a first fallback sink within the daisy chain of sink nodes, while the primary sink node concurrently continues submitting one or more new batches of data to the non-streaming target system.

Beginning now withFIG.1, an exemplary networked computer environment100is depicted, according to at least one embodiment. Computing environment100contains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as data sink stream reliability routing code200, also referred to as data sink stream reliability routing program200. In addition to code block200computing environment100includes, for example, computer101, wide area network (WAN)102, end-user device (EUD)103, remote server104, public cloud105, and private cloud106. In this embodiment, computer101includes processor set110(including processing circuitry120and cache121), communication fabric111, volatile memory112, persistent storage113(including operating system122and code block200, as identified above), peripheral device set114(including user interface (UI), device set123, storage124, and Internet of Things (IoT) sensor set125), and network module115. Remote server104includes remote database130. Public cloud105includes gateway140, cloud orchestration module141, host physical machine set142, virtual machine set143, and container set144.

COMPUTER101may take the form of a desktop computer, laptop computer, tablet computer, smartphone, smartwatch or other wearable computer, mainframe computer, quantum computer, or any other form of computer or mobile device now known or to be developed in the future that is capable of running an algorithm, accessing a network, or querying a database, such as remote database130. As is well understood in the art of computer technology, and depending upon the technology, performance of a computer-implemented method may be distributed among multiple computers and/or between multiple locations. On the other hand, in this presentation of computing environment100, detailed discussion is focused on a single computer, specifically computer101, to keep the presentation as simple as possible. Computer101may be located in a cloud, even though it is not shown in a cloud inFIG.1. On the other hand, computer101is not required to be in a cloud except to any extent as may be affirmatively indicated.

PROCESSOR SET110includes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitry120may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitry120may implement multiple processor threads and/or multiple processor cores. Cache121is memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set110. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor set may be located “off-chip.” In some computing environments, processor set110may be designed for working with qubits and performing quantum computing.

Computer-readable program instructions are typically loaded onto computer101to cause a series of operational steps to be performed by processor set110of computer101and thereby affect a computer-implemented method, such that the instructions thus executed will instantiate the methods specified in flowcharts and/or narrative descriptions of computer-implemented methods included in this document (collectively referred to as “the inventive methods”). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache121and the other storage media discussed below. The program instructions, and associated data, are accessed by processor set110to control and direct performance of the inventive methods. In computing environment100, at least some of the instructions for performing the inventive methods may be stored in code block200in persistent storage113.

COMMUNICATION FABRIC111is the signal conduction path that allows the various components of computer101to communicate with each other. Typically, this fabric is made of switches and electrically conductive paths, such as the switches and electrically conductive paths that make up buses, bridges, physical input/output ports, and the like. Other types of signal communication paths may be used, such as fiber optic communication paths and/or wireless communication paths.

VOLATILE MEMORY112is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, the volatile memory is characterized by random access, but this is not required unless affirmatively indicated. In computer101, the volatile memory112is located in a single package and is internal to computer101, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to computer101.

PERSISTENT STORAGE113is any form of non-volatile storage for computers that is now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is being supplied to computer101and/or directly to persistent storage113. Persistent storage113may be a read-only memory (ROM), but typically at least a portion of the persistent storage allows writing of data, deletion of data, and re-writing of data. Some familiar forms of persistent storage include magnetic disks and solid-state storage devices. Operating system122may take several forms, such as various known proprietary operating systems or open source Portable Operating System Interface type operating systems that employ a kernel. The code included in code block200typically includes at least some of the computer code involved in performing the inventive methods.

PERIPHERAL DEVICE SET114includes the set of peripheral devices of computer101. Data communication connections between the peripheral devices and the other components of computer101may be implemented in various ways, such as Bluetooth connections, Near-Field Communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), insertion type connections (for example, secure digital (SD) card), connections made through local area communication networks and even connections made through wide area networks such as the internet. In various embodiments, UI device set123may include components such as a display screen, speaker, microphone, wearable devices (such as goggles and smartwatches), keyboard, mouse, printer, touchpad, game controllers, and haptic devices. Storage124is external storage, such as an external hard drive, or insertable storage, such as an SD card. Storage124may be persistent and/or volatile. In some embodiments, storage124may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer101is required to have a large amount of storage (for example, where computer101locally stores and manages a large database) then this storage may be provided by peripheral storage devices designed for storing very large amounts of data, such as a storage area network (SAN) that is shared by multiple, geographically distributed computers. IoT sensor set125is made up of sensors that can be used in Internet of Things applications. For example, one sensor may be a thermometer and another sensor may be a motion detector.

NETWORK MODULE115is the collection of computer software, hardware, and firmware that allows computer101to communicate with other computers through WAN102. Network module115may include hardware, such as modems or Wi-Fi signal transceivers, software for packetizing and/or de-packetizing data for communication network transmission, and/or web browser software for communicating data over the internet. In some embodiments, network control functions and network forwarding functions of network module115are performed on the same physical hardware device. In other embodiments (for example, embodiments that utilize software-defined networking (SDN)), the control functions and the forwarding functions of network module115are performed on physically separate devices, such that the control functions manage several different network hardware devices. Computer-readable program instructions for performing the inventive methods can typically be downloaded to computer101from an external computer or external storage device through a network adapter card or network interface included in network module115.

WAN102is any wide area network (for example, the internet) capable of communicating computer data over non-local distances by any technology for communicating computer data, now known or to be developed in the future. In some embodiments, the WAN may be replaced and/or supplemented by local area networks (LANs) designed to communicate data between devices located in a local area, such as a Wi-Fi network. The WAN and/or LANs typically include computer hardware such as application-specific integrated circuits (“ASICs”), copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers.

END USER DEVICE (EUD)103is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates computer101) and may take any of the forms discussed above in connection with computer101. EUD103typically receives helpful and useful data from the operations of computer101. For example, in a hypothetical case where computer101is designed to provide a recommendation to an end user, this recommendation would typically be communicated from network module115of computer101through WAN102to EUD103. In this way, EUD103can display, or otherwise present, the recommendation to an end user. In some embodiments, EUD103may be a client device, such as thin client, heavy client, mainframe computer, desktop computer, and so on.

REMOTE SERVER104is any computer system that serves at least some data and/or functionality to computer101. Remote server104may be controlled and used by the same entity that operates computer101. Remote server104represents the machine(s) that collect and store helpful and useful data for use by other computers, such as computer101. For example, in a hypothetical case where computer101is designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to computer101from remote database130of remote server104. Remote Servers104A,104B, and104C, shown inFIG.2, are additional instances of remote server104as shown inFIG.1.

PUBLIC CLOUD105is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and/or other computer capabilities, especially data storage (cloud storage) and computing power, without direct active management by the user. Cloud computing typically leverages sharing of resources to achieve coherence and economies of scale. The direct and active management of the computing resources of public cloud105is performed by the computer hardware and/or software of cloud orchestration module141. The computing resources provided by public cloud105are typically implemented by virtual computing environments that run on various computers making up the computers of host physical machine set142, which is the universe of physical computers in and/or available to public cloud105. The virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set143and/or containers from container set144. It is understood that these VCEs may be stored as images and may be transferred among and between the various physical machine hosts, either as images or after instantiation of the VCE. Cloud orchestration module141manages the transfer and storage of images, deploys new instantiations of VCEs, and manages active instantiations of VCE deployments. Gateway140is the collection of computer software, hardware, and firmware that allows public cloud105to communicate through WAN102.

Some further explanation of virtualized computing environments (VCEs) will now be provided. VCEs can be stored as “images.” A new active instance of the VCE can be instantiated from the image. Two familiar types of VCEs are virtual machines and containers. A container is a VCE that uses operating-system-level virtualization. This refers to an operating system feature in which the kernel allows the existence of multiple isolated user-space instances, called containers. These isolated user-space instances typically behave as real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can utilize all resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running inside a container can only use the contents of the container and devices assigned to the container, a feature which is known as containerization.

PRIVATE CLOUD106is similar to public cloud105, except that the computing resources are only available for use by a single enterprise. While private cloud106is depicted as being in communication with WAN102, in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community, or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloud105and private cloud106are both part of a larger hybrid cloud.

Referring toFIG.2, an exemplary application environment is depicted, according to at least one embodiment.FIG.2may include client computing device101and a remote server104interconnected via a communication network102. Additionally,FIG.2may include remote servers104A,104B, and104C. Remote server104A may comprise reliable input stream250. Remote server104B may comprise stream processor252and persistent “graveyard” queue256. Remote server104C may comprise an unreliable non-streaming target system254, also referred to as “external sink”. According to at least one implementation,FIG.2may include a plurality of client computing devices101, of which only one is shown for illustrative brevity, and remote servers104, of which only104,104A,104B, and104C, are shown for illustrative brevity. It may be appreciated thatFIG.2provides only an illustration of one implementation and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environments may be made based on design and implementation requirements.

Client computing device101may include a processor110and a data storage device124that is enabled to host and run a data sink stream reliability routing program200and communicate with the remote server104via the communication network102, in accordance with one embodiment of the invention.

The remote server computer104may be a laptop computer, netbook computer, personal computer (PC), a desktop computer, or any programmable electronic device or any network of programmable electronic devices capable of hosting and running a data sink stream reliability routing program200and a database130and communicating with the client computing device101via the communication network102, in accordance with embodiments of the invention. The remote server104may also operate in a cloud computing service model, such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS). The remote server104may also be located in a cloud computing deployment model, such as a private cloud, community cloud, public cloud, or hybrid cloud.

The database130may be a digital repository capable of data storage and data retrieval. The database130can be present in the remote server104and/or any other location in the network102.

Reliable input stream250may be any streaming data source capable of continuously sending data502to stream processor252. The reliable input stream250can comprise data502, as depicted inFIG.5.

Stream processor252can comprise multiple daisy-chained sink nodes, such as source node504, transform node506, primary sink node508, fallback sink1510, fallback sink2514, and fallback sink N518, as depicted inFIG.5. In some embodiments, the stream processor252may not comprise a transform node506, for example when the incoming data502is already in a correct format and thus, the stream processor252does not need to perform any transformations on the data502. The number of fallback sink nodes in a stream processor252can be determined by the unreliability of the unreliable non-streaming target system254and the unreliability of the network102, such that the daisy chain may be extended to run as many fallback sinks as necessary to cover the bulk of occurring failure cases. For example, the more unreliable a non-streaming target system254, the greater the number of fallback sink nodes comprised within the daisy chain of sink nodes. A fallback sink, such as510,514, and518, may comprise a reliable delay queue, such as512,516, and520, respectively. A reliable delay queue, such as512,516, and520, may comprise failed data522, i.e., data502which has failed at a previous sink node. Upon the failure of data502in a fallback sink node, such as508, the data502can be sent to a subsequent fallback sink in the daisy chain of sink nodes, such as510. The Stream processor252can be implemented using an external queue, such as Apache Kafka®. The stream processor252can continuously receive and process data502as it is received in batches from the reliable input stream250.

Unreliable non-streaming target system254may be an output, such as an external data sink, that is capable of receiving processed data through the stream processor252from the reliable input stream250.

The persistent graveyard queue256can comprise records of data524that have failed to be submitted to the unreliable non-streaming target system254at all fallback steps, for example, data that failed to be submitted to the unreliable non-streaming target system254from fallback sinks510,514, and518, as depicted inFIG.5. Upon the failure of failed data522at the last fallback sink in the daisy chain of sink nodes, for example, fallback sink n518, the failed data522can be sent to the persistent graveyard queue256.

According to the present embodiment, the data sink stream reliability routing code200, “the program”, may be a program capable of continuously reading data entering a stream processor via a reliable input stream, outputting processed data to an unreliable non-streaming target system via the stream processor, invoking, upon the completion of the outputting of a batch of data to the unreliable non-streaming target system, an asynchronous callback function, and passing, via a primary sink node, a list of failed record IDs of the batch to a first fallback sink within the daisy chain of sink nodes, while continuing to submit new batches of records to the non-streaming target system via the primary sink node. The program200may be located on client computing device101or remote server104or on any other device located within network102. Furthermore, the program200may be distributed in its operation over multiple devices, such as client computing device101and remote server104. The data sink stream reliability routing method is explained in further detail below with respect toFIG.3.

FIG.3is an operational flowchart illustrating a data sink stream reliability routing process according to at least one embodiment. At302, the program200continuously reads data502entering a stream processor252via a reliable input stream250. Data502can be sent to the stream processor252via the reliable input stream250. The stream processor252can collect and process the received data as it is received from the reliable input stream250. The first node in the daisy chain can be the primary sink node508. The subsequent nodes in the daisy chain can be the fallback sink nodes, such as510,514, and518, as depicted inFIG.5. The last fallback sink node in the daisy chain can be referred to as fallback sink node N518.

At304, the program200outputs processed data to an unreliable non-streaming target system254using the stream processor252. The primary sink node508in the stream processor252can submit records to the external unreliable non-streaming target system254in batches. A batch of data may comprise one or more records. The primary sink node508can commit the end offset of an entire batch of data to the unreliable non-streaming target system254, regardless of any occurring data failures.

At306, the program200invokes, upon the completion of the outputting of each batch of processed data to the unreliable non-streaming target system254, an asynchronous callback function. The asynchronous callback function can list the successful record IDs and failed record IDs of a batch of data. Specifically, the program200can invoke an asynchronous callback function on the primary sink node508with a list of successful and failed records IDs as a parameter. The callback function can inspect the parameter list for the failed record IDs.

At308, the program200passes, using a primary sink node, a list of failed record IDs of the batch to a first fallback sink510within the daisy chain of sink nodes, while concurrently continuing to submit new batches of records to the unreliable non-streaming target system254using the primary sink node508. Upon finding one or more failed record IDs, the callback function can collect the failed record IDs in a new list. The program200can pass the list of failed record IDs to the subsequent fallback sink node within the daisy chain of sink nodes comprised within the stream processor252via the callback function. For example, the primary sink node's508callback function may receive the following list of record IDs:(r1:s, r2:s, r3:f, r4:f, r5:s, r6:s, r7:f)

The callback function can collect the failed record IDs, r3, r4, and r7, from the list of record IDs, put them into a new list, and pass the new list to the next fallback sink within the daisy chain of sink nodes. Concurrently, the program200can continue to submit new batches of records to the unreliable non-streaming target system254via the primary sink node508. The stream processor252can continuously receive and process data502as it is received in batches from the reliable input stream250.

FIG.4is an operational flowchart illustrating a fallback sink node routing process according to at least one embodiment. At402, upon the expiration of the failed records522in a delay queue512of the first fallback sink510within the daisy chain of sink nodes, the program200submits the failed records522to the unreliable non-streaming target system254. Upon arrival at the first fallback sink510, the failed records522can be placed in the reliable delay queue512in the fallback sink and can remain there until the records expire. Each fallback sink node within the fallback daisy chain can incorporate a reliable delay queue. The reliable delay queue can have an exponentially increasing delay per queue sink, such that the end-to-end fallback chain implements an exponential backoff scheme, for example, 100 ms, 200 ms, 400 ms, 800 ms, etc. In some embodiments, the reliable delay queue may have a constant increasing delay per queue sink, a linearly increasing delay per queue sink, among other increasing delay schemes per queue sink. Upon expiration of the failed records in a reliable delay queue, the program200submits them in a batch to the unreliable non-streaming target system254. A fallback sink's batch record submissions may comprise contiguous or non-contiguous records, as the amount and order of records to be retried for submission to the unreliable non-streaming target system254depends on the failure(s) encountered at the previous submission step. A fallback sink may submit a single record as a batch submission or a group of records that comprises a collection of those batches of data that have failed submission from the previous submission step(s). Additionally, the number of sink nodes with reliable delay queues, the size in bytes of the reliable delay queue per fallback sink, and the retry time intervals at each sink step, can be determined by the unreliability of the unreliable non-streaming target system254and the unreliability of the network102.

At404, the program200determines whether any of the failed records522sent to the unreliable non-streaming target system254failed again. According to one implementation, in response to determining that one or more of the failed records522failed again (step404, “YES” branch), the program200may continue to Step406to determine whether any subsequent fallback nodes are remaining within the daisy chain of sink nodes. Once the unreliable non-streaming target system254completes processing the batch of failed data522, the program200can invoke an asynchronous callback function on the respective fallback sink within the daisy chain of sink nodes that submitted the failed records522, for example, the first fallback sink510, with a list of successful and failed records IDs as a parameter. The callback function can inspect the parameter list for failed record IDs to determine if any of the failed records failed again at the current fallback sink node. In response to determining that no failed records522failed again, i.e., all records522were successfully submitted to the unreliable non-streaming target system254(step404, “NO” branch), the program200may terminate.

At406, the program200determines whether any subsequent fallback nodes are remaining within the daisy chain of sink nodes. According to one implementation, in response to determining that subsequent fallback nodes are remaining within the daisy chain of sink nodes (step406, “YES” branch), the program200may continue to Step408to pass the failed records522to the next fallback sink node within the daisy chain of sink nodes. The program200may determine that subsequent fallback nodes are remaining within the daisy chain of sink nodes based on the fallback queue length, i.e., the number of fallback sink nodes within the daisy chain of sink nodes. If the fallback queue length is longer than the current fallback sink node, i.e., the current fallback sink node is not the last fallback sink node within the daisy chain of sink nodes, the program200may determine that subsequent fallback sink nodes are remaining within the daisy chain of sink nodes. In response to determining that no subsequent fallback sink nodes are remaining within the daisy chain of sink nodes (step406, “NO” branch), the program200may continue to step412to write the failed records to a persistent graveyard queue256.

At408, the program200passes the failed records522to the subsequent fallback sink node within the daisy chain of sink nodes. Upon one or more failed record IDs being found by the callback function during step404, the callback function can collect the failed record IDs in a new list. The callback function can pass the new list of failed record IDs to the subsequent fallback sink node within the daisy chain of sink nodes. The program200can concurrently continue to submit expired previously failed records522to the unreliable non-streaming target system254.

At410, upon expiration of the failed records522in a delay queue within the current fallback sink, the program200submits the failed records522to the unreliable non-streaming target system254. The program200can submit the failed records522to the unreliable non-streaming target system254in the same manner as in step402, except that the program200submits the failed records522from the fallback sink within the daisy chain of sink nodes that the failed records were passed to in step408, instead of the failed records522from within the first fallback sink510.

At412, the program200writes the failed records522to a persistent graveyard queue256. When the last fallback node, such as fallback sink N518as depicted inFIG.5, within the daisy chain of fallback sink nodes encounters a failed record522, the fallback node can write it to a persistent graveyard queue256. Any record522that fails to be submitted to the unreliable non-streaming target system254at all fallback steps, can be written, data524as depicted inFIG.5, in the persistent graveyard queue256, for manual troubleshooting of the problem entries. The persistent graveyard queue256can be capable of being manually reviewed. The failed records524can be stored in the persistent graveyard queue256for an indefinite period, thus, ensuring that no record524will ultimately be lost.

Referring now toFIG.5, a system diagram illustrating an exemplary program environment500of an implementation of a data sink stream reliability routing process300is depicted according to at least one embodiment. Here, the environment500comprises a reliable input stream250, a stream processor252, an unreliable non-streaming target system254, and a persistent graveyard queue256. The reliable input stream250may comprise one or more batches of data502. The stream processor may comprise a source node504, a transform node506, primary sink node508, fallback sink1510, fallback sink2, and fallback sink “N”518. Fallback sink1510may comprise a reliable delay queue512and failed data522. Fallback sink2514may comprise a reliable delay queue516and failed data522. Fallback sink N518may comprise a reliable delay queue520and failed data522. The exemplary program environment500details the interactions between the reliable stream input250and the source node504, the source node504and the transform node506, the primary sink node508and the unreliable non-streaming target system254upon recognition of successful batch(-es) of data502, the primary sink node508and the fallback sink1510upon recognition of the failure of batch(-es) of data502. Additionally, the exemplary program environment500details the interactions between the fallback sink1510and the unreliable non-streaming target system254upon successful transfer of batch(-es) of failed data522, the fallback sink1510and the fallback sink2514upon the failure of data522being sent to the unreliable non-streaming target system254, the fallback sink2514and the unreliable non-streaming target system254successful transfer of batch(-es) of failed data522, and the fallback sink2514and the fallback sink N518upon the failure of data522being sent to the unreliable non-streaming target system254. Furthermore, the exemplary program environment500details the interactions between the fallback sink N518and the unreliable non-streaming target system254upon successful transfer of batch(-es) of failed data522, and the fallback sink N518and the persistent graveyard queue256upon the failure of data522being sent to the unreliable non-streaming target system254at all fallback steps. The persistent graveyard queue256may comprise one or more batches of data524that failed to be submitted at all fallback steps in the daisy chain of sink nodes.

It may be appreciated thatFIGS.2through5provide only an illustration of one implementation and do not imply any limitations with regard to how different embodiments may be implemented. Many modifications to the depicted environments may be made based on design and implementation requirements.

The descriptions of the various embodiments of the present invention have been presented for purposes of illustration but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.