Abstract
We present a graph-based approach to the definition and creation of process topologies in the parallel Haskell extension Eden. Grace (Graph-based communication in Eden) allows the programmer to specify a network of processes as a graph, where the graph nodes represent processes and the edges represent communication channels. This simplifies the specification and creation of complex communication topologies. The main benefit of the Grace approach is the clean separation between coordination and computation. A special problem is the maintenance of type-safety. Runtime experiments show that Grace has a marginal overhead in comparison with traditional Eden code.
Similar content being viewed by others
Notes
The alternative of creating a channel somewhere else, e.g. in the sender process, would involve allowing the receiver’s end of the channel to be passed around several processes, thus making it a moving target for data to be sent. Guaranteeing lossless transmissions and the (intended) direct connection property of channels would entail a large overhead.
References
Armstrong, J., Virding, R., Williams, M., Wikstrom, C.: Concurrent programming in Erlang. Prentice Hall, Hertfordshire (1996)
Berthold, J., Dieterle, M., Loogen, R., Priebe, S.: Hierarchical master-worker skeletons. In: Hudak, P., Warren, D.S. (eds.) Practical aspects of declarative languages, PADL 2008, pp. 248–264. Springer, Heidelberg (2008)
Berthold, J., Loogen, R.: Skeletons for recursively unfolding process topologies. In: Joubert, G.R., Nagel, W.E., Peters, F.J., Plata, O.G., Tirado, P., Zapata, E.L. (eds.) PARCO, John von Neumann institute for computing series, vol. 33, pp. 835–842. Central Institute for Applied Mathematics, Jülich, Germany (2005)
Dieterle, M., Horstmeyer, T., Loogen, R.: Skeleton composition using remote data. In: Carro, R., Peña, M. (eds.) Practical aspects of declarative languages, 12th International Symposium, PADL 2010, pp. 73–87. Springer, Heidelberg (2010)
Epstein, J., Black, A., Peyton Jones, S.: Towards Haskell in the Cloud. In: Proceedings of the 4th ACM SIGPLAN Symposium on Haskell, Haskell 2011, pp. 118–129. ACM, New York (2011)
Grelck, C., Scholz, S.B., Shafarenko, A.: A gentle introduction to S-Net: typed stream processing and declarative coordination of asynchronous components. Parallel processing letters 18(2), 221–237 (2008)
Hammond, K.: Exploiting purely functional programming to obtain bounded resource behaviour: the Hume approach. First Central European Summer School, CEFP 2005, Budapest, Hungary, July 4–15, 2005, Revised Selected Lectures, pp. 100–134. Springer, Heidelberg (2006)
Hammond, K., Michaelson, G.: Hume: a domain-specific language for real-time embedded systems. Proceedings of the 2nd international conference on Generative programming and component engineering, GPCE ’03, pp. 37–56. Springer, Heidelberg (2003)
Horstmeyer, T., Loogen, R.: Graph-based communication in Eden. In: Trends in functional programming, vol. 10, pp. 1–16. Intellect, Bristol (2009)
Kahn, G., McQueen, D.B.: Coroutines and networks of parallel processes. IFIP 77, pp. 993–998. North Holland, Amsterdam (1977)
Kiselyov, O.: How to write an instance for not-a-function. http://okmij.org/ftp/Haskell/typecast.html#is-function-type. 25 Nov. 2008
Kiselyov, O., Lämmel, R., Schupke, K.: Strongly typed heterogeneous collections. Technical report. SEN-E0420, CWI, Amsterdam (2004)
Läufer, K.: Type classes with existential types. J. Funct. Prog. 6(3), 485–517 (1996)
Loogen, R.: Eden – parallel functional programming with Haskell. Proceedings of the 4th summer school conference on Central European Functional Programming School, CEFP’11, pp. 142–206. Springer, Heidelberg (2012)
Loogen, R., Ortega-Mallén, Y., Peña, R., Priebe, S., Rubio, F.: Parallelism Abstractions in Eden. Patterns and Skeletons for Parallel and Distributed Computing. Springer, Heidelberg (2003)
Loogen, R., Ortega-Mallén, Y., Peña-Marí, R.: Parallel functional programming in Eden. J. Funct. Progr. 15(3), 431–475 (2005)
Maier, P.: Implementing a high-level distributed-memory parallel Haskell in Haskell. Proceedings of the 23rd International Conference on Implementation and Application of Functional Languages, IFL’11, pp. 35–50. Springer, Heidelberg (2012)
Marlow, S., Maier, P., Loidl, H.W., Aswad, M.K., Trinder, P.: Seq no More: Better Strategies for Parallel Haskell. In: Proceedings of the Third ACM Haskell Symposium on Haskell, Haskell ’10, pp. 91–102. ACM, New York (2011)
Marlow, S., Newton, R., Jones, S.L.P.: A Monad for Deterministic Parallelism. In: Proceedings of the 4th ACM SIGPLAN Symposium on Haskell, Haskell 2011, pp. 71–82. ACM, New York (2011)
Peyton Jones, S., et al.: Haskell 98: A non-strict, purely functional language. Technical report (1999). URL http://haskell.org/definition/haskell98-report.ps.gz
Reisig, W.: Elements of distributed algorithms: modeling and analysis with Petri Nets. Springer, Heidelberg (1998)
Sheard, T., Jones, S.P.: Template meta-programming for Haskell. SIGPLAN Not. 37(12), 60–75 (2002)
Sleep, M.R., Plasmeijer, M.J., Eekelen, M.C.J.D. (eds.): Term graph rewriting: theory and practice. John Wiley and Sons Ltd., Hoboken (1993)
Sulzmann, M., Duck, G.J., Peyton Jones, S., Stuckey, P.J.: Understanding functional dependencies via constraint handling rules. J. Funct. Progr. 17(1), 83–129 (2007)
Trinder, P., Hammond, K., Loidl, H.W., Peyton Jones, S.: Algorithm + strategy = parallelism. J. Funct. Progr. 8(1), 23–60 (1998)
Wagar, B.: Hyperquicksort - a fast sorting algorithm for hypercubes. In: M.T. Heath (ed.) Hypercube Multiprocessors 1987 (Proceedings of the Second Conference on Hypercube Multiprocessors), pp. 292–299. SIAM, Philadelphia (1986)
Acknowledgments
We are grateful to Mischa Dieterle and Jost Berthold for their continuing support of our work. Additionally, our thanks go to the anonymous reviewers for their instructive comments that helped us to improve our paper.
Author information
Authors and Affiliations
Corresponding author
Additional information
This paper is an extended and revised version of [9].
Appendix
Appendix
1.1 Source code of the network checking function
Rights and permissions
About this article
Cite this article
Horstmeyer, T., Loogen, R. Graph-based communication in Eden. Higher-Order Symb Comput 26, 3–28 (2013). https://doi.org/10.1007/s10990-014-9101-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-014-9101-y