A new Segment Keeper

A “Snapshot Segment Keeper” is called a SSSK here. There is a SSSKF which is factory which creates new empty SSSK’s.

Orders on a SSSK:

Gimme a Snapshot
Returns a new segment to which on one has write access. Its data is that of the invokee.
Is this one of your RO segs?
Asks whether some other segment was made by such a call to a legitimate snapshot keeper.
Delete Yourself.
Goes away.

Use case 1

A program W wants to inform confined programs of the weather. The weather data structure is too complicated to merely put in a mutable segment that co-confined objects can read. Also W often updates the structure by passing thru invalid states. After W makes a short batch of updates it creates a snapshot and puts the key thereto in a node, a sensory key to which is a component of factories that produce objects that know how to read the data structure and report the current weather. The requestor’s to said factory can be included in factories that make objects that need to know the weather. W deletes snapshots that are a few cycles old.
Problem: The weather reporter must probably survive disappearance of its snapshot and look again for a new one.
Cloud (Ideas perhaps without merit which gradually led to the above)

Idea: for objects that need to provide sensory access to virtual (abstracted) data keep the real data in a segment that can be snapshotted. Then the abstraction savvy code that normally looks at the real data can look at the snapshot. This works well for data structures the change little really for modest virtual changes. There are ample other reasons to prefer such structures.


Suppose a segment keeper that supports a facet with an order: “Return a snapshot segment.”. Suppose a data structure that included an exclusive lock.

idea 1

Suppose the keeper knew where in the segment the lock was.

You could imagine the keeper deferring snapshots while structure was locked. It could, upon conflict, make the page with the lock RO to the holder with segment write access. It could then promptly learn of releasing the lock.

idea 2

The snapshot requestor glance at the lock in the snapshot and discard the snapshot if locked.
I don’t like either of these ideas.