[pmwiki-users] Is there a way to tell if anyone is editing a wiki page?
jo at durchholz.org
Fri Apr 15 12:27:46 CDT 2005
Menachem Shapiro wrote:
> I was wondering if there was any way to be able to tell if anyone is
> editing a wiki page (in other words, running ?action=edit).
It would be possible to check that. It would also be possible to see the
moment that the user has pressed Preview or Save.
What you don't see is whether the user has aborted the edit session.
One scenario is when the user presses the Back button and the browser
decides to display the page from its cache - the server isn't notified
of that even.
The other is when the user simply closes the browser window. Again,
there is no feedback to the server, so PmWiki doesn't even have a chance
to find out.
So if you want to find out whether a page is open for editing: not possible.
However, this isn't a serious problem. If two people edit the same page
and save, the second one to save will be notified of the conflict and
get a chance to integrate his changes with those of his competitor.
(This strategy is generally called "optimistic locking" in the code
management literature. It is *far* superior to "pessimistic locking",
which requires that anybody who plans to edit a file first has to place
a lock on in - in practice, this leads to lots of files locked in
expectation of changes that never happen.)
More information about the pmwiki-users