This disclosure generally relates to streaming applications, and more specifically relates to processing data tuples in streaming applications.
Streaming applications are known in the art, and typically include multiple operators coupled together in a flow graph that process streaming data in near real-time. An operator typically takes in streaming data in the form of data tuples, operates on the data tuples in some fashion, and outputs the processed data tuples to the next operator. Streaming applications are becoming more common due to the high performance that can be achieved from near real-time processing of streaming data.
Streaming applications can be used to analyze data at very high rates. In some streaming applications, the flow rate of data tuples between operators can be in the hundreds of thousands or even millions of data tuples per second. Because data tuples stream from one operator to another in a streaming application, a delay in processing data tuples in one operator can negatively impact the performance of the streaming application, because the one operator becomes a bottleneck that restricts the availability of its data tuples to downstream operators. Various ways have been developed to improve performance of a streaming application that has a bottleneck. For example, if an operator becomes a bottleneck, it is known to create one or more operators that can process the data tuples in parallel with the operator that is a bottleneck, thereby relieving the bottleneck. The known methods of improving performance of a streaming application that has a bottleneck require all data to be present in a data tuple before the data tuple can be forwarded to the next operator for processing.
A streams manager includes a missing data mechanism that allows operators to forward data tuples that have missing derived data to a next operator in a streaming application. One or more new threads are created to continue processing the missing derived data. Once the processing for the missing derived data is complete, the derived data is reunited with the data tuple. The data tuple with missing derived data can travel until it reaches an operator that requires the missing derived data. The data tuple is then placed in a waiting area for the operator. Once the missing derived data is added to the data tuple in the waiting area, the data tuple can be processed by the operator that required the derived data.
The foregoing and other features and advantages will be apparent from the following more particular description, as illustrated in the accompanying drawings.
The disclosure will be described in conjunction with the appended drawings, where like designations denote like elements, and:
The disclosure and claims herein are directed to a streams manager that includes a missing data mechanism that allows operators to forward data tuples that have missing derived data to a next operator in a streaming application. One or more new threads are created to continue processing the missing derived data. Once the processing for the missing derived data is complete, the derived data is reunited with the data tuple. The data tuple with missing derived data can travel until it reaches an operator that requires the missing derived data. The data tuple is then placed in a waiting area for the operator. Once the missing derived data is added to the data tuple in the waiting area, the data tuple can be processed by the operator that required the derived data.
Referring to
Main memory 120 preferably contains data 121, an operating system 122, and a streams manager 123. Data 121 represents any data that serves as input to or output from any program in computer system 100. Operating system 122 is a multitasking operating system, such as AIX or LINUX. The streams manager 123 is software that provides a run-time environment that executes a streaming application 124. The streaming application 124 preferably comprises a flow graph that includes processing elements that include operators 125 that process data tuples. The streams manager 123 preferably includes a performance monitor 126 that monitors performance of one or more of the operators 125 in the streaming application. Performance monitor 126 may also monitor performance of groups of operators and/or of the entire streaming application 124. The performance monitor 126 functions according to one or more defined time limits 127. Time limit(s) 127 may include time limits for one or more operators to process data tuples. In the most preferred implementation, there is a time limit defined for operators in the flow graph that are selected to have a time limit according to any suitable criteria. For example, operators in a critical path for the streaming application could have corresponding time limits defined. It is also within the scope of the disclosure and claims herein to define a time limit for all operators 125 in the streaming application 124. Time limits can be defined for any of the operators 125, and a default time limit could then be applied to all other operators 125 that don't have a defined time limit. These and other variations are within the scope of the disclosure and claims herein.
The missing data mechanism 128 detects when one of the time limits 127 is exceeded, and determines whether the data tuple can be sent to the next operator with missing derived data. The function of the missing data mechanism 128 is discussed in detail below. While the time limits 127 are shown in the performance monitor 126 in
Computer system 100 utilizes well known virtual addressing mechanisms that allow the programs of computer system 100 to behave as if they only have access to a large, contiguous address space instead of access to multiple, smaller storage entities such as main memory 120 and local mass storage device 155. Therefore, while data 121, operating system 122, and streams manager 123 are shown to reside in main memory 120, those skilled in the art will recognize that these items are not necessarily all completely contained in main memory 120 at the same time. It should also be noted that the term “memory” is used herein generically to refer to the entire virtual memory of computer system 100, and may include the virtual memory of other computer systems coupled to computer system 100.
Processor 110 may be constructed from one or more microprocessors and/or integrated circuits. Processor 110 executes program instructions stored in main memory 120. Main memory 120 stores programs and data that processor 110 may access. When computer system 100 starts up, processor 110 initially executes the program instructions that make up operating system 122. Processor 110 also executes the streams manager 123, which executes the streaming application 124, which includes the missing data mechanism 128.
Although computer system 100 is shown to contain only a single processor and a single system bus, those skilled in the art will appreciate that a missing data mechanism as described herein may be practiced using a computer system that has multiple processors and/or multiple buses. In addition, the interfaces that are used preferably each include separate, fully programmed microprocessors that are used to off-load compute-intensive processing from processor 110. However, those skilled in the art will appreciate that these functions may be performed using I/O adapters as well.
Display interface 140 is used to directly connect one or more displays 165 to computer system 100. These displays 165, which may be non-intelligent (i.e., dumb) terminals or fully programmable workstations, are used to provide system administrators and users the ability to communicate with computer system 100. Note, however, that while display interface 140 is provided to support communication with one or more displays 165, computer system 100 does not necessarily require a display 165, because all needed interaction with users and other processes may occur via network interface 150.
Network interface 150 is used to connect computer system 100 to other computer systems or workstations 175 via network 170. Computer systems 175 represent computer systems that are connected to the computer system 100 via the network interface 150 in a computer cluster. Network interface 150 broadly represents any suitable way to interconnect electronic devices, regardless of whether the network 170 comprises present-day analog and/or digital techniques or via some networking mechanism of the future. Network interface 150 preferably includes a combination of hardware and software that allows communicating on the network 170. Software in the network interface 150 preferably includes a communication manager that manages communication with other computer systems 175 via network 170 using a suitable network protocol. Many different network protocols can be used to implement a network. These protocols are specialized computer programs that allow computers to communicate across a network. TCP/IP (Transmission Control Protocol/Internet Protocol) is an example of a suitable network protocol that may be used by the communication manager within the network interface 150. In one suitable implementation, the network interface 150 is a physical Ethernet adapter.
The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
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.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
The missing data detection mechanism 220 preferably performs its functions when a time limit for processing a data tuple in an operator is exceeded. Any suitable time limit could be used. For example,
Referring to
Referring to
The missing data detection mechanism 220 in
A simple example is now provided to more specifically illustrate some of the concepts discussed generally above. Referring to
We now consider a part of the flow graph 800 in
We now assume the incomplete tuple T1{D1,D4} is input to operator C (step 610 and 620=YES,
Next, we assume the incomplete tuple T1{D1′,D4′} is input to operator D (step 610 and 620=YES,
In a second example shown in
In the examples shown in
The examples above are extremely simplified to illustrate the generate concepts herein. One skilled in the art will appreciate that many variations are possible within the scope of the disclosure and claims herein. For example, an incomplete tuple could be processed by many different operators that do not require any of the missing derived data. The waiting area for incomplete tuples could be within an operator or could be separate from an operator. In one particular implementation, the streams manager could define a waiting area for each operator in the flow graph separate from the operators. The mechanisms shown in the missing data mechanism 210 in
In the discussion herein, data tuples are sometimes referred to as data tuples, and at other times are referred to as tuples. These are deemed to be equivalent terms, as the tuples discussed herein are data tuples in a streaming application.
A streams manager includes a missing data mechanism that allows operators to forward data tuples that have missing derived data to a next operator in a streaming application. One or more new threads are created to continue processing the missing derived data. Once the processing for the missing derived data is complete, the derived data is reunited with the data tuple. The data tuple with missing derived data can travel until it reaches an operator that requires the missing derived data. The data tuple is then placed in a waiting area for the operator. Once the missing derived data is added to the data tuple in the waiting area, the data tuple can be processed by the operator that required the derived data.
One skilled in the art will appreciate that many variations are possible within the scope of the claims. Thus, while the disclosure is particularly shown and described above, it will be understood by those skilled in the art that these and other changes in form and details may be made therein without departing from the spirit and scope of the claims.