body { margin:0px; background-color:#fff } img { margin:0px; border-style:none } button { margin:0px; border-style:none; padding:0px; background-color:transparent; vertical-align:top } p:first-child { margin-top:0px } table { empty-cells:hide } .f-sp { font-size:1px; visibility:hidden } .f-lp { margin-bottom:0px } .f-x1 { } .f-x2 { } .f-x3 { } a:visited { color:#8b0000; text-decoration:underline } .capsub { color:#808080; font-weight:bold; text-transform:uppercase; letter-spacing:2.4px } .rightaligned { margin-left:0px; margin-right:0px; text-align:right; margin-top:0px; margin-bottom:0.1px } .style7 { color:#000; font-style:italic } .footer { color:#808080; font-size:90% } .FWExtra { } .FWExtra a:link { text-decoration: none; } .FWExtra a:active { text-decoration: none; } .FWExtra a:visited { text-decoration: none; } .FWExtra a:hover { text-decoration: underline; } -->
Equi4 Softwaremetakit

top pages

 

Metakit
Tclkit
Starkit
CatFish

 

Soapbox

 

Blog
Musings

Tclers' Wiki
The SAX

Company

 

About
Services
Contact info
Support

 

Site map

Isolating view changes

This is a design overview for isolating MK view changes in such a way that multi-user designs with multiple concurrent transactions can be supported. That's just part of the issue - detecting and resolving conflicting changes on commit is another story.

item2aFirst some visual conventions, used throughout this story. Here is a storage object with open views V1 and V2:

modifications

item6aViews point into read-only memory-mapped file data, therefore changes to a view are "applied" in a special way, by collecting them in a modification area managed by the view. This reflects the fact that changes to V1 are not supposed to be "real" until committed.

Derived views

item9aNow let's create a new view V3, derived from the current (i.e. modified) version of V1 and from V2 (a join, perhaps). On the right, the V3 view is conceptually created by hanging it off the views V1 and V2, but there is a problem with this: changes to V1 are going to interfere with V3.

item10aFor that reason, V1 immediately sets up V3 to point not to itself, but to the current modification buffer. It also keeps track of this decision, and marks M1 as being shared. The result is shown on the left.

additional changes to v1

item11aThe reason for this approach becomes clear when making further changes to V1. Instead of collecting further changes in the M1 buffer, V1 detects that it no longer has exclusive access to M1, and inserts a new M1' buffer to manage new changes.

changes to V2

item12aFor V2, the effect of adding changes is somewhat different, since there is no modification buffer to refer V3 to. Therefore, when changes to V2 are made, a fake V2' is created, acting like an empty modification buffer. See image on the left. One drawback of this design is that it requires V2 to keep track of V3...

Changes to derived views

item13aThis can also accommodate changes to derived views. Evidently, how these are treated on commit, and whether they are even committable is another issue. The effect is shown on the right - and is really not a new situation - it follows from the steps taken for the earlier cases.

None of the above is implemented right now.
This is just some doodling to get started...

metakit index

Intro / News

Overview

Documentation

Licensing

Download

Mailing lists

To-do list

Acknowledgements

Quotes

Links