Resource Allocation in Smart Infrastructure: Case Studies in Video Delivery and Electric Power Networks