You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be cool if support could be added for an optional synchronization mechanism to support offline usage of external storage.
Something like
const user = await useStorage().login('user1') // local authentication
try {
const dataStorage = useStorage('data').setItem('test', 'works') // set item online if possible otherwise use the local storage as a fallback
}
catch (e) {
const popup = await popup(`Solve conflict for (${e.description})`, e.newValue, e.differentValue) // Provide mechanism for solving conflicts when the connection is restored
}
await useStorage().getItem('data:test') // Can be accesed from memory when the storage is already in sync with the external storage
await user.logoff()
Advantages
Work offline without server connection
Solve conflicts when the server connection is restored by returning errors with the values that are not matching
More app performance because local storage is used
Disadvantages
Requires timestamping and support for users I guess to support solving conflicts
Slower storage on the server
Less secure?
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
Would be cool if support could be added for an optional synchronization mechanism to support offline usage of external storage.
Something like
Advantages
Disadvantages
Additional information
The text was updated successfully, but these errors were encountered: