Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

what happens when two people edit a page simulataeneously in a wiki?

  • 02-07-2008 7:42pm
    #1
    Closed Accounts Posts: 5,284 ✭✭✭


    If John is editing a wiki article, and Jane opens it and edits it at the same time on a different computer, how is this handled generally? The simplest tactic would be just to make it impossible for the page to be opened for editing while it is already open for editing elsewhere. But for something like wikipedia where there is such a broad userbase this wouldn't be practical because a user could leave a page open in the edit view for a long time without editing it, and it wouldbe impossible to distinguish this from a very long edit - so how is it usually handled? Are the changes merged or what?

    I'm developing an application with similar sort of multiple-user collaboration. For the context of the application I'm developing the edit-lock would probably work well, especially if a notification feature was added, since the userbase would be far smaller and probably without edit-access for casual users. But I'm interested in how wikipedia etc handle this sort of thing.

    thanks


Comments

  • Closed Accounts Posts: 9,700 ✭✭✭tricky D




  • Registered Users, Registered Users 2 Posts: 3,568 ✭✭✭ethernet


    I have edited a few wikipedia articles but never got any lock warnings (that someone else was editing the same article)

    With DokuWiki, however, I have gotten such a message. Like you've said, this works just fine for smaller numbers of people editing an article.

    The main difference between the two, as far as I know, is that MediaWiki stores everything in a database whereas DokuWiki uses files.


  • Closed Accounts Posts: 5,284 ✭✭✭pwd


    yeah the app i'm developing uses a database not files.


  • Registered Users, Registered Users 2 Posts: 4,792 ✭✭✭cython


    One option here would indeed be the file-lock idea as is mentioned, and simply set a flag on the record in the DB, but then you can run into issues if the editing page isn't closed correctly, and the lock released. One option would be to have an admin area for manual release of these locks (a company I used to work for did this in Delphi apps)

    Depending on the likelihood of 2 users submitting changes at the exact same time (I mean to the millisecond), and also how much you trust the userbase, another would be to notify users of any changes made to the page since they started editing it, when they go to submit. PhpBB3 has this feature, and vBulletin (boards.ie base system) may also have it. A simple implementation would be to make a note of the last edited time when they go to start editing, and then when they go to submit their changes, check is this still the same. If so, proceed to save, if not, warn user, and do not save changes yet. Of course this is assuming that you are going to keep a record of when pages/data were last edited.

    I mention how much you trust your userbase as well, because there is the potential here for the second user to simply save and overwrite the other changes if they can't be bothered to review and/or merge the changes.

    I would suggest you have a read up on optimistic and pessimistic locking, as they are the two broad options here


Advertisement