Distributed Online Optimization over a Heterogeneous Network