Giter Club home page Giter Club logo

Comments (1)

bouncepaw avatar bouncepaw commented on July 4, 2024 1

This is very bad and unpredictable behavior.

Agreed.

You can solve it like this - when the user goes to the hypha editing page - for everyone else this page is blocked with an warning like "Someone is already editing this hypha, please wait."

It's a good exploit to make whole wiki uneditable by opening the edit page for every hypha there is. Also, how do we determine that there is an edit going on? Not every visit to /edit/$hypha ends up with a successful edit. Do we impose a timeout? How long?

That's difficult.

simply notify the user about such a problem without blocking the page.

This is the closest to what I will propose later in this message.

The hardest option is to use different branches and allow the user to resolve merge conflicts.

This option is not considered because MycorrhizaWiki uses only one branch by design.

My design

A similar alcorithm is used on some wiki engines and, surprisingly, forum engines (replying to thread that had changed while you were writing your messages).

  • When an editor visits /edit/$hypha, we save latest revision's hash or timestamp. Let's say it's A.
  • When the same editor saves the edit, before that, we save latest revision's hash or timestamp. Let's say it's B.

If there was no edit done by anyone else between these two points of time (A = B), save successfully. Otherwise (A ≠ B), warn the user with something like The hypha you are trying to edit has been changed. Look at the changes:; the user is supposed to adjust their document to match the new edit.

A and B can saved in the user's cookies. Even though the user can modify the cookies, it won't break anything.

I guess this can be implemented someday.

from mycorrhiza.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.