stack-network-0.1.0.1: A program for extending Stack to add distributed capabilities

Copyright(c) 2018 Sean McGroarty
LicenseBSD3
MaintainerSean McGroarty <mcgroas@tcd.ie.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Distributed.Process

Description

 

Synopsis

Documentation

runRequestNode Source #

Arguments

:: Int

Number of slave nodes the master should wait for

-> NetworkConfig 
-> IO () 

Runs a Process that is a master Node

runRequestNode' :: NetProc () Source #

Internal for master Node

joinNetwork :: NetworkConfig -> IO () Source #

Creates the Backend and runs a Process that is a slave Node

joinNetwork' :: Process () Source #

Internal for slave Node

findPids :: (MonadMask m, MonadProcess m, MonadReader AppConfig m) => m [ProcessId] Source #

Internal function used to gather ProcessId's

gatherDeps :: (MonadProcess m, MonadMask m) => Network -> m [ProcessDeps] Source #

Internal function used to get all slaves dependencies

receiveF :: MonadProcess m => ReceivePort Transfer -> m () Source #

Internal function used to reveive the Transfer

withTransfer Source #

Arguments

:: (Exception e, MonadProcess m, MonadCatch m) 
=> [ProcessDeps]

Slaves process dependencies

-> Deps

Masters dependencies

-> (e -> m ())

Recovery function

-> (ProcessId -> (SendPort Transfer, ReceivePort Transfer) -> m ())

Action to execute with the linked process and typed-channel

-> m () 

Faciliaties a safe Transfer bewteen nodes