Page 1 of 1

Multiple clients writing to ES3 cloud

Posted: Sat Mar 02, 2019 2:35 am
by nFighter
I want to allow multiple clients to read/write same file in ES cloud. Basic turnaround could be:
1. player read array from ES cloud file
2. add/delete value from array
3. save ES cloud file

It should not be an often action but I believe it could be a situation when 2 or more payers will try to access same file simultaneously. What’s the best way to deal with this task? I’m thinking about “locking” a file to player before editing. Something like:
0. Check if file’s special variable is empty, if yes ->
1. Write your ID to special variable in the file
2. Check if file’s special variable contains your ID (to prevent situation if someone write ID to the file faster than you)
3. Read/write array from file
4. Empty the file’s special variable


Should it work? Did I missed some important cases? Did I not understand some concept and use ES3 wrong?

Re: Multiple clients writing to ES3 cloud

Posted: Mon Mar 04, 2019 7:51 pm
by Joel
Hi there,

MySQL handles concurrent access to a file, so you should not need to perform your own versioning.

All the best,
Joel