Device / Session Sync
Current state: hypothetical fluff
Discussion:
-
Submit some current existing solutions, pros/cons -
Push / pull methodology ... pubsub blah blah -
Element locking? How granular? -
How do we deal with conflicts? - Frontend should at least show an error that server is newer than data currently being edited
- Frontend could display a 'diff' if server is newer...
- Conflicts should be audited
-
Delta / Diffs / Version control 😨 -
Security - probably device fingerprint saved in session, as IP is unreliable
Hypothetical implementation:
-
Each viewer has unique ID registered to a single session (by device or window?) -
Each object has a "last updated" timedatetz - maybe these could a series of sync cookies, which are sent with every request to API by default. -
If server detects one of the cookies is out of sync fresh data is sent out - this new data should include new "last updated" time to resync and prevent frontend from replacing data -
Non-real-time updates are done via login status check-in, and passively via other user activity reliant on API? -
??? real-time? 😕
Edited by Lorin Halpert