Imagine writing a note on your phone while your laptop is turned off. Your phone saves the note immediately. Later, your laptop connects and receives the update. Perhaps someone you share a collection with has also made a change on another device.
There is no single computer that witnessed every action at the moment it happened. Yet the application should still deliver a coherent experience when the devices reconnect.
This is the world of distributed systems. Instead of relying on one continuously available computer, a distributed system coordinates multiple independent participants. Those participants might be servers in different locations, personal devices, or a combination of both.
Distributed systems make modern cloud services possible, but they are equally important to local-first software, where applications remain useful even without a connection. The challenge is not merely moving data over a network. It is preserving the intended meaning, validity, and availability of information while different computers know different things.
What makes a system distributed?
A distributed system contains multiple nodes: independently operating computers or processes that cooperate through communication. A node has its own state and cannot automatically read another node’s memory. It only learns what another node knows through exchanged messages or some other explicit communication mechanism.
That simple fact creates several recurring challenges:
- Messages take time. An update made on one device cannot appear on another until it is communicated.
- Connections fail independently. One device may remain usable while another is offline or a server is unreachable.
- Participants observe different histories. Messages can be delayed, retried, duplicated, or received in different orders.
- Changes may happen independently. Two nodes can both accept valid work before either knows what the other has done.
- Failures are not always immediately distinguishable from delays. A slow participant and an unreachable participant may look the same for a while.
None of this means distributed systems are inherently unreliable. It means that their reliability depends on making explicit decisions about communication, replication, consistency, and recovery.
Not every distributed system offers offline editing, and not every node has permission to read all shared information. For example, a conventional service may use many database servers while still requiring every user action to reach a central authority. A local-first application can instead let a device complete a change locally before sharing it with other authorized replicas.
Data Replication
Definition
Data replication is the maintenance of multiple copies of data or its recorded changes across different nodes, so that information can be accessed, updated, transferred, or recovered at more than one location.
Also known as: Replication, Data replicas
A replica is a copy of some data, or of the information needed to reconstruct it, maintained at a separate node. Replication lets systems keep data available in more than one place and coordinate changes between those places.
Consider three participants in a personal application’s synchronization system:
- Your phone maintains a local copy you can read and update.
- A synchronization server stores information needed to relay or retain those updates.
- Your laptop maintains its own local copy and receives updates when it reconnects.
All three participate in replication, but their roles need not be identical. A server can replicate encrypted updates without possessing the keys needed to reconstruct the readable application records. Authorized client devices can hold the cryptographic keys and materialize the private data they are permitted to access.
A replication system must answer several questions: Which changes should reach which replicas? How can a device identify missing updates? What happens when an update arrives twice? And how does a replacement device reconstruct a valid state?
Replication can improve resilience and reduce dependence on any single device. But multiple copies also introduce the possibility that different replicas temporarily contain different information. Keeping them appropriately coordinated is the job of data synchronization.
Eventual Consistency
Definition
Eventual consistency is a consistency model in which replicas may temporarily expose different states, but, if updates stop and the necessary updates can eventually be delivered and reconciled, their views of the shared data converge over time.
Also known as: Eventually consistent systems, Eventual consistency model
Imagine that you change a reminder on your phone. Your laptop has not connected yet, so it still shows the previous reminder. For a time, both devices display different states without either device necessarily malfunctioning.
Eventual consistency allows such temporary differences. The promise is about what happens after updates have had the opportunity to propagate and the system has reconciled them. If no further updates are made, communication becomes available, and the relevant updates are delivered and processed correctly, replicas should eventually agree on the shared state.
This is not a guarantee of immediate agreement or a fixed waiting period. If a device remains offline indefinitely, it cannot receive updates it has never seen. Nor does the word eventual specify how concurrent edits are resolved: the system still needs rules that produce compatible results.
Eventual consistency is useful for applications that prioritize independent progress. A person can continue editing locally rather than blocking every action until a remote server confirms that all replicas agree.
There are also applications where an operation genuinely requires coordination before it can be accepted. For example, preventing two people from consuming the same uniquely allocated resource may call for stronger coordination than simply merging independently made changes. Different parts of a system can therefore require different consistency guarantees.
For a foundational treatment of this model and its engineering trade-offs, see Werner Vogels, Eventually Consistent - Revisited (2008).
Why independent work creates new challenges
When each node can continue working without waiting for the others, their local histories can diverge. This is often exactly what users want: no blocking spinner, no unavailable form, and no demand for a stable internet connection before saving a thought.
The system must later determine which updates are new, which have already been applied, which depend on earlier changes, and whether two changes affect the same information. Simply taking whichever complete copy arrived last can discard work made elsewhere.
This is where concurrent updates and convergence become especially important.
Concurrent Updates
Definition
Concurrent updates are changes that occur without either change being causally dependent on the other, such as independent edits made on disconnected replicas before those replicas exchange their changes.
Also known as: Concurrent changes, Concurrent writes
In distributed systems, concurrent has a more precise meaning than “at exactly the same time.” Two updates are concurrent when neither update causally depends on the other. Their creators did not have to act in the same second: they only had to make the changes without observing the relevant earlier update from the other participant.
Suppose your phone and laptop start with the same shopping list. While offline:
- Your phone adds “Coffee.”
- Your laptop adds “Bread.”
Both operations can be valid and independent. They are concurrent because neither device knew about the other’s new entry. A suitable data model can preserve both without difficulty.
Now imagine both devices independently rename the same list. The system may need a rule for retaining versions, choosing one name, or allowing the user to resolve the disagreement. The changes are still concurrent, but their meaning makes the situation more complicated.
Some systems use causal metadata, operation identifiers, or other coordination information to recognize and process independent updates. A wall-clock timestamp by itself does not establish causality or prove which user intention should prevail.
Our definition of synchronization conflicts and the related conflict-resolution approaches explain how applications handle these cases.
Convergence
Definition
Convergence is the property that replicas reach the same logical state when they have received and correctly processed the same relevant set of updates under compatible reconciliation rules.
Also known as: Replica convergence, State convergence
Convergence describes the result a distributed system tries to achieve after replicas have incorporated the same relevant information: their logical view of the shared data agrees.
For example, two devices may receive independent shopping-list additions in different orders. If the chosen data type and reconciliation rules handle those additions consistently, both devices can end up with the same list once they have processed both updates.
Convergence does not require every replica to store byte-for-byte identical files, use the same internal database format, or hold information the user is not authorized to see. It concerns the shared logical state within a defined replication scope.
Achieving it requires more than forwarding network packets. The system must consistently validate and interpret operations, handle duplicates and dependencies, and apply appropriate conflict-resolution rules. Otherwise, two replicas might receive the same updates but compute different results.
Conflict-free Replicated Data Types (CRDTs) are one family of structures designed to help independently updated replicas converge under specified conditions. Their mathematical properties address certain classes of replicated-data conflicts, but they do not automatically decide every application-specific question of user intent. Other synchronization designs use different reconciliation strategies.
The research by Shapiro, Preguiça, Baquero, and Zawirski, Conflict-free Replicated Data Types (2011), gives a formal account of convergence for CRDTs.
What changes when the server cannot read the data?
Many conventional distributed databases keep readable application data on their servers. That allows servers to inspect records, evaluate field-level changes, and sometimes decide how conflicting updates should be merged.
In a system built around client-side encryption and zero-access architecture, a server can coordinate transport and storage without reading the private content. This changes where decisions about private data can be made.
Authorized clients, rather than the server, must be able to decrypt the updates they are entitled to receive and apply the necessary content-level rules. The service can still store encrypted messages, help determine what has been delivered, and route information to the appropriate recipients.
This arrangement also separates consistency from trust. A replica accepting an update must know more than whether the message arrived. It must reject invalid or unauthorized data and apply valid updates consistently. Cryptographic authentication and integrity checks help protect that boundary, while the application’s synchronization logic determines how valid changes affect its state.
A malicious intermediary might be able to delay or withhold messages, even if it cannot forge a valid authenticated update or read the encrypted payload. The ability to prevent synchronization is a question of availability; it is not the same as obtaining access to protected content.
Distributed systems and Nyskra
Nyskra builds personal applications that remain useful locally while keeping information available across authorized devices. This brings the familiar challenges of distributed systems into everyday use: devices may be offline, networks may fail, and updates may arrive at different times.
Our approach combines local-first usability with end-to-end encryption. Nyskra’s infrastructure helps connected devices exchange protected information without needing to read the personal content. Reliable delivery remains an important responsibility of the synchronization system.
The result we aim for is responsive personal software that stays private and connected, without making the user understand distributed systems. That is the point of making the underlying complexity largely invisible to the user.
Further reading
For the application-level view, see Data Synchronization, especially the explanations of offline updates and conflict resolution. Local-First Software discusses why independently usable local data changes the experience of personal applications.
Our engineering article Beyond Offline: Building Local-First Apps places these architectural challenges in the context of practical app development.
For broader background, see Kleppmann, Wiggins, van Hardenberg, and McGranaghan, Local-first software: You own your data, in spite of the cloud (2019), and Werner Vogels, Eventually Consistent - Revisited (2008).