Novel method for optimizing performance in resource constrained distributed data streams