我可以做些什么来防止 wiki 风格的网站上的写-写冲突? [英] What can I do to prevent write-write conflicts on a wiki-style website?

查看:28
本文介绍了我可以做些什么来防止 wiki 风格的网站上的写-写冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在维基风格的网站上,我可以做些什么来防止或减轻写-写冲突 同时仍然允许网站快速运行并保持网站易于使用?

On a wiki-style website, what can I do to prevent or mitigate write-write conflicts while still allowing the site to run quickly and keeping the site easy to use?

我预见的问题是:

  1. 用户 A 开始编辑文件
  2. 用户 B 开始编辑文件
  3. 用户 A 完成文件编辑
  4. 用户 B 完成了文件的编辑,意外覆盖了用户 A 的所有编辑

以下是我想出的一些方法:

Here were some approaches I came up with:

  • 有某种签出/签入/锁定系统(尽管我不知道如何防止人们将文件签出过久",而且我不希望用户因不被允许进行编辑)
  • 有某种diff系统,显示用户提交更改时所做的其他更改并允许某种形式的合并(但我担心这将很难创建并且会使网站太难"使用)
  • 通知用户并发编辑同时他们正在进行更改(某种 AJAX?)
  • Have some sort of check-out / check-in / locking system (although I don't know how to prevent people from keeping a file checked out "too long", and I don't want users to be frustrated by not being allowed to make an edit)
  • Have some sort of diff system that shows an other changes made when a user commits their changes and allows some sort of merge (but I'm worried this will hard to create and would make the site "too hard" to use)
  • Notify users of concurrent edits while they are making their changes (some sort of AJAX?)

还有其他方法吗?有没有很好地实现这一点的网站示例?

Any other ways to go at this? Any examples of sites that implement this well?

推荐答案

记住上次更改的版本号(或 ID).然后在写之前先阅读条目,并比较这个版本是否仍然相同.

Remember the version number (or ID) of the last change. Then read the entry before writing it and compare if this version is still the same.

如果发生冲突,请通知试图写入同时更改的条目的用户.用不同的方式支持他.

In case of a conflict inform the user who was trying to write the entry which was changed in the meantime. Support him with a diff.

大多数维基都是这样做的.MediaWikiUsemod.

Most wikis do it this way. MediaWiki, Usemod, etc.

这篇关于我可以做些什么来防止 wiki 风格的网站上的写-写冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆