Control and Optimization over Large-Scale Networks