著者
Scott M. Nettles, Jeannette M. Wing
タイトル
Persistence + Undoability = Transactions
日時
Aug 1991
概要
Persistence means objects live potentially forever. Undoability means that any change to program's store can potentially be undone. In our design and implementation of support for single-threaded nested transactions in standard ML of New Jersey (SML/NJ), we provide persistence and undoability as orthogonal features and combine them in a simple and elegant manner. We provide support for persistence through an SML interface that lets users manipulate a set of persistent roots and provides a save function that causes all data reachable from the persistent roots to be moved into the persistent heap. We implement the interface through simple extensions to SML's generational collector and maintain the persistent heap using CMU's Recoverable Virtual Memory system. We provide support for undoability through an SML interface that exports two functions: checkpoint, which checkpoint the current store, and restore, which undoes all changes made to the previously checkpointed store. The implementation takes advantage of the simple runtime representation of data in SML and, as for persistence, extends the existing garbage collector scheme. SML's "mostly" function nature allows us to implement this abstraction without undue performance penalty. Finally, we combine these capabilities to support single- threaded nested transactions by defining a higher-order function transact that guarantees the permanence of effects of committed transactions. We succinctly define transact completely in terms of the interfaces for persistence and undoability. Unlike other transaction-based programming languages like Argus or Avalon/C*, we need not add new control structures; moreover, we handle aborts of nested or top-level transactions using SML's exception mechanism.
カテゴリ
CMUTR
Category: CMUTR
Institution: Department of Computer Science, Carnegie
        Mellon University
Abstract: Persistence means objects live potentially forever.
        Undoability means that any change to program's store can
        potentially be undone.
        In our design and implementation of support for single-threaded
        nested transactions in standard ML of New Jersey (SML/NJ), we
        provide persistence and undoability as orthogonal features and
        combine them in a simple and elegant manner.
        
        We provide support for persistence through an SML interface 
        that lets users manipulate a set of persistent roots and 
        provides a save function that causes all data reachable from 
        the persistent roots to be moved into the persistent heap.
        We implement the interface through simple extensions to SML's
        generational collector and maintain the persistent heap using
        CMU's Recoverable Virtual Memory system.
        
        We provide support for undoability through an SML interface 
        that exports two functions: checkpoint, which checkpoint the 
        current store, and restore, which undoes all changes made to 
        the previously checkpointed store.
        The implementation takes advantage of the simple runtime 
        representation of data in SML and, as for persistence, extends
        the existing garbage collector scheme.
        SML's "mostly" function nature allows us to implement this 
        abstraction without undue performance penalty.
        
        Finally, we combine these capabilities to support single-
        threaded nested transactions by defining a higher-order
        function transact that guarantees the permanence of effects
        of committed transactions.
        We succinctly define transact completely in terms of the 
        interfaces for persistence and undoability.
        Unlike other transaction-based programming languages like Argus
        or Avalon/C*, we need not add new control structures; moreover,
        we handle aborts of nested or top-level transactions using 
        SML's exception mechanism.
        
        
        
        
        
        
        
Number: CMU-CS-91-173
Bibtype: TechReport
Month: Aug
Author: Scott M. Nettles
        Jeannette M. Wing		
Title: Persistence + Undoability = Transactions
Year: 1991
Address: Pittsburgh, PA
Super: @CMUTR