I'm Serious - We need Check in and Check Out

116 views
Skip to first unread message

TonyM

unread,
Jan 22, 2019, 7:50:01 PM1/22/19
to TiddlyWikiDev
Folks,

I have raised this a  number of times in a number of contexts but NOW I'm Serious - We need Check in and Check Out

TWC had a method to allow serial editors and a lock file (that all can see). We need this as an option to TW5 as well.

Why?
  1. TiddlyWikis can be used as smart documents served from a file or network location without fear of contention and overwrite (Single File or Network served)
  2. Its a "poor mans" multi-user wiki - Serial multi-user update access NOT Multi-user multi-access
  3. TW-Receiver could provide read/update access to any number of users knowing simultaneously is not available.
  4. The lack of such a facility is driving some of the complexity we face trying to simplify the saving process, if we could check in out documents reliably we secure the the wiki from corruption/overwrite. 
  5. It could help users protect them from themselves opening the same wiki from more than one tab/or browser without needing a server solution.
  6. Perhaps TiddlyDesktop and the other servers could also honour this allowing free transfer between platforms.
How

I am confident we have the technology and avenues by which to achieve this, I do not believe their is a technical barrier any more. An example in point is some of the local save tools, we know they are writing information such as backups, so we have the ability to read and write a switch/lock and we can include an informational user name in that switch.

We could provide a checked out to current user with a save and check in button. We could provide a NO check out user with a reload and check in button (if not locked)

I can provide more technical possibilities if requested, but some of you I expect already know how to do this.

Feedback please!

Thanks tony

joearms

unread,
Jan 31, 2019, 11:14:34 AM1/31/19
to TiddlyWikiDev
An alternative might be some form of transaction memory.

When a tiddler is served over a network it has last-modified time (this is the time when the server
last stored a modification)

If a user edits a tiddler and sends it back it should include this time.
Call this Told.

When the server receives an updated tiddler it checks to see if Told 
 is identical to the current last modified time of the tiddler if so the update
succeeds.

If the two are not identical the update fails - and the user is told that
their new tiddler value is not an update to the latest value of the tiddler.

They should then get the latest version and resolve any conflicts.

This works pretty well if we make a couple of assumptions

   1) people do not edit the same tiddlers at the same time
    2) edits are relatively quick

This way nothing gets locked and there are no checkins/outs.

Actually, each tiddler could be (internally) a write-append-only log of diffs
this way no data gets lost and we can back up to any old value.

Cheers

/Joe

Diego Mesa

unread,
Jan 31, 2019, 2:39:08 PM1/31/19
to TiddlyWikiDev
Ive always thought something like this could work:


where saving a tiddler could trigger a commit object. That way, conflicts, merges, etc could be handled the way it is usually handled in version controlled systems.

TonyM

unread,
Jan 31, 2019, 8:01:24 PM1/31/19
to TiddlyWikiDev
Joe,

Thanks for adding to this conversation. Something along the lines you are talking about exists in Bob, and it is multi-user and multi-access and deals with contention. All this is possible with a server. I am keen to see this working with single file wikis writing a lock/checkout file.

Please Keep the ideas flowing.

Regards
Tony

TonyM

unread,
Jan 31, 2019, 8:02:25 PM1/31/19
to TiddlyWikiDev
Diego,

If I have your suggestion correct, you are sill talking about a server implementation and in this case a core change?

Regards
Tony

TonyM

unread,
Jan 31, 2019, 8:19:34 PM1/31/19
to TiddlyWikiDev
Folks, Here is a short specification that may lead to an answer, alternatives, help and criticism welcome.

  1. On opening a WIki check to see if they can see a restricted file, if not remain in a read-only mode.
  2. If the restricted file is visible user has update rights, check to see of a lock/Checkout file exists, 
    1. if so advise user and email address of person who checked it out, idealy monitor provide reload button to see if checkout status changed
    2. If checked out by me allow me to edit and save
      1. Save Wiki, Then use a system similar to 2.3.x to allow to end check out
    3. If not checked out to anyone provide option to check out HTML
      1. Include a Tiddler containing a standalone HTML and/or using PHP that can be presented in an iframe
      2. Open the Tiddler in an Iframe. Display when checkout is needed
      3. Allow User and email address to be provided and request checkout 
      4. Write the lock/checkout file with my details, cause wiki reload (or suggest), Ie return to 1
Of note is the active html/php can be made available only to those who have authenticated and have file the right to request check in check out and save. This will be using the hosts authentication process, other wise anonymous can be given read only, or no access.


Regards
Tony
Reply all
Reply to author
Forward
0 new messages