Patent ID: 8898505

Claim:
A computer program product for establishing a stream application, the computer program product comprising: a computer-readable storage medium having computer-readable program code embodied therewith, the computer-readable program code configured to: generate a current optimization mode for the stream application based on (i) at least one of a number of constraints, a type of each constraint, and a number of a plurality of compute nodes and (ii) a set of at least one of pre-defined processing element selection criteria and at least one compute node selection criteria; select a processing element from a plurality of processing elements in the stream application based on at least one of the processing element selection criteria; determine, based on one or more of the constraints, a plurality of candidate compute nodes to which the processing element can be allocated from among the plurality of compute nodes; select, based on at least one of the compute node selection criteria, a compute node from the candidate compute nodes, wherein at least one of the processing element selection criteria and the compute node selection criteria is determined by the current optimization mode; and allocate the processing element to the selected compute node.