1. A system comprising: an interface module to permit a sequence of operations to be specified by a user; an optimizer module to implement each operation in a selected execution environment and to convert each operation into code executable therein; a module to determine an execution environment from a plurality of candidate execution environments in which to implement each operation such that selection of the execution environment is based at least partially on a metric associated therewith, wherein the metric associated with the execution environment is at least partially based on resources consumed by each operation when implemented in the execution environment and resources consumed when the sequence of operations is coordinated across different execution environments; wherein the selected execution environment is represented by a node of a hierarchical tree, the tree including a plurality of nodes representing candidate execution environments that are candidates for executing each operation; and a coordination module to ensure the operations execute in the sequence specified by the optimizer module when some operations are implemented in execution environments different than other operations in the sequence.