skip to main content
article

Composable network stacks and remote monads

Published:07 September 2017Publication History
Skip Abstract Section

Abstract

Monads and applicative functors are two ways that Haskell programmers bundle effectful primitives into effectful program fragments. In this paper, we investigate using monads and applicative functors to bundle remote effectful primitives, specifically aiming to amortize the cost of remote communications using bundling. We look at several ways of maximizing the bundling of primitives, drawing from the remote monad design pattern and Haxl system, and provide a taxonomy of mechanism for amortization, with examples. The result of this investigation is that monadic fragments can be efficiently bundled into packets, almost for free, when given a user-supplied packet transportation mechanism, and the primitives obey some simple pre- and post-conditions.

References

  1. Peter Achten and Rinus Plasmeijer. 1995. Concurrent interactive processes in a pure functional language. In Proceedings Computing Science in the Netherlands, CSN, Vol. 95. 27–28.Google ScholarGoogle Scholar
  2. Heinrich Apfelmus. 2010. The Operational Monad Tutorial. The Monad.Reader 15 (2010), 37–55.Google ScholarGoogle Scholar
  3. Paolo Capriotti and Ambrus Kaposi. 2014. Free applicative functors. arXiv preprint arXiv:1403.0749 (2014).Google ScholarGoogle Scholar
  4. Manuel MT Chakravarty, Gabriele Keller, Sean Lee, Trevor L McDonell, and Vinod Grover. 2011. Accelerating Haskell array codes with multicore GPUs. In Proceedings of the sixth workshop on Declarative aspects of multicore programming. ACM, 3–14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Conal Elliott, Sigbjørn Finne, and Oege de Moor. 2003. Compiling Embedded Languages. Journal of Functional Programming 13, 3 (2003), 455–481. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jeff Epstein, Andrew P Black, and Simon Peyton Jones. 2011. Towards Haskell in the cloud. In Haskell Symposium. 118–129. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jeremy Gibbons. 2016. Free Delivery (functional pearl). In Haskell Symposium. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Andy Gill. 2014. Domain-specific languages and code synthesis using Haskell. Queue 12, 4 (2014), 30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Andy Gill, Neil Sculthorpe, Justin Dawson, Aleksander Eskilson, Andrew Farmer, Mark Grebe, Jeffrey Rosenbluth, Ryan Scott, and James Stanton. 2015. The Remote Monad Design Pattern. In Proceedings of the 8th ACM SIGPLAN Symposium on Haskell. ACM, New York, NY, USA, 59–70. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Mark Grebe and Andy Gill. 2016. Haskino: A Remote Monad for Programming the Arduino. In Practical Aspects of Declarative Languages. Springer, 153–168.Google ScholarGoogle Scholar
  11. Mark Grebe and Andy Gill. 2016. Threading the Arduino with Haskell. In Trends in Functional Programming. Springer.Google ScholarGoogle Scholar
  12. Philipp Haller and Heather Miller. 2016. Distributed Programming via Safe Closure Passing. arXiv preprint arXiv:1602.03598 (2016).Google ScholarGoogle Scholar
  13. Paul Hudak. 1998. Modular Domain Specific Languages and Tools. In International Conference on Software Reuse. IEEE Press, 134–142. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Oleg Kiselyov. 2016. Semi-implicit batched remote code execution as staging. Technical Report. http://okmij.org/ftp/meta-future/Google ScholarGoogle Scholar
  15. Saunders Mac Lane. 1978. Categories for the working mathematician Vol. 5. Springer Science & Business Media.Google ScholarGoogle Scholar
  16. Daan Leijen and Erik Meijer. 1999. Domain Specific Embedded Compilers. In Conference on Domain-Specific Languages. ACM, 109–122. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jason Maassen, Rob Van Nieuwpoort, Ronald Veldema, Henri Bal, Thilo Kielmann, Ceriel Jacobs, and Rutger Hofman. 2001. Efficient Java RMI for parallel programming. ACM Transactions on Programming Languages and Systems 23, 6 (2001), 747–775. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Simon Marlow, Louis Brandy, Jonathan Coens, and Jon Purdy. 2014. There is No Fork: An Abstraction for Efficient, Concurrent, and Concise Data Access. In International Conference on Functional Programming. ACM, 325–337. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Heather Miller, Philipp Haller, and Martin Odersky. 2014. Spores: A type-based foundation for closures in the age of concurrency and distribution. In European Conference on Object-Oriented Programming. Springer, 308–333. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Eugenio Moggi. 1991. Notions of Computation and Monads. Information and Computation 93, 1 (1991), 55–92. citeseer.nj.nec.com/moggi89notions.html Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. 2006. Simple unification-based type inference for GADTs. In ICFP ’06: Proceedings of the eleventh ACM SIGPLAN International Conference on Functional Programming. ACM, New York, NY, USA, 50–61. DOI: Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Esmond Pitt and Kathy McNiff. 2001. Java. rmi: The Remote Method Invocation Guide. Addison-Wesley Longman Publishing Co., Inc. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Brian Rabern. 2016. The History of the Use of {{.}}-Notation in Natural Language Semantics. Semantics and Pragmatics 9, 12 (2016).Google ScholarGoogle Scholar
  24. Wouter Swierstra. 2008. Data types à la carte. Journal of functional programming 18, 04 (2008), 423–436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Arie Van Deursen, Paul Klint, and Joost Visser. 2000. Domain-Specific Languages: An Annotated Bibliography. Sigplan Notices 35, 6 (2000), 26–36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Arjen Van Weelden and Rinus Plasmeijer. 2002. Towards a strongly typed functional operating system. In Symposium on Implementation and Application of Functional Languages. Springer, 215–231. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Wadler. 1997. How to declare an imperative. Comput. Surveys 29, 3 (1997), 240–263. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Composable network stacks and remote monads

      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 52, Issue 10
        Haskell '17
        October 2017
        211 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3156695
        • Editor:
        • Andy Gill
        Issue’s Table of Contents
        • cover image ACM Conferences
          Haskell 2017: Proceedings of the 10th ACM SIGPLAN International Symposium on Haskell
          September 2017
          211 pages
          ISBN:9781450351829
          DOI:10.1145/3122955

        Copyright © 2017 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 7 September 2017

        Check for updates

        Author Tags

        Qualifiers

        • 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!