Calculation of kart race results

background: the SDK of the hardware can obtain the time stamp and identification of the vehicle passing through a specific location.
current practice: SDK stores the data in mysql, and web queries all the scores of all vehicles through polling, and then deals with them uniformly

.

ask for help: is there any way to quickly calculate the score of each car on each lap (regardless of language: cPP,php.)
when a vehicle passes through a specific location, it returns an array containing the identification and timestamp of all vehicles currently passing through a specific location

CPP
Mar.13,2021

use redis, to store the timestamp in an ordered set marked as key, and take it out to determine and process it each time it passes through a specific location. It's better than your current plan.

Menu