1. A method for managing a template on an operator graph, comprising: receiving the template for processing a stream of tuples, the template having a plurality of template elements operating on one or more computer processors, the operator graph having a plurality of processing elements operating on one or more computer processors that perform data processing on the stream of tuples using a first amount of hardware resources, the template performs additional processing on the stream of tuples in relation to the processing performed at the operator graph, and a template element from the plurality of template elements perform a portion of the additional processing; calculating a resource requirement of a template element from the template wherein the resource requirement is the amount of hardware resources needed to operate the template in addition to the first amount of hardware resources; calculating a resource availability of a virtual machine wherein the resource availability is the resource available on a virtual machine to host the template element; allocating the template onto the operator graph, the operator graph having a plurality of processing elements operating on one or more computer processors; mapping the template element from the template onto the virtual machine as a function of the resource requirement of the template element and the resource availability of the virtual machine.