The remote monad design pattern
Andy Gill, Neil Sculthorpe, Justin Dawson et al. · 2015
Remote Procedure Calls are expensive. This paper demonstrates how to reduce the cost of calling remote procedures from Haskell by using the remote monad design pattern, which amortizes the cost of remote calls. This gives the Haskell community access to remote capabilities that are not directly supported, at a surprisingly inexpensive cost. We explore the remote monad design pattern through six models of remote execution patterns, using a simulated Internet of Things toaster as a running example. We consider the expressiveness and optimizations enabled by each remote execution model, and assess the feasibility of our approach. We then present a full-scale case study: a Haskell library that provides a Foreign Function Interface to the JavaScript Canvas API. Finally, we discuss existing instances of the remote monad design pattern found in Haskell libraries.
Cited by 14 works. doi:10.1145/2804302.2804311
Authors
References
- Design Patterns: Elements of Reusable Object-Oriented Software
- Implementing remote procedure calls
- Computational lambda-calculus and monads
- Comprehending monads
- RPC: Remote Procedure Call Protocol Specification Version 2
- Monad transformers and modular interpreters
- Modular domain specific languages and tools
- Domain specific embedded compilers
- Applicative programming with effects
- Using circular programs to eliminate multiple traversals of data