aivika-distributed-0.1: Parallel distributed simulation library

CopyrightCopyright (c) 2015-2016, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Simulation.Aivika.Distributed.Optimistic.DIO

Description

Tested with: GHC 7.10.3

This module defines DIO as an instance of the MonadDES type class.

Synopsis

Documentation

data DIOParams Source

The parameters for the DIO computation.

Constructors

DIOParams 

Fields

dioLoggingPriority :: Priority

The logging priority

dioUndoableLogSizeThreshold :: Int

The undoable log size threshold used for detecting an overflow

dioOutputMessageQueueSizeThreshold :: Int

The output message queue size threshold used for detecting an overflow

dioSyncTimeout :: Int

The timeout in microseconds used for synchronising the operations.

dioAllowPrematureIO :: Bool

Whether to allow performing the premature IO action; otherwise, raise an error

dioAllowProcessingOutdatedMessage :: Bool

Whether to allow processing an outdated message with the receive time less than the global time

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.

defaultDIOParams :: DIOParams Source

The default parameters for the DIO computation

dioParams :: DIO DIOParams Source

Return the parameters of the current 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.

logDIO :: Priority -> String -> DIO () Source

Log the message with the specified priority.

terminateDIO :: DIO () Source

Terminate the simulation including the processes in all nodes connected to the time server.

unregisterDIO :: DIO () Source

Unregister the simulation process from the time server without affecting the processes in other nodes connected to the corresponding time server.