A distributed cloud-based wide-area controller with SDN-enabled delay optimization