Most apps today store data on servers and treat your device as a display. Losing your internet connection means losing your work; if the service goes down, you lose your data. Local-first flips that order around.
Requirements for a local-first application
- Open it and use it right away—no need to wait for an internet connection
- Data is stored on the user’s device in a format readable by other tools
- Syncing across multiple devices is optional, and the app automatically resolves conflicts instead of forcing the user to choose a version
- If the service goes down, the app continues to run
Why is it only feasible now?
The biggest challenge has always been synchronization. How do you merge changes when two devices are editing the same document offline? Mergible data structures—which allow changes to be combined in any order while still producing the same result—solve this problem without the need for a server to act as an arbitrator.
The Price
In-app synchronization is much harder to implement than calling an API. Full-text search on large data sets on the client side is also slower than on a dedicated server. And a subscription-based business model is harder to justify when the software works without the service.
For users, the test is simple: unplug the internet and open the app. Whatever still works is what you truly own.
Thảo luận