skip to main content
research-article

Composable asynchronous events

Published:04 June 2011Publication History
Skip Abstract Section

Abstract

Although asynchronous communication is an important feature of many concurrent systems, building composable abstractions that leverage asynchrony is challenging. This is because an asynchronous operation necessarily involves two distinct threads of control -- the thread that initiates the operation, and the thread that discharges it. Existing attempts to marry composability with asynchrony either entail sacrificing performance (by limiting the degree of asynchrony permitted), or modularity (by forcing natural abstraction boundaries to be broken).

In this paper, we present the design and rationale for asynchronous events, an abstraction that enables composable construction of complex asynchronous protocols without sacrificing the benefits of abstraction or performance. Asynchronous events are realized in the context of Concurrent ML's first-class event abstraction. We discuss the definition of a number of useful asynchronous abstractions that can be built on top of asynchronous events (e.g., composable callbacks) and provide a detailed case study of how asynchronous events can be used to substantially improve the modularity and performance of an I/O-intensive highly concurrent server application.

References

  1. Joe Armstrong, Robert Virding, Claes Wikstrom, and Mike Williams. Concurrent Programming in Erlang. Prentice-Hall, 2nd edition, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Jean-Pierre Banâtre and Daniel Le Métayer. Programming by Multiset Transformation. Commun. ACM, 36(1), 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Prakash Chandrasekaran, Christopher L. Conway, Joseph M. Joy, and Sriram K. Rajamani. Programming asynchronous layers with clarity. In FSE, pages 65--74, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Avik Chaudhuri. A Concurrent Ml Library in Concurrent Haskell. In ICFP, pages 269--280, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Erik Demaine. First-Class Communication in MPI. In MPIDC '96: Proceedings of the Second MPI Developers Conference, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Kevin Donnelly and Matthew Fluet. Transactional Events. The Journal of Functional Programming, pages 649--706, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Laura Effinger-Dean, Matthew Kehrt, and Dan Grossman. Transactional Events for ML. In ICFP, pages 103--114, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Matthew Flatt and Robert Bruse Findler. Kill-safe Synchronization Abstractions. In PLDI, pages 47--58, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Matthew Fluet, Mike Rainey, John Reppy, and Adam Shaw. Implicitly-Threaded Parallelism in Manticore. In ICFP, pages 119--130, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cédric Fournet, Fabrice Le Fessant, Luc Maranget, and Alan Schmidt. JoCaml: A Language for Concurrent Distributed and Mobile Programming. In Advanced Functional Programming, pages 129--158. 2002.Google ScholarGoogle Scholar
  11. Cédric Fournet and Georges Gonthier. The reflexive cham and the join-calculus. In POPL, pages 372--385, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Peng Li and Steve Zdancewic. Combining Events and Threads for Scalable Network Services, and Evaluation of Monadic, Application-Level Concurrency Primitives. In PLDI, pages 189--199, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Simon Marlow, Simon Peyton Jones, Andrew Moran, and John Reppy. Asynchronous Exceptions in Haskell. In PLDI, pages 274--285, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. MLton. http://www.mlton.org.Google ScholarGoogle Scholar
  15. John Reppy and Yingqi Xiao. Specialization of CML Message-Passing Primitives. In POPL, pages 315--326, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. John H. Reppy. Concurrent Programming in ML. Cambridge University Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. George Russell. Events in Haskell, and How to Implement Them. In ICFP, pages 157--168, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Don Syme, Adam Granicz, and Antonio Cisternino. Expert F#. Apress, 2007.Google ScholarGoogle Scholar
  19. Lukasz Ziarek, K.C. Sivaramakrishnan, and Suresh Jagannathan. Composable Asynchronous Events. Technical Report TR-11-09, Dept. of Computer Science, Purdue University, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Composable asynchronous events

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 46, Issue 6
        PLDI '11
        June 2011
        652 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1993316
        Issue’s Table of Contents
        • cover image ACM Conferences
          PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2011
          668 pages
          ISBN:9781450306638
          DOI:10.1145/1993498
          • General Chair:
          • Mary Hall,
          • Program Chair:
          • David Padua

        Copyright © 2011 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 June 2011

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!