1. A system for managing a template in an operator graph, comprising: one or more compute nodes, the compute node hosting a plurality of processing elements and supported by a plurality of virtual machines operating on one or more computer processors, the compute node configured to: processes attributes from a stream of tuples, and receive the template having a plurality of template elements operating on one or more computer processors onto the operator graph, 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 additional processing; a stream manager configured to: allocate the template onto the operator graph, the operator graph assigned to the plurality of processing elements, and calculate 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; and a virtualization manager configured to: calculate a resource availability of a virtual machine that supports the compute node wherein the resource availability is the amount of hardware available on a virtual machine, and map 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.