Applying Mutable Object Snapshots to a High-level Object-Oriented Language

Loading...
Thumbnail Image

Date

2018-11-30

Access

Authors

Davis, Matthew C

Journal Title

Journal ISSN

Volume Title

Publisher

East Carolina University

Abstract

Software Engineers are familiar with mutable and immutable object state. Mutable objects shared across modules may lead to unexpected results as changes to the object in one module are visible to other modules sharing the object. When provided a mutable object as input in Java, it is common practice to defensively create a new private copy of the object bearing the same state via cloning, serializing/de-serializing, specialized object constructor, or third-party library. No universal approach exists for all scenarios and each common solution has well-known problems. This research explores the applicability of concepts within the Computer Engineering storage field related to snapshots. This exploration results in a simplified method of memory snapshotting implemented within OpenJDK 10. A novel runtime-managed method is proposed for declaring intent for object state to be unshared within the method signature. Preliminary experiments evaluate the attributes of this approach. A path for future research is proposed, including differential snapshots, alternative block sizes, improving performance, and exploring a tree of snapshots as a foundation to reason about changes to object state over time.

Description

Citation

DOI