Holumbus-MapReduce-0.1.0: a distributed MapReduce frameworkSource codeContentsIndex
Holumbus.Distribution.Messages
Portabilityportable
Stabilityexperimental
MaintainerStefan Schmidt (stefanschmidt@web.de)
Contents
Datatypes
Messages to and from the Master
Messages to and from the Worker
request an response handling
Description
Version : 0.1
Synopsis
type WorkerId = Int
data MasterRequestMessage
= MReqTaskCompleted TaskData
| MReqTaskError TaskData
| MReqStartControlling
| MReqStopControlling
| MReqIsControlling
| MReqSingleStep
| MReqPerformJob JobInfo
| MReqUnknown
data MasterResponseMessage
= MRspSuccess
| MRspIsControlling Bool
| MRspResult JobResult
| MRspError String
| MRspUnknown
data WorkerRequestMessage
= WReqStartTask TaskData
| WReqStopTask TaskId
| WReqStopAllTasks
| WReqGetActionNames
| WReqUnknown
data WorkerResponseMessage
= WRspSuccess
| WRspGetActionNames [ActionName]
| WRspError String
| WRspUnknown
performPortAction :: (Show a, Binary a, Show b, Binary b, RspMsg b) => Port a -> Stream b -> Int -> a -> (b -> IO (Maybe c)) -> IO c
Datatypes
type WorkerId = IntSource
Messages to and from the Master
data MasterRequestMessage Source
Constructors
MReqTaskCompleted TaskData
MReqTaskError TaskData
MReqStartControlling
MReqStopControlling
MReqIsControlling
MReqSingleStep
MReqPerformJob JobInfo
MReqUnknown
show/hide Instances
data MasterResponseMessage Source
Constructors
MRspSuccess
MRspIsControlling Bool
MRspResult JobResult
MRspError String
MRspUnknown
show/hide Instances
Messages to and from the Worker
data WorkerRequestMessage Source
Constructors
WReqStartTask TaskData
WReqStopTask TaskId
WReqStopAllTasks
WReqGetActionNames
WReqUnknown
show/hide Instances
data WorkerResponseMessage Source
Constructors
WRspSuccess
WRspGetActionNames [ActionName]
WRspError String
WRspUnknown
show/hide Instances
request an response handling
performPortActionSource
:: (Show a, Binary a, Show b, Binary b, RspMsg b)
=> Port arequest port
-> Stream bresponse Stream
-> Inttimeout for the response in mikroseconds (1000000 = 1 sec) (0 = wait for ever)
-> arequest message
-> b -> IO (Maybe c)response handler
-> IO c
Sends a request to the server (stream) and handles the response and all error cases. Very helpful when simulating a request response scheme with the mailboxes.
Produced by Haddock version 2.6.1