Looking into building an app for my business but unsure if this backend will work for my needs.
-I need to be able to use this backend for 42 tablets.
-There are 16 parks each with 9 logins.
-1 for an assistant manager account and 8 crew accounts.
-2-3 tablets per 8 hour shift are used.
-Online Data Sending 1 time per day per shift.
-Data across all 9 account X16 Park need to update daily, be the same data and the right parks data.
-Before logging in, Park in Question is selected and a Register Number. This Reg# can only be used 1 tablet at a time and would need to be a server wide stored value. Then removed from the list of available.
-Depending on which park is selected, only the 9 accounts designated can login else it should fail.
-If the Assistant Manager Account is logged in, more features are available then a crew's login.
-If offline i try to connect every 5 seconds via locally stored variables
-There are 3 Modes in my App. OnlineMode, OnlineLocalMode, and OfflineMode. Online would check constantly what the data is on the server and set the local data to that. OnlineLocalMode and OfflineMode constantly stores the data locally to a get set.
-A switch Mode Button is Active in Online and Online Local but disabled in Offline. when in each mode the call switches to the other making Online and OnlineLocal Switch upon button click. I have it set my local data on initial login success.
-In the Update if OnlineMode it is constantly checking the current Data in the case of a change else where. In OnlineLocalMode a Sync Button is active which then updates the server with it's local data. in offline and OnlineLocal Modes it is constantly setting the local data.
To check if Online i use:
IsOnline = PlayFab.PlayFabClientAPI.IsClientLoggedIn();
If this ever becomes false (a connection loss) the system will then go into OfflineMode. In OfflineMode it's constantly looking for the re connection flag and Switch button is disabled.. if this happens were back in OnlineLocalMode.
Note: I am currently converting my data storage class to a Json string and saving this as a key/value pair. not sure this is the correct method but seems to be the shortest amount of code.