当前位置:网站首页>Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
2022-07-31 15:32:00 【HUAWEI CLOUD】
3.1.2 Clients requiring offline operation
Apps need to continue working after disconnection.
Calendar applications such as mobile phones, PCs and other devices.Always check whether your device is currently connected or not:
- Current meeting agenda (read request)
- Add new meeting (write request)
Any changes made while offline will be synced with the server and other devices the next time the device comes online.
At this point, each device has a local DB that acts as M (accepts write requests), and synchronizes these replicas on multiple Ms in an asynchronous manner among all devices. The synchronization lag may be several hours or days.The exact time depends on when the device is back online.
Architecturally, this setup is similar to multi-master replication between IDCs, except that each device is an "IDC" and the network connection between them is extremely unreliable.It can also be seen from these broken implementations of the calendar synchronization function that multiple masters can get results, but there are still many unknowns in the middle.
There are tools designed to make multi-master configuration easier, such as CouchDB.
3.1.3 Collaborative Editing
The real-time collaborative editing application allows multiple people to edit documents at the same time.Such as Google Docs.Collaborative editing is usually not fully equivalent to a database replication problem, but it is similar to the offline editing case mentioned earlier.
When one user edits a document, the changes are immediately applied to the local copy (document state in a web browser or client application) and asynchronously replicated to the server and any other users editing the same document.
To guarantee no editing conflicts, the application must lock the document before editing.If another user wants to edit the same document, it must wait until the first user commits the changes and releases the lock.This collaboration model is similar to the master-slave replication model where transactions are executed on the master node.
In order to speed up the collaboration efficiency, it is expected that the editable granularity is set to be small, such as one button or even the whole process of unlocking.But it also brings a challenge that multi-master replication has: resolving conflicts.
边栏推荐
- TRACE32——C源码关联
- 力扣:738.单调递增的数字
- Implement anti-shake and throttling functions
- TRACE32 - Common Operations
- 删除 状态良好(恢复分区)的磁盘
- 435. 无重叠区间
- Bilateral filtering acceleration "recommended collection"
- The principle of hough transform detection of straight lines (opencv hough straight line detection)
- Deployment application life cycle and Pod health check
- Linux查看redis版本(查看mongodb版本)
猜你喜欢
Use of radiobutton
C语言”三子棋“升级版(模式选择+AI下棋)
leetcode303 Weekly Match Replay
DBeaver连接MySQL 8.x时Public Key Retrieval is not allowed 错误解决
The use of button controls
Female service community product design
Getting Started with TextBlock Control Basic Tools Usage, Get Started
.NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的
Kubernetes principle analysis and practical application manual, too complete
三、数组
随机推荐
C语言”三子棋“升级版(模式选择+AI下棋)
Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
R语言向前或者向后移动时间序列数据(自定义滞后或者超前的期数):使用dplyr包中的lag函数将时间序列数据向前移动一天(设置参数n为正值)
做事软件开发-法的重要性所在以及合理结论的认识
Delete table data or clear table
更新数据表update
RecyclerView的高效使用第一节
华医网冲刺港股:5个月亏2976万 红杉与姚文彬是股东
R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
The normal form of the database (first normal form, second normal form, third normal form, BCNF normal form) "recommended collection"
R language moves time series data forward or backward (custom lag or lead period): use the lag function in the dplyr package to move the time series data forward by one day (set the parameter n to a p
11 pinia使用
what exactly is json (c# json)
The use of button controls
Codeforces Round #796 (Div. 2) (A-D)
工程力学复习资料
ASP.NET Core generates continuous Guid
RecyclerView高效使用第二节
多主复制的适用场景(2)-需离线操作的客户端和协作编辑
格林美瑞交所IPO:募资3.8亿美元 更多中国企业将赴欧洲上市