当前位置:网站首页>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.
边栏推荐
- Ubantu专题5:设置静态ip地址
- 11 pinia use
- 数据库的范式(第一范式,第二范式,第三范式,BCNF范式)「建议收藏」
- The principle of hough transform detection of straight lines (opencv hough straight line detection)
- Efficient use of RecyclerView Section 1
- 第二届中国PWA开发者日
- Codeforces Round #796 (Div. 2)(A-D)
- 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
- 使用 GraphiQL 可视化 GraphQL 架构
- R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化分组箱图、使用ggpar函数改变图形化参数(legend、修改可视化图像的图例在整图中的位置)
猜你喜欢
随机推荐
button控件的使用
Matlab矩阵基本操作(定义,运算)
R language test whether the sample conforms to normality (test whether the sample comes from a normally distributed population): shapiro.test function tests whether the sample conforms to the normal d
华医网冲刺港股:5个月亏2976万 红杉与姚文彬是股东
Kubernetes principle analysis and practical application manual, too complete
Unity中实现点选RenderTexture中的3D模型
R语言ggplot2可视化:使用ggpubr包的ggmaplot函数可视化MA图(MA-plot)、font.legend参数和font.main参数设置标题和图例字体加粗
R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化箱图、使用font函数自定义图例标题文本(legend.title)字体的大小、颜色、样式(粗体、斜体)
格林美瑞交所IPO:募资3.8亿美元 更多中国企业将赴欧洲上市
Linux查看redis版本(查看mongodb版本)
11 pinia使用
Implementing click on the 3D model in RenderTexture in Unity
对话庄表伟:开源第一课
工程水文学复习资料
AVH部署实践 (一) | 在Arm虚拟硬件上部署飞桨模型
复制延迟案例(1)-最终一致性
Why don't you make a confession during the graduation season?
Deployment应用生命周期与Pod健康检查
四象限时间管理有多好用?
Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)








