User-level transactional programming in Haskell

  • Authors:
  • Peter Thiemann

  • Affiliations:
  • Universität Freiburg

  • Venue:
  • Proceedings of the 2006 ACM SIGPLAN workshop on Haskell
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Correct handling of concurrently accessed external resources is a demanding problem in programming. The standard approaches rely on database transactions or concurrency mechanisms like locks. The paper considers two such resources, global variables and databases, and defines transactional APIs for them in Haskell. The APIs provide a novel flavor of user-level transactions which are particularly suitable in the context of web-based systems. This suitability is demonstrated by providing a second implementation in the context of WASH, a Haskell-based Web programming system. The underlying implementation framework works for both kinds of resources and can serve as a blueprint for further implementations of user-level transactions. The Haskell type system provides an encapsulation of the transactional scope that avoids unintended breakage of the transactional guarantees.