1. A system for optimizing component composition in a distributed stream-processing environment having a plurality of nodes capable of being associated with one or more of a plurality of stream processing components, the system comprising: an adaptive composition probing (ACP) module which probes a subset of the plurality of stream processing components to determine the optimal component composition in response to a stream processing request; and a hierarchical state manager which manages local and global information for use by said ACP module in determining the optimal component composition.