Will I have to worry about outdated data when reading and writing to the same key in a DataStore from different servers? I basically want a matrix of various colors to be modified by multiple servers. Is there a better approach?
It’d be helpful to know what you are using the various colors are being used for. There might be a better way to do what you’re trying to do.
Idk about your question.
They color a physical board in the game. I’m basically messing around trying to recreate r/place.
Well, I solved the problem by using DataStore and message passing. All servers access the same DataStore. Whenever a change is made to the canvas, the change is written in the DataStore and then the MessagingService informs all the servers about that change. When I wrote over a bunch of the same tiles on 2 different computers, it didn’t seem like the order of placement was guaranteed (writing a tile red and then blue could yield either red or blue depending on how fast the clients, servers, messages, and datastore is going), but the servers did agree on one canonical canvas (each of the tiles were eventually consistent, exhibiting the same color on both servers).