Detecting disallowed combinations of data within a processing element

Techniques are described for detecting disallowed combinations of data within a processing element. Embodiments of the invention may generally receive data to be processed using the processing element and determine whether the received data and a current working state violate one or more rules describing disallowed combinations of data. If a disallowed combination is detected, embodiments of the invention may handle the processing of the received data in an alternate way that prevents disallowed combinations of data within the processing element.

BACKGROUND

While computer databases have become extremely sophisticated, the computing demands placed on database systems have also increased at a rapid pace. Database systems are typically configured to separate the process of storing data from accessing, manipulating, or using data stored in the database. More specifically, databases use a model where data is first stored, then indexed, and then queried. However, this model cannot meet the performance requirements of some real-time applications. For example, the rate at which a database system can receive and store incoming data can limit how much data can be processed or otherwise evaluated. This, in turn, can limit the ability of database applications to process large amounts of data in real-time.

SUMMARY

Embodiments of the invention provide a method and system for detecting disallowed combinations of data within a first processing element. The method and system include receiving data to be processed. The method and system further include identifying one or more rules describing predetermined combinations of data within the first processing element. Additionally, the method and system include determining a current working state of the first processing element, wherein the current working state comprises other data being processed on the first processing element and other data accessible by the first processing element. The method and system also include determining whether the received data and the determined current working state violate any of the one or more rules, by operation of one or more computer processors.

A second embodiment of the invention provides a computer program product for detecting disallowed combinations of data within a first processing element. The computer program product includes receiving data to be processed. The computer program product further includes identifying one or more rules describing predetermined combinations of data within the first processing element. Additionally, the computer program product includes determining a current working state of the first processing element, wherein the current working state comprises other data being processed on the first processing element and other data accessible by the first processing element. The computer program product also includes determining whether the received data and the determined current working state violate any of the one or more rules, by operation of one or more computer processors. In addition, the computer program product includes, upon determining the received data and the determined current working state do not violate any of the one or more rules, processing the received data on the first processing element.

DETAILED DESCRIPTION

Stream-based computing and stream-based database computing are emerging as a developing technology for database systems. Products are available which allow users to create applications that process and query streaming data before it reaches a database file. With this emerging technology, users can specify processing logic to apply to inbound data records while they are “in flight,” with the results available in a very short amount of time, and often in milliseconds. Constructing an application using this type of processing has opened up a new programming paradigm that will allow for a broad variety of innovative applications, systems, and processes to be developed, as well as present new challenges for application programmers and database developers.

In a stream application, operators are connected to one another such that data flows from one processing element to the next (e.g. over a TCP/IP socket). Scalability is reached by distributing an application across nodes by creating many small executable pieces of code (operators), as well as replicating processing elements on multiple nodes and load balancing among them. Processing elements (and operators) in a stream application can be fused together to form a larger processing element. Doing so allows processing elements to share a common process space, resulting in much faster communication between operators than is available using inter-process communication techniques (e.g., using a TCP/IP socket). Further, processing elements can be inserted or removed dynamically from an operator graph representing the flow of data through the stream application, as well as fused or un-fused from a stream application during runtime.

One advantage to stream applications is that they allow the user to granularly control the process flow of data through the application. In other words, the user may designate specific operators for each processing element that perform various operations on the incoming data, and may dynamically alter the stream application by modifying the operators and the order in which they are performed. Additionally, stream applications are able to handle large volumes of data while limiting any “bottlenecks” in the processing.

However, because stream applications often deal with large volumes of data, the processing of which is spread over multiple processing elements across multiple compute nodes, this presents additional challenges for application programmers and database developers. One such challenge is preventing disallowed combinations of data from being processed using the same processing element, which may lead to improper decision making, or the appearance of impropriety. As an example, a stream application may wish to prevent a particular genetic marker for a patient from being considered in analysis of eligibility for a transplant operation. Additionally, beyond simply preventing the genetic marker from being considered in the eligibility analysis, the stream application developers may wish to prevent the decision-making component (e.g., a processing element) from even having access to the patient's genetic marker data, in order to prevent even the appearance of improper decision making.

As a second example, a disallowed combination of data for a company that performs automated stock trading may be any combination of data that may result in (or be construed as) insider trading information. Such a combination may occur between, for instance, a received set of data and other data currently accessible by the processing element. Additionally, a disallowed combination may occur between values within the received set of data itself. Furthermore, in an embodiment of the invention configured to prevent any appearance of impropriety, a disallowed combination may occur between a received set of data and other data that was recently processed by the processing element, even if the other data is no longer accessible to the processing element. As such, embodiments of the invention may be configured to prevent any improper calculations that may result in insider trading (or the appearance of inside trading), by preventing combinations of data from appearing on a processing element at the same time.

Embodiments of the invention provide techniques for identifying disallowed combinations of data on a processing element, and processing received data on the processing element only after determining that such processing would not result in a disallowed combination of data. In particular, embodiments of the invention may access rules describing disallowed combinations of data for the processing element. Additionally, embodiments of the invention may determine a current working state of a first processing element. Upon determining that a combination of the current working state and a received data element does not violate any of the one or more rules, embodiments of the invention may process the received data element on the first processing element.

Typically, cloud computing resources are provided to a user on a pay-per-use basis, where users are charged only for the computing resources actually used (e.g. an amount of storage space consumed by a user or a number of virtualized systems instantiated by the user). A user can access any of the resources that reside in the cloud at any time, and from anywhere across the Internet. In context of the present invention, a user may access applications or related data available in the cloud. For example, the nodes used to create a stream application may be virtual machines hosted by a cloud service provider. Doing so allows a user to access this information from any computing system attached to a network connected to the cloud (e.g., the Internet).

FIGS. 1A-1Billustrate a computing infrastructure100configured to execute a stream application, according to one embodiment of the invention. As shown, the computing infrastructure100includes a management system105and a plurality of compute nodes1301-4, each connected to a communications network120. Also, the management system105includes an operator graph132and a stream manager134. As described in greater detail below, the operator graph132represents a stream application beginning from one or more source processing elements (PEs) through to one or more sink PEs. This flow from source to sink is also generally referred to herein as an execution path. Generally, data elements flow into a source PE of a stream application and are processed by that PE. Typically, processing elements receive an N-tuple of data elements from the stream as well as emit an N-tuple of data elements into the stream (except for a sink PE where the stream terminates). Of course, the N-tuple received by a processing element need not be the same N-tuple sent downstream. Additionally, the processing elements could be configured to receive or emit data in formats other than an N-tuple (e.g., the processing elements could exchange data marked up as XML documents). Furthermore, each processing element may be configured to carry out any form of data processing functions on the received tuple, including, for example, writing to database tables or performing other database operations such as data joins, splits, reads, etc., as well as performing other data analytic functions or operations.

The stream manager134may be configured to monitor a stream application running on the compute nodes1301-4, as well as to change the structure of the operator graph134. For example, the stream manager134may move processing elements (PEs) from one compute node130to another, for example, to manage the processing loads of the compute nodes130in the computing infrastructure100. Further, stream manager134may control the stream application by inserting, removing, fusing, un-fusing, or otherwise modifying the processing elements (or what data-tuples flow to the processing elements) running on the compute nodes1301-4. In one embodiment of the invention, the management system105may maintain multiple operator graphs132. In such an embodiment, one operator graph132designated as primary operator graph, which represents the general or default processing flow, and the other operator graphs may represent alternate processing flows.

FIG. 1Billustrates an example operator graph that includes ten processing elements (labeled as PE1-PE10) running on the compute nodes1301-4. While a processing element may be executed as an independently running process with its own process ID (PID) and memory space, multiple processing elements may also be fused to run as single process (with a PID and memory space). In cases where two (or more) processing elements are running independently, inter-process communication may occur using a network socket (e.g., a TCP/IP socket). However, when processes are fused together, the fused processing elements can use more rapid communication techniques for passing N-tuples (or other data) among processing elements (and operators in each processing element).

As shown, the operator graph begins at a source135(that flows into the processing element labeled PE1) and ends at sink1401-2(that flows from the processing elements labeled as PE6and PE10). Compute node1301includes the processing elements PE1, PE2and PE3. Source135flows into the processing element PE1, which in turn emits tuples that are received by PE2and PE3. For example, PE1may split data elements received in a tuple and pass some data elements to PE2, while passing other data elements to PE3. Data that flows to PE2is processed by the operators contained in PE2, and the resulting tuples are then emitted to PE4on compute node1302. Likewise, the data tuples emitted by PE4flow to sink PE61401. Similarly, data tuples flowing from PE3to PE5also reach sink PE61401. Thus, in addition to being a sink for this example operator graph, PE6could be configured to perform a join operation, combining tuples received from PE4and PE5. This example operator graph also shows data tuples flowing from PE3to PE7on compute node1303, which itself shows data tuples flowing to PE8and looping back to PE7. Data tuples emitted from PE8flow to PE9on compute node1304, which in turn emits tuples to be processed by sink PE101402.

Furthermore, although embodiments of the present invention are described within the context of a stream application, this is not the only context relevant to the present disclosure. Instead, such a description is without limitation and is for illustrative purposes only. Of course, one of ordinary skill in the art will recognize that embodiments of the present invention may be configured to operate with any computer system or application capable of performing the functions described herein. For example, embodiments of the invention may be configured to operate in a clustered environment with a standard database processing application.

FIG. 2is a more detailed view of the compute node130ofFIGS. 1A-1B, according to one embodiment of the invention. As shown, the compute node130includes, without limitation, a central processing unit (CPU)205, a network interface215, an interconnect220, a memory225, and storage230. The compute node130may also include an I/O devices interface210used to connect I/O devices212(e.g., keyboard, display and mouse devices) to the compute node130.

The CPU205retrieves and executes programming instructions stored in the memory225. Similarly, the CPU205stores and retrieves application data residing in the memory225. The interconnect220is used to transmit programming instructions and application data between the CPU205, I/O devices interface210, storage230, network interface215, and memory225. CPU205is included to be representative of a single CPU, multiple CPUs, a single CPU having multiple processing cores, and the like. And the memory225is generally included to be representative of a random access memory. Storage230, such as a hard disk drive, solid state device (SSD), or flash memory storage drive, may store non-volatile data.

In this example, the memory225includes a plurality of processing elements (PE)235, a disallowed combinations (FC) component245, a plurality of FC rules250, and stream connection data255. Each PE235includes a collection of operators240. As noted above, each operator240may provide a small chunk of executable code configured to process data flowing into a processing element (e.g., PE235) and to emit data to other operators240in that PE and to other PEs in the stream application. Such PEs may be on the same compute node130or on other compute nodes accessible over the data communications network120. The stream connection data255represents the connections between PEs on compute node130(e.g., a TCP/IP socket connection between two separate PEs235), as well as connections to other compute nodes130with upstream and or downstream PEs in the stream application, also via TCP/IP sockets (or other inter-process data communication mechanisms).

As shown, storage230contains buffered stream data260. The buffered stream data260represents a storage space for data flowing into the compute node105from upstream processing elements (or from a data source for the stream application). For example, buffered stream data260may include data tuples waiting to be processed by one of the PEs235. Buffered stream data260may also store the results of data processing performed by PEs235that will be sent to downstream processing elements.

The FC component245may receive incoming tuples of a data stream to be processed on one of the PEs235. The received tuples may be received from a source135, or alternatively may be the output of another PE in the system100. Upon receiving the tuple, the FC component245may determine a current working state of the PE235designated as the PE235to process the received tuple. Generally, as used herein, the working state of a PE235refers to all data accessible to a PE235during a period of time. For instance, the current working state of a PE235may include data currently being processed by the PE235(e.g., data included in another tuple received by the PE235), as well as all data currently accessible by the PE235(e.g., stored in a database accessible by the PE235). Additionally, the current working state may further include the information in the received tuple itself.

Additionally, in one embodiment of the invention, the current working state of a PE235may include data that was recently accessible to the PE235. For example, in such an embodiment of the invention, the working state may include data that was received in the previous tuple, even though such data has already been processed by the PE235and is no longer accessible to the PE235. Furthermore, in such an embodiment, a threshold time may be specified that indicates how recently data must have been accessible to the PE235to be included in the current working state.

Once the current working state is determined, the FC component245may then use the FC rules250to determine whether processing the received tuple on the specified PE235will result in a disallowed combination of data. For example, if a combination of the received tuple of data and the current working state of the PE235violates at least one of the FC rules250, the FC component245may determine that the processing of the tuple would result in a disallowed combination. Accordingly, the FC component245may take actions to prevent the disallowed combination. Such actions may include delaying the processing of the received tuple on the PE235, sending the received tuple to another PE235to be processed according to an alternate execution plan, or simply discarding the received tuple. If instead the FC component245determines that none of the FC rules250are violated, the FC component245may send the received tuple to the appropriate PE235to be processed. As such, embodiments of the invention may prevent improper usage of data on a given processing element. Furthermore, embodiments may also prevent the appearance of any impropriety resulting from resulting from a disallowed combination of data being accessible on a given processing element

FIG. 3is a more detailed view of the server computing system105ofFIG. 1, according to one embodiment of the invention. As shown, server computing system105includes, without limitation, a central processing unit (CPU)305, a network interface315, an interconnect320, a memory325, and storage330. The client system130may also include an I/O device interface310connecting I/O devices312(e.g., keyboard, display and mouse devices) to the server computing system105.

Like CPU205ofFIG. 2, CPU305is configured to retrieve and execute programming instructions stored in the memory325and storage330. Similarly, the CPU305is configured to store and retrieve application data residing in the memory325and storage330. The interconnect320is configured to move data, such as programming instructions and application data, between the CPU305, I/O devices interface310, storage unit330, network interface305, and memory325. Like CPU205, CPU305is included to be representative of a single CPU, multiple CPUs, a single CPU having multiple processing cores, and the like. Memory325is generally included to be representative of a random access memory. The network interface315is configured to transmit data via the communications network120. Although shown as a single unit, the storage330may be a combination of fixed and/or removable storage devices, such as fixed disc drives, removable memory cards, optical storage, SSD or flash memory devices, network attached storage (NAS), or connections to storage area-network (SAN) devices.

As shown, the memory325stores a stream manager132. Additionally, the storage330includes a primary operator graph335and an alternate operator graph340. The stream manager132may generally route tuples received as part of a data stream to PEs235to be processed, according to the primary operator graph335. As discussed above, in one embodiment of the invention, if the FC component245determines the combination of a received tuple and a current working state violates at least one of the FC rules250, the FC component245may then route the given tuple to a second PE235, according to an alternate execution path. In such a scenario, the alternate execution path may be specified by the alternate operator graph240. Furthermore, in one embodiment of the invention, the EPT component245is further configured to notify the stream manager132to route all subsequently-received tuples received for the data stream to PEs235according the alternate operator graph340.

FIG. 4illustrates an example of compute nodes in a stream application, according to one embodiment of the invention. As shown, compute node1302includes three processing elements2352,2353and2354(labeled PE1-PE3). In the depicted example, processing element2352receives an N-tuple data stream and emits an N-tuple to processing elements2353and2354(labeled PE2and PE3, respectively) on compute node1303. Processing elements PE2and PE3, in turn, emit N-tuples to processing element2355on compute node1303. In this example, the PE135(labeled PE1), receives a tuple which includes attributes <name, department, salary, gender>. PE1takes this N-tuple and generates one set of tuples sent to PE2and another set of tuples sent to PE3, based on the gender value in a tuple received by PE1. In turn, PE2and PE3perform a database write for each tuple received from PE1and generate a tuple of attributes <name, department, salary> sent to PE4. Once received, PE4accesses a third-party web service and generates a tuple sent further downstream in the stream application.

Continuing the example, the depicted stream application may be an automated salary application that automates the processing of bonuses for all employees of a business. However, assume that because of a public outcry about executive compensation, a business wishes to manually process the bonuses for all employees from the department “EXECUTIVE” and whose salary is over $200,000. Thus, the stream application developers may create an FC rule250that specifies a disallowed combination of data on PE1where the “DEPT.” attribute contains a value of “EXECUTIVE” and the “SALARY” attribute contains a value greater than “200000.” If the FC component245then receives a tuple containing values <Jane Doe, EXECUTIVE, 300000, F>, the FC component245may determine that the processing of this tuple on PE1would violate the aforementioned FC rule250.

Upon determining that the processing of the tuple would violate at least one of the FC rules250, embodiments of the invention may prevent the processing of the received tuple using the processing element. Instead, the FC component245may redirect the received tuple to be processed using an alternate execution path (e.g., using another PE235). In yet another embodiment, the received tuple may be simply discarded and not processed. For example, if the stream application developers know that executive bonuses are processed manually and separate from the other employees, the FC component245may be configured to discard all tuples which, if processed, would violate the FC rule250specifying the “DEPT.” attribute contains a value of “EXECUTIVE” and the “SALARY” attribute contains a value greater than “200000.”

By preventing the processing of the received tuple on the processing element when a disallowed combination of data is detected, embodiments of the invention may prevent a situation where disallowed combinations of data are used for improper means. As another example, embodiments of the invention may be used to prevent a patient's genetic indicator for a certain condition from being used in determining whether the patent qualifies for an organ transplant. Furthermore, embodiments of the invention may not only prevent the actual usage of the indicator (i.e., actual impropriety), but may also prevent the appearance of any impropriety. That is, even if the data on the patient's genetic indicator is not used in the determination of whether the patient qualifies for an organ transplant, the business may wish for the genetic indicator data to not even be available to the processing element making the qualification decision. By ensuring that the processing element cannot access the genetic indicator data, embodiments of the invention ensure that even the appearance of any improper decision making is prevented.

FIG. 5is a flow diagram illustrating a method500of preventing disallowed combinations of data on a processing element235, according to one embodiment of the invention. As shown, the method500begins at step520, where the FC component245receives a tuple of data to process using a specified processing element235. Upon receiving the tuple of data, the FC component245identifies any related FC rules250identifying disallowed combinations of data for the specified processing element235(step522). Once the FC component245identifies any relevant FC rules250, the FC component245determines a current working state of the specified processing element235(step524).

The FC component245then determines whether processing the received tuple of data using the PE235would result in a disallowed combination of data (step526). If the FC component245determines the processing would not result in a disallowed combination, the FC component245sends the received tuple to the specified processing element235to be processed (step528). If, however, the FC component245determines the processing would result in a disallowed combination of data on the processing element235, the FC component245discards the received tuple (step530). Once the tuple is discarded, the FC component245then logs information about the discarded tuple (step532). Once the tuple is discarded and the information about the tuple is logged, or alternatively once the received tuple is processed using the processing element, the method500ends.

As discussed above, rather than discarding the received tuple, the FC component245may handle the received tuple in other ways. For example, in one embodiment of the invention, the FC component245may replace values in the received tuple with a placeholder value, and then send the modified tuple on to the processing element to be processed. For example, assume that a business wishes to prevent a processing element from considering (or being able to consider) a patient's genetic indicator for a particular trait in determining whether the patient qualifies for an organ transplant. As such, when a tuple is received containing patient data, the FC component245may replace any attributes in the tuple describing the genetic indicator with a placeholder value, indicating that a substitution was made. Once the indicator data is replaced with placeholder values, the FC component245may determine an updated working state of the processing element, and then determine whether the modified tuple and the updated working state violate any of the FC rules250. If the FC component245determines that none of the rules are violated, the FC component245may send the modified tuple to the processing element for processing.

In another embodiment of the invention, rather than discarding the received tuple, the FC component245may instead send the received tuple to another processing element to be processed, according to an alternate execution path. For instance, following the example discussed above, assume that because of a public outcry about executive compensation, a business wishes to manually process the bonuses for all employees from the department “EXECUTIVE” and whose salary is over $200,000. In such a case, the business may create a FC rule250, preventing an automated payroll program running on a processing element from processing the employee data where the “DEPT.” attribute has the value “EXECUTIVE” and the “SALARY” attribute has a value over $200,000. If the FC component245then determines that a received tuple of data violates the aforementioned FC rule250, the FC component245may prevent the tuple from being processed on the processing element, and may instead redirect the tuple to another processing element according to an alternate execution path. Thus, in the example, the FC component245may send the received tuple to a processing element designated specifically for processing executive salaries.

In yet another embodiment of the invention, rather than discarding the received tuple, the FC component245may send the received tuple to the processing element for processing, but may restrict what actions the processing element may take. Thus, for example, assume the processing element normally executes two operations on incoming tuples: a first operation that accesses a database and a second operation that accesses a third party service. Furthermore, assume that the received tuple and the first operation that accesses the database would create a forbidden combination. Thus, in this example, the FC component245may send the received tuple to the processing element, but may restrict the processing element to only execute the second operation when processing the tuple. In this way, the FC component245can avoid interrupting the normal operational flow of the stream application, while still preventing forbidden combinations of data within a processing element.

FIG. 6is a flow diagram illustrating a method of preventing disallowed combinations of data on a processing element, according to one embodiment of the invention. As shown, the method600begins at step620, where the FC component245determines that a disallowed combination would occur if the specified processing element were to process the received tuple of data. For example, the FC component245may make such a determination at step526of the previous method500. Upon detecting that a disallowed combination would occur if the received tuple is processed, the FC component245delays the processing of the received tuple on the processing element (step622). In one embodiment of the invention, the amount of time that the processing is delayed is a predetermined fixed amount of time. In another embodiment of the invention, the FC component245calculates the amount of time based on any number of factors. Exemplary factors that the FC component245may consider include, without limitation, which FC rule250was violated to trigger the disallowed combination, the values contained in the received tuple, metadata collected about the received tuple, as well as various external factors (e.g., the time of day, the rate at which tuples are received, etc.).

Once the FC component245delays the processing of the received tuple, the FC component245then determines an updated working state of the specified processing element (step624). Additionally, in the depicted embodiment, the FC component245determines whether a disallowed combination will occur if the received tuple is processed on the specified processing element (step626). The FC component245may base the decision on whether a combination of the received tuple and the updated working state of the specified processing element would violate any of the FC rules250. If the FC component245determines this processing would result in a disallowed combination, the method begins again at step620, as the FC component245again has detected a disallowed combination of data. If, instead, the FC component245determines that the combination would not violate any of the FC rules250, the FC component245sends the received tuple to the specified processing element to be processed (step628). Once the processing element processes the received tuple, the method600ends.

Advantageously, the method600prevents disallowed combinations of data within a processing element, while avoiding redirecting (e.g., to another processing element specified by an alternate execution path) or discarding received tuples of data, the processing of which would violate at least one of the FC rules250. For example, assume that a processing element receives a first tuple of data and stores the values contained in the first tuple. Furthermore, assume that the processing element deletes stored values after some amount of time. If the processing element then receives a second tuple of data, and if the FC component245determines that the combination of the second tuple and the stored values would violate at least one of the FC rules250, the FC component245may delay the processing of the second tuple on the processing element until the stored values are deleted. As such, the FC component245avoids the disallowed combination of data on the processing element.

As described above, the FC component245may be configured to perform various actions when a potential disallowed combination is detected. In certain embodiments of the invention, these actions may be combined, so that multiple actions are performed when a potential disallowed combination is detected.FIG. 7is a flow diagram illustrating a method of preventing disallowed combinations of data on a processing element, according to one embodiment of the invention. As shown, the method700begins at step720, where the FC component245determines that a disallowed combination would occur if the specified processing element were to process the received tuple of data. For example, the FC component245may make such a determination at step526of the method500discussed above. Upon detecting that a disallowed combination would occur if the received tuple is processed, the FC component245determines whether an alternate execution path is available for processing the received tuple of data (step722). For example, the FC component245may query the stream manager132on the management system105to determine whether an alternate operator graph340is available to process the received tuple.

If the FC component245determines that an alternate execution path is available for processing the received tuple of data, the FC component245redirects the received tuple to the processing element specified in the alternate execution path to process the received tuple (step724). If, instead, the FC component245determines no alternate execution path is available, the FC component245delays the processing of the received tuple on the processing element (step726). As discussed above, the amount of time that the processing is delayed may be a predetermined amount of time, or may be a calculated amount of time.

Once the FC component245delays the processing of the received tuple, the FC component245determines an updated working state of the specified processing element (step728). The FC component245then determines whether a disallowed combination will occur if the received tuple is processed on the specified processing element (step730). The FC component245may base the decision on whether a combination of the received tuple and the updated working state of the specified processing element would violate any of the FC rules250. If the FC component245determines this processing would result in a disallowed combination, the method begins again at step620, as the FC component245again has detected a disallowed combination of data. If, instead, the FC component245determines that the combination would not violate any of the FC rules250, the FC component245sends the received tuple to the specified processing element to be processed (step628). Once the processing element processes the received tuple, the method600ends.