Changes between Version 1 and Version 2 of Session2


Ignore:
Timestamp:
Sep 30, 2015, 10:39:15 PM (10 years ago)
Author:
Greg Couch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Session2

    v1 v2  
    77From the developer side, we can distinguish a couple different types of data. Some data are the same for all sessions; for example, start-up preferences and the list of installed tools. Some data are different for different sessions; for example, the list of _active_ tools and the currently opened data files. Let's call the former "initial data" and the latter "session data". Chimera2's "state of the session" consists only of "session data". This means that if the user (a) saves a session, and then (b) changes his start-up preference (e.g., background color) and it was not explicitly overridden in a session (e.g., by changing the background color), then (c) on resumption, the session will use the new background color. Clearly, this may be unexpected for the user. We will need to define what data normally defined by "initial data" that should always be saved as "session data" so that these surprises are minimized. (The answer is not "all of them" because clearly the list of installed tools may change, and additions and deletions cannot be ignored.)
    88
    9 Chimear2 data can be categorized as raw data, GUI data, and organizational data.
    10 
    11 All session state is accessible via a Session object.  The session object has a registry of which of its attributes contain savable state and conform to the State API.  Typically, nested data uses the same State API for its data.
     9(Chimera2 data can be categorized as raw data, GUI data, and organizational data. Expound.)
    1210
    1311== The Problem ==
     
    1513Ideally, when restoring a session, all data that is referenced by some other data has already been restored.  So the all of dependencies need to be known by the saving code and there can be no circular dependencies.  This avoids two-phase initialization, which is especially important for C++ objects.
    1614
    17 === Example ===
     15=== Where is Session State? ===
    1816
     17All session state is accessible via a Session object.  The session object has a registry of which of its attributes contain savable state and conform to the State API.  Attributes that may contain nested data, and that data can use the same State API.
    1918
     19=== Examples of State ===
    2020
    21 == The Solution? ==
     21Session attributes:
     22* open models
     23* open tools
     24* running tasks
     25* scenes
     26* user colors
     27* user colormaps
     28* view (camera, lighting, clipping, etc.)
     29* selections (TODO)
     30
     31Nested data:
     32* Tool GUI state
     33* molecules: atoms/bonds/residues & graphical state
     34* pseudobonds
     35* surfaces
     36* generic 3D graphics (e.g. STL)
     37* atom/bond annotations
     38
     39Note that "tool" state may be in a session attribute rather than in the GUI instance.
     40
     41=== Issues ===
     42
     43* How to give dependencies for ordering session data?
     44* What is the granularity?
     45* Can we guarantee non-circular references?