Optimizing Distributed Computing Workflows in Heterogeneous Network Environments