4 ms·
Super interesting, but for the enterprise software crowd I don't think those lessons be applied 1:1, the complexity of such a solution in enterprise apps will b
by pinaceae 13y ago
Super interesting, but for the enterprise software crowd I don't think those lessons be applied 1:1, the complexity of such a solution in enterprise apps will be higher.
Why?
Conflict resolution is costly and if coupled with a delay can be irrevocable. This means you need as much data validation and associated business logic offline in your app to prevent the user from even saving wrong data in the first place.
Some customers will want their users to work disconnected during their whole work day to save on data costs. Again, think global, data plans are not the same between the US and Brazil, for example.
Even if permitted to work online, the work environment the user enters might prevent them from going online. Think hospitals, where mobile phone usage is restricted in certain areas or is simply blocked through an active MRI machine in the vicinity.
The amount of data needed locally will likely be higher than in consumer apps.
A fully offline capable model to ensure maximum independence of connectivity needs a mix of sync mechanisms that should follow their respective business use cases. Conflict resolution and error handling is not exactly simple in such an environment, pervasive logging is key - plus a way to sync down app logs to the online backend. Users can freely fiddle with time/date and locale settings on iOS devices for example, which can wreak havoc on your sync logic - being able to backtrack such events is key when dealing with customer support issues.
- jchrisa 13y agoThere are some general purpose algorithms for conflict detection and management. Google CRDT or watch my Strangeloop talk about the data structures used by Apache CouchDB and Couchbase Lite. http://www.infoq.com/presentations/sync-mobile-data http://www.infoq.com/presentations/sync-mobile-data
- colinramsay 13y agoYes, I think any moderately complete CRUD-style app is going to fall down with this approach, sadly. Even if you duplicate all of the logic that the server implements to validate data, then that doesn't guarantee there won't be some kind of invalid interaction with a related record that only got changed on the server while you were offline. Inevitably there needs to be some kind of review screen to let the user adjust their edit in the above scenario and that makes the whole user experience a little clunky. I agree with the overall point of the OP though, given how flaky a mobile connection can be, this is by far the best approach if it suits the app.