Processes and message-passing
The maze of packages around Cloud Haskell may seem daunting. But to get started, we really need just two packages: distributed-process
and distributed-process-simplelocalnet
. The former package implements the core features of Cloud Haskell: nodes, processes, serialization, and message-passing. In particular, it doesn't provide any implementation for communication between nodes. That's what the latter package is for.
Cloud Haskell is modular in its communication layer. The distributed-process-simplelocalnet
package provides simple, zero-configuration networking for Cloud Haskell nodes. It uses UDP broadcasting for node discovery, which is adequate for our testing purposes in this section. So let's get started. At the time of writing, distributed-process version 0.6.4 is the newest, so we'll be using that:
stack install --resolver lts-6.7 distributed-process distributed-process-simplelocalnet
The most important Cloud Haskell concept and type...