Joint operator replication and placement optimization for distributed streaming applications