Skip to content
#DistributedSystems

Local-First Software: Taking Back Control of Our Data a mini-doc (Category Distributed Systems)

#DistributedSystems #Architecture #SystemDesign #Software #Databases

Local-First Software: Taking Back Control of Our Data | a mini-doc (Rubric #DistributedSystems)

I saw it. interesting mini-documentaryI was interested in Martin Kleppman, author of DDIA and one of the apologists for the local-first approach. In fact, this approach offers an alternative to centralizing information storage in the cloud. (And therein lies the source of truth.). In local-first applications, “truth” is stored on the user’s device, works without the Internet, and syncs with the cloud as an extra copy.

The main ideas of the concept are 1The main copy is from the user. The app reads/writes locally → fast UX, offline by default. The cloud is needed for a sync between devices and backup. 2ту Cloud‐first breaks down at home. For example, the signal disappeared - the playlist disappeared, although the music was "buyed". Worse yet, the service shuts down / shuts down servers – people lose access to their data. 3Collaboration is possible, but it is difficult. Purpose - as in the best cloud products (real-time, unified data)without constant communication with the central server. Techniques: CRDT, p2p/distributed synchronization, change fusion. While there are difficult cases and a lot of engineering work. 4️ It's already a movement.. The community is growing, and there are mitapas/tools. Most local-first products are hybrid (compromise of ideal and practice)But the direction is clear: more autonomy and user control.

If you apply this to ideas for designing your applications and want to try to move in this direction, then you can do the following:

  • Make offline-first basic non-functional requirements n. Not a “spinner without a network”, but working with local data + queue / retrai / identity (By the way, now this approach would be relevant in case of blocking the mobile Internet.) Local database + background sync. SQLite/IndexedDB and replication layer: change logs, versions, merge, limits/quotas, synca observability. Conflict isn't a bug, it's a script.. Describe the consistency model: last-write-wins, CRDT, explicit UI conflicts, domain rules. Control and durability of data. Exports, local backups, circuit migrations, E2E-encryption for sync/cloud. - Shifting complexity to client. The server can become easier. (coordination/storage)But there are growing demands on offline/sink testing and on competences in distributed systems.

Anyway. To sum up, local-first is trying to solve the pain of cloud-based applications, and the list of problems is big: network dependency, trust and data security. But it should be noted that a full transition is not necessary, but now it is possible to implement elements: local storage, offline-UX, secure sync and a clear conflict model. This will give the product stability and the user a sense of control.

P.S. There's just a mini-documentary. 10 It’s almost like watching it as shorts:)

P.P.S. This documentary also got to the site system-design.space, as it is very interesting to discuss tradeoffs in the design of distributed systems.

#DistributedSystems #Architecture #SystemDesign #Software #Databases