sponsors
usenix conference policies
Writing Data-Centric Concurrent Programs in Imperative Languages
Russell Sears and Christopher Douglas, Yahoo! Research
Declarative languages have been proposed for use in concurrent and distributed system development. In this work, we argue that the primary benefits of such languages come not from their declarative nature, but instead from the design patterns they espouse.
We explain how to apply these design patterns to C and Java and present two examples: a highly concurrent transactional storage system and a distributed storage implementation. We use case studies to highlight problems in current imperative and declarative approaches.
Compared to conventional imperative approaches, the additional rigor imposed by our approach improves testability and enables a wider range of systematic optimization and parallelization techniques. We inherit these properties from the declarative languages we mimic. The resulting implementations are structured as programs in those languages would be: they consist of view maintenance routines and asynchronous event handlers.
However, our use of manually generated code allows us to leverage the full range of imperative programming techniques. In particular, performance constraints sometimes force us to use techniques such as deadlock avoidance, invariant weakening, and lock-free updates. Such techniques are unavailable in current declarative runtimes; their correctness requires reasoning beyond the capabilities of current software synthesis systems.
Over time we expect higher level languages to improve dramatically, and we hope that some of our techniques will inform their designs. However, our concerns are more immediate: one of our systems is already in production, and development of the other is underway.
Open Access Media
USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.
title = {Writing {Data-Centric} Concurrent Programs in Imperative Languages},
year = {2012},
address = {Berkeley, CA},
publisher = {USENIX Association},
month = jun
}
connect with us