SOLVED asynchronous, daily string array upload

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
litow
Posts: 6
Joined: Wed Apr 11, 2018 9:07 am

SOLVED asynchronous, daily string array upload

Post by litow »

Reaching out to smarter people than me.

I have tried to setup a first pass for a ES2 saving scheme for my app. (thank you for making it so powerful and easy).
I got a basic example to work nicely.
But to rework and simplify the process to my needs, I would like to achieve the following.

1- Multiple users uploading a string to my sql server, at any given time.

2- Each upload to use the current date as a tag, ie: 20180420

3- As such, all entries for a given day to be stored under that tag as a string array, ie:
tag 20180420
user1,user2,user3,...

This would allow me to have multiple user upload under the same tag and easily collect the data back, by querying that tag.

Unless I missed it (or alternatives) I could not find an ES2 playmaker function which would allow me to add 1 array entry to an existing (or new) tag.
If I use UploadStringArray, that upload always overwrites what is already on the server.

I guess one way would be to download the sql data under that tag, add a new value to it, then upload it again.
But that means that if any other user does the same within that time frame, I may miss it, due to racing conditions.

Is there a way to achieve what I am after?
Last edited by litow on Sat Apr 21, 2018 1:39 am, edited 1 time in total.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: asynchronous, daily string array upload

Post by Joel »

Hi there,

There's no way to update an array on the server without download it and re-uploading it.

Instead you would be better off saving each day as a different filename, rather than a different tag. Then it would be easiest to store the string as the tag, with an empty value.

Then you can use the Get Tags action to get all of the tags (strings) from a given filename (day).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
litow
Posts: 6
Joined: Wed Apr 11, 2018 9:07 am

Re: asynchronous, daily string array upload

Post by litow »

Understood. Makes sense... thank you!
Locked