#542 new todo (wontfix)

implement mutation guard

Reported by: Ichthyostega Owned by:
Priority: normal Milestone: 0integration
Component: lumieraSteam Keywords: sanity data
Sub Tickets: #539, #687 Parent Tickets: #409, #540, #559

Description (last modified by Ichthyostega)

An idea from ongoing development, noted for later...

We are moving towards an architecture, where direct manipulation of session data is no longer allowed; any changes have to pass through a logging mechanism and record an Action.

Thus it seemed conceivable to use diagnostic facility allowing to detect mutations, which bypass the canonical access path.

Change history (8)

comment:1 by Ichthyostega, at 2010-03-05T00:09:12Z

blocking: 540540, 559

comment:2 by Ichthyostega, at 2010-10-18T01:13:12Z

blockedby: 539539, 687

comment:3 by Ichthyostega, at 2014-10-19T01:17:19Z

how is this going to work? seems relevant when discussing thread safety in the context of the GUI event thread.

In 2010, I left an implementation sketch on the session interface page of the TiddlyWiki

  • change the MObjectRef to return only const references
  • have a mutation enabled subclass
  • this opens a wormhole to check for a mutation token
  • someone up the callstack must have placed such a mutation allowance token into thread local storage
  • the proc command dispatcher does this by default

thus, given a conventional threading environment, this guard mechanism would work transparently for the user. It would not work if we ever decide to invoke session mutations from rendering jobs (which perform in a thread pool based, actor-like environment).

comment:4 by Ichthyostega, at 2014-10-19T01:33:22Z

blocking: 540, 559409, 540, 559

comment:5 by Ichthyostega, at 2022-10-02T19:07:28Z

Description: modified (diff)
Owner: Ichthyostega removed

comment:6 by Ichthyostega, at 2022-10-02T19:09:38Z

This approach looks questionable.
In a low-level language, direct access to data can never be prevented, and any solution would have to rely on further infrastructure for instrumentation, which is either heavyweight, or leaves lots of loopholes to bypass.

Thus: rather keep the architecture straight and wait if we have to face actual problems of this kind

comment:7 by Ichthyostega, at 2022-10-02T19:09:53Z

Resolution: wontfix
Status: assignedclosed

comment:8 by Undercover Agent, at 2025-12-25T00:00:00Z

blockedby: 539, 687
blocking: 409, 540, 559
Parent Tickets: 409, 540, 559
Sub Tickets: 539, 687

Migration MasterTickets ⟼ Subtickets-plugin

Note: See TracTickets for help on using tickets.