uses express as the server-side framework, and then uses redis to store some data.
I found a problem, but I couldn"t figure it out.
for example, A sends an ajax request at time 2 redis 31v 11v 00, this request modifies some data in redis, and B sends an ajax request to modify some data in redis when time 2v 31v 11v 02.
so the server starts the following operation
2JV 31VlV 1100 POST updateData user = A;
2JV 31VlV 11JV 01 POST updateData user = B;
2Rver 31JV 11VO1Rver pulling a collection in redis (A"s request);
2JV 31JV 1102 server pulling a set in redis (B"s request);
2JJR 31POST updateData user 1102 server the data about user An in this collection has been modified;
2Remo31JUR 11R03 server"s data about user B in this set has been modified
2 the modified A data set is updated again to the redis by
2 the modified A data set;
2 the modified B data set is re-updated to the redis by the
2VOV 31VO1VO4 server;
in this way, doesn"t the data on redis become modified only by B, but not by A?
nodejs is a single thread to execute code, does it mean that if A.B requests before and after, first deal with A, and then deal with B?