Optimality In Distributed Control From Convex Programming To Reinforcement Learning