Ever wondered how some applications can perform even without an internet connection? This post will detail how some applications handle this challenge.
In handling offline operations between devices, the Multi-Leader Replication architecture is suitable to achieve this.
For example, consider a calendar application on your laptop, mobile phone and other devices…
What type of operations does this need to support?
- You need to see your meetings
- Which means making read/write requests at any time
- Regardless of having an internet connection or not
- If you make any changes when offline, they will need to be synced with the server and other devices
Multi-Leader Replication architecture to the rescue…
- In this type of solution
- Every device has a local database, that acts as a leader, meaning they all accept write requests
- There is an asynchronous multi leader replication process that will synchronises between replicas of your calendar app on all devices
- The lag can be hours or even days for waiting for internet access, which make this an attractive solution
- The reason why this architecture is similar to the Multi-Leader Replication
- Each device is a data centre
- To be mindful of, the network connection between these devices can be extremely unreliable
Be warned about the past…
There is a plentiful history of broken calendar implementations… 😑 Multi leader replication is a tricky thing to get right!
Not all is lost…
There are tools out there that make this easier to apply multi leader configuration. A recommended technology that is designed to handle this mode of operation is CouchDB, which is also open source document-oriented database (NoSQL) and implemented in Erlang. Worth checking out, if your application requires this.
📚 Further Reading & Related Topics
If you’re exploring clients with offline operations in distributed data-intensive systems, these related articles will provide deeper insights:
• Distributed Data-Intensive Systems: Replication vs. Partitioning vs. Clustering vs. Sharding – Learn how partitioning and replication strategies are critical in maintaining offline data consistency and synchronization in distributed systems.
• How Does Partitioning Work When Requests Are Being Routed? – Explore how request routing strategies, combined with offline operations, manage data consistency and availability in distributed systems with limited connectivity.









Leave a comment