Toward Reliable and Scalable Internet of Vehicles: Performance Analysis and Resource Management