Help! ! Now I want to make a system. After the user places an order successfully, the system will compare the longitude and latitude of the rider with the longitude and latitude of the delivery address. Whichever rider is closest to the delivery address will send the order to the nearest rider. ! ! The above is the requirement; the following is my idea: the front end polls one of my rider pool interfaces, uses redis hash to save the longitude and latitude information of all riders, and the other interface is the order dispatch interface that the rider side wants to poll. This interface is mainly Take out the longitude and latitude of all riders saved by redis, loop through all the rider's longitude and latitude to calculate the shortest distance to the order's longitude and latitude, and then write the nearest rider's information and order information into the dispatch data table. If there is rider information in the dispatch data table, , it prompts the rider to let the rider take the order! ! Can someone please take a look at my thinking? Please give me some advice
If there are many riders, the pressure on the server will be too great