| Copyright | Copyright (c) 2015-2017 David Sorokin <david.sorokin@gmail.com> | 
|---|---|
| License | BSD3 | 
| Maintainer | David Sorokin <david.sorokin@gmail.com> | 
| Stability | experimental | 
| Safe Haskell | None | 
| Language | Haskell98 | 
Simulation.Aivika.Distributed.Optimistic.DIO
Contents
Description
Tested with: GHC 7.10.3
This module defines DIO as an instance of the MonadDES and EventIOQueueing type classes.
- data DIO a
- data DIOParams = DIOParams {- dioLoggingPriority :: Priority
- dioName :: String
- dioUndoableLogSizeThreshold :: Int
- dioOutputMessageQueueSizeThreshold :: Int
- dioTransientMessageQueueSizeThreshold :: Int
- dioSyncTimeout :: Int
- dioAllowPrematureIO :: Bool
- dioAllowSkippingOutdatedMessage :: Bool
- dioProcessMonitoringEnabled :: Bool
- dioProcessMonitoringDelay :: Int
- dioProcessReconnectingEnabled :: Bool
- dioProcessReconnectingDelay :: Int
- dioKeepAliveInterval :: Int
- dioTimeServerAcknowledgementTimeout :: Int
- dioSimulationMonitoringInterval :: Int
- dioSimulationMonitoringTimeout :: Int
- dioStrategy :: DIOStrategy
 
- data DIOEnv = DIOEnv {}
- data DIOStrategy
- runDIO :: DIO a -> DIOParams -> ProcessId -> Process (ProcessId, Process a)
- runDIOWithEnv :: DIO a -> DIOParams -> DIOEnv -> ProcessId -> Process (ProcessId, Process a)
- defaultDIOParams :: DIOParams
- defaultDIOEnv :: DIOEnv
- dioParams :: DIO DIOParams
- messageInboxId :: DIO ProcessId
- timeServerId :: DIO ProcessId
- logDIO :: Priority -> String -> DIO ()
- terminateDIO :: DIO ()
- registerDIO :: DIO ()
- unregisterDIO :: DIO ()
- monitorProcessDIO :: ProcessId -> DIO ()
- data InboxProcessMessage = MonitorProcessMessage ProcessId
- processMonitorSignal :: Signal DIO ProcessMonitorNotification
Documentation
The distributed computation based on IO.
The parameters for the DIO computation.
Constructors
| DIOParams | |
| Fields 
 | |
Those DIO environment parameters that cannot be serialized and passed to another process via the net.
Constructors
| DIOEnv | |
| Fields 
 | |
data DIOStrategy Source #
The logical process strategy.
Constructors
| WaitIndefinitelyForTimeServer | Wait for the time server forever | 
| TerminateDueToTimeServerTimeout Int | Terminate due to the exceeded time server timeout in microseconds, but not less than  | 
Instances
runDIO :: DIO a -> DIOParams -> ProcessId -> Process (ProcessId, Process a) Source #
Run the computation using the specified parameters along with time server process identifier and return the inbox process identifier and a new simulation process.
runDIOWithEnv :: DIO a -> DIOParams -> DIOEnv -> ProcessId -> Process (ProcessId, Process a) Source #
A full version of runDIO that also allows specifying the environment parameters.
defaultDIOParams :: DIOParams Source #
The default parameters for the DIO computation
defaultDIOEnv :: DIOEnv Source #
The default environment parameters for the DIO computation
messageInboxId :: DIO ProcessId Source #
Return the process identifier of the inbox that receives messages.
timeServerId :: DIO ProcessId Source #
Return the time server process identifier.
terminateDIO :: DIO () Source #
Terminate the simulation including the processes in all nodes connected to the time server.
registerDIO :: DIO () Source #
Register the simulation process in the time server, which requires some initial quorum to start synchronizing the global time.
unregisterDIO :: DIO () Source #
Unregister the simulation process from the time server without affecting the processes in other nodes connected to the corresponding time server.
monitorProcessDIO :: ProcessId -> DIO () Source #
Monitor the specified process.
data InboxProcessMessage Source #
The message destined directly for the inbox process.
Constructors
| MonitorProcessMessage ProcessId | monitor the logical process by its inbox process identifier | 
processMonitorSignal :: Signal DIO ProcessMonitorNotification Source #
A signal triggered when coming the process monitor notification from the Cloud Haskell back-end.