Back to overview

Using First-class Contexts to realize Dynamic Software Updates

Type of publication Peer-reviewed
Publikationsform Proceedings (peer-reviewed)
Publication date 2011
Author Wernli Erwann, Gurtner David, Nierstrasz Oscar,
Project Synchronizing Models and Code
Show all

Proceedings (peer-reviewed)

Title of proceedings International Workshop on Smalltalk Technologies (IWST 2011)

Open Access


Applications that need to be updated but cannot be easily restarted must be updated at run-time. We evaluate the reflective facilities of Smalltalk with respect to dynamic soft- ware and the state-of-the-art in this field. We conclude that while fine for debugging, the existing reflective facilities are not appropriate for dynamically updating production systems under constant load. We propose to enable dynamic updates by introducing first-class contexts as a mechanism to allow multiple versions of objects to coexist. Object states can be dynamically migrated from one context to another, and can be kept in sync with the help of bidirectional transformations. We demonstrate our approach with ActiveContext, an extension of Smalltalk with first-class contexts. ActiveContext eliminates the need for a system to be quiescent for it to be updated. ActiveContext is realized in Pinocchio, an experimental Smalltalk implementation that fully reifies the VM to enable radical extensions. We illustrate dynamic updates in ActiveContext with a typical use case, present initial benchmarks, and discuss future performance improvements.