当前位置:网站首页>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.
边栏推荐
- 定时器的类型
- Deployment application life cycle and Pod health check
- Linux check redis version (check mongodb version)
- ES6 类
- RecyclerView的高效使用第一节
- SIGABRT 报错时的注意事项和解决方法
- Delete table data or clear table
- TRACE32 - SNOOPer-based variable logging
- 【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
- Getting Started with TextBlock Control Basic Tools Usage, Get Started
猜你喜欢
随机推荐
Efficient use of RecyclerView Section 3
多主复制的适用场景(1)-多IDC
工程水文学名词解释总结
「秋招系列」MySQL面试核心25问(附答案)
Codeforces Round #796 (Div. 2) (A-D)
Excel快速对齐表格的中姓名(两个字姓名和三个字姓名对齐)
数据库的范式(第一范式,第二范式,第三范式,BCNF范式)「建议收藏」
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
Insert into data table to insert data
update data table update
Codeforces Round #796 (Div. 2)(A-D)
json到底是什么(c# json)
基于ABP实现DDD
hough变换检测直线原理(opencv霍夫直线检测)
After Grafana is installed, the web opens and reports an error
R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
Unity中实现点选RenderTexture中的3D模型
R语言检验样本是否符合正态性(检验样本是否来自一个正态分布总体):shapiro.test函数检验样本是否符合正态分布(normality test)
华医网冲刺港股:5个月亏2976万 红杉与姚文彬是股东
为什么毕业季不要表白?









