To simply things out. I need a datastore that handle many request at the same time (including different server save) without overwrite or overlap anything that saves before. Everyone recommend Updateasync() i think it uses to compare data. Any help is appreciated
But the request comes from multiple server. im scared that the data got overlap like for example
Original Data{Uid1,Uid2}
Client1{Uid1,Uid2,Uid3} Uid3 is client1 uid here Client2{Uid1,Uid2,Uid3} Uid3 is client2 uid here
The clients here save the data at the same time so the data on Client1 will Overwritten by Client2
Hopes this makes a image how my problem was, and sorry for grammar
If you are only saving a player’s data to their key when they are in a server, you will not have this issue. If the character tee is online, you could check with server messaging service. (Assuming you are sending messages to player and saving them)
DataStores can only handle so many requests, in total you can handle about: 60 + (Players x 10) a minute (using GetAsync / SetAsync)
which if you have 1 player in the game, it would equate to about 70 requests.
The Best thing you could do is Handle the Data efficiently while sending little to no requests, Sending multiple requests at a time isnt good practice.
nice information, but the request comes from multiple server. im affraid that the data got overlap like for example
Original Data{Uid1,Uid2}
Client1{Uid1,Uid2,Uid3} Uid3 is client1 uid here Client2{Uid1,Uid2,Uid3} Uid3 is client2 uid here
The clients here save the data at the same time so the data on Client1 will Overwritten by Client2
Hopes this makes a image how my problem was, and sorry for grammar
ProfileService is a Regular DataStore that handles Data efficiently, there is nothing more to it, the OP is trying to make their own system that can be efficient by itself.
All UpdateAsync does is read the Data you give it and Saves it, the function is used to compare the old Data (that data that is currently saved under that key) to the new Data (the one you are trying to save), and to Save the Data you give it, but if you still continue to save the Data while they are on the Different Server, Maybe it will overwrite the data while they are in the game? But that is where you can probably check if the Player is actually within the Server or not to save it. And When they are in the game, it should not affect their data while playing, if you set it up correctly.