Distributed Programming in Haskell with Ports

  • Authors:
  • Frank Huch;Ulrich Norbisrath

  • Affiliations:
  • -;-

  • Venue:
  • IFL '00 Selected Papers from the 12th International Workshop on Implementation of Functional Languages
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present an extension of the lazy functional programming language Haskell for distributed programming. For the communication between processes we add a port concept. Ports behave like channels in Concurrent Haskell except that only the process which creates a port can read from it. Ports can also be sent through other ports. The receiver can then also write messages through the received port. This is independent of the location in a network. The programmer uses the same functions to write to local or remote ports. Communication between concurrent and distributed processes is programmed with the same functions. Concurrent processes can easily be distributed, for example to provide scalability of a system. In many distributed applications it is necessary that two independently started programs can connect at runtime. Therefore we provide the registration of ports. Other processes can look them up from anywhere in a network. The implementation consists of a library which provides functions for creating new processes, communication between concurrent and distributed processes, and error handling with exceptions.