What can I do to prevent write-write conflicts on a wiki-style website?

后端 未结 8 1625
借酒劲吻你
借酒劲吻你 2021-02-03 12:44

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?

The pr

8条回答
  •  不知归路
    2021-02-03 13:14

    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.

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

提交回复
热议问题