Toward Reliable and Scalable Internet-of-vehicles: Performance Analysis and Resource Management