Closed-loop real-time control on distributed networks