aivika-distributed-1.5.1: Parallel distributed discrete event simulation module for the Aivika library
CopyrightCopyright (c) 2015-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Distributed.Optimistic.TimeServer

Description

Tested with: GHC 7.10.3

This module allows running the time server that coordinates the global simulation time.

Synopsis

Documentation

data TimeServerParams Source #

The time server parameters.

Constructors

TimeServerParams 

Fields

Instances

Instances details
Generic TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Associated Types

type Rep TimeServerParams :: Type -> Type #

Show TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Binary TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Eq TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Ord TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

type Rep TimeServerParams Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

type Rep TimeServerParams = D1 ('MetaData "TimeServerParams" "Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer" "aivika-distributed-1.5.1-LD6d5nK4AIqDBvGt7m30NF" 'False) (C1 ('MetaCons "TimeServerParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tsLoggingPriority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Priority) :*: (S1 ('MetaSel ('Just "tsName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "tsReceiveTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "tsTimeSyncTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "tsTimeSyncDelay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "tsProcessMonitoringEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "tsProcessMonitoringDelay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "tsProcessReconnectingEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "tsProcessReconnectingDelay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "tsSimulationMonitoringInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "tsSimulationMonitoringTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "tsStrategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TimeServerStrategy))))))

data TimeServerEnv Source #

Those time server environment parameters that cannot be serialized and passed to another process via the net.

Constructors

TimeServerEnv 

Fields

data TimeServerStrategy Source #

The time server strategy.

Constructors

WaitIndefinitelyForLogicalProcess

wait for the logical processes forever

TerminateDueToLogicalProcessTimeout Int

terminate the server due to the exceeded logical process timeout in microseconds, but not less than tsTimeSyncTimeout, which should be applied if the process reconnecting is enabled

UnregisterLogicalProcessDueToTimeout Int

unregister the logical process due to the exceeded timeout in microseconds, but not less than tsTimeSyncTimeout, which can be applied only if the process disconnecting is enabled

Instances

Instances details
Generic TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Associated Types

type Rep TimeServerStrategy :: Type -> Type #

Show TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Binary TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Eq TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

Ord TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

type Rep TimeServerStrategy Source # 
Instance details

Defined in Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer

type Rep TimeServerStrategy = D1 ('MetaData "TimeServerStrategy" "Simulation.Aivika.Distributed.Optimistic.Internal.TimeServer" "aivika-distributed-1.5.1-LD6d5nK4AIqDBvGt7m30NF" 'False) (C1 ('MetaCons "WaitIndefinitelyForLogicalProcess" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TerminateDueToLogicalProcessTimeout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "UnregisterLogicalProcessDueToTimeout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

defaultTimeServerParams :: TimeServerParams Source #

The default time server parameters.

defaultTimeServerEnv :: TimeServerEnv Source #

The default time server environment parameters.

timeServer :: Int -> TimeServerParams -> Process () Source #

Start the time server by the specified initial quorum and parameters. The quorum defines the number of logical processes that must be registered in the time server before the global time synchronization is started.

timeServerWithEnv :: Int -> TimeServerParams -> TimeServerEnv -> Process () Source #

A full version of timeServer that allows specifying the environment parameters.

curryTimeServer :: (Int, TimeServerParams) -> Process () Source #

A curried version of timeServer for starting the time server on remote node.