by bertil · 4y ago · 0 comments
Google Maps is probably the most egregious example of that: you are likely to need it outside of your usual Wifi, and possibly where cellular coverage is poor. Why not offer reasonable off-line support? The Apple TV app is confusing too: they offer the option to download shows (like Netflix does) but the feature is essentially unusable.
Offline means you're dealing with conflict detection, resolution, and caching strategies. Do you do multi-master? Have a single remote master but cache commands as a fallback? How do you test your solution?
And if you're dealing with the web, then you have to deal with IndexedDB which can sometimes be nuked by the browser, or have show stopping bugs (looking at you safari). There's also limited capacity compared to severside. Even if you use a library, under the hood they all use IndexedDB - there is no getting away from its limitations.
If anyone's interested in this stuff, I'd love to chat. I'm between contracts and trying to make an old app of mine work offline, lots of fun but also challenging.
users of google maps / apple TV don't have to send 'write' operations except for a few features (set-favorite, etc)
A more complicated approach is to have transform operations for state changes, with a version variable, then the version variable is incremented on on a central server each change and decide in which order the transform operations should be applied.
None of the approaches you are talking about here are new. There are many ways to implement this. The parent knows this and simply abstractly said you need to "do conflict detection". And yes that is an issue. A solvable one which has implications though and the level of challenge depends on the domain and the number of operations (potentially dependent on each other operations) that you made while offline. In your domain, do multiple users usually edit the same 'thing' simultaneously or at least with a frequency higher than the amount of time you are offline? If so you have a challenge on your hand.
A simple example of this is something we all do a lot. Coding. If you use say git and work offline 8h a day and push at the end of the day and you 10 other developers working on the same code base and your code and your work is structured in a way where all of you need to make changes to the same part of the code base you are going to be in a world of hurt of solving conflicts.
Luckily code structure and work breakdown can be done in a way where you will only have minimal conflicts. Git also chose a specific resolution strategy: last one to the table has to deal with conflict resolution.
Depending on your domain and how many dependent and complicated operations you allowed the user to make this can be really frustrating for users and impossible to resolve in an automated way.
Of course simply providing an offline mode for your email program in a mailbox only you have access to is a much simpler domain with easily automatable resolution strategies that are easy for users to understand as well.
Disclosure: I work for Automattic.
Sure you can download local maps. but that just saves some bandwidth. Neither Search nor Routing works offline. Without Routing, the app loses most of its uses. Not having Search wouldn't be a problem if you could pick a location on a map and ask: what's there? or even flag it––but you can't. You have to find the name otherwise and search for that, often zooming ridiculously close to get the location you are interested in to appear.
Offline maps are nice too, but this wouldn't have helped him get his navigation route back.
I've experienced many of these issues through the years too. And a dedicated offline navigation program is probably the way to go.
I do think your tone is somewhat unnecessarily dismissive though.
In today's age, with multi-megabyte 4K background videos, and enormous dependency chains, that's a hard sell.
I dealt with it, by writing my own backend, with a fairly optimized API, and consulting it in JIT "bursts."
That’s considered “square,” these days.