raketka-1.1.2: distributed-process node

Safe HaskellNone
LanguageHaskell2010

Control.Distributed.Raketka.Type.Arg

Description

see also

https://hackage.haskell.org/package/parconc-examples

http://haskell-distributed.github.io/tutorials/1ch.html

This library:

  • has basic working code to enable to start nodes and to connect them with each other
  • may be extended however you are most likely to write your own code that does much more
  • is simple on purpose
  • exchanges pings with other nodes which are expected to pong back
  • both pings & pongs are output to stdout
  • when a node disconnects or stops, the other nodes stdout notifications about this

How to use the program that comes with this library:

start the same program in multiple consoles: 1 per node

pass 2 args:

  1. path to config.json (see enclosed test-conf.json)
  2. idx of this node in the cluster: 0 .. (length Cluster -1)
>>> ./raketka ./test-conf.json 0

stop (ctrl-C) any nodes, see notifications in live consoles

Synopsis

Documentation

data ServerId Source #

one node

Constructors

ServerId 

Fields

  • host :: String

    e.g. localhost or 127.0.0.1

  • port :: Int

    for node communication

  • service :: String

    channel type: choose any string. Use same type for connected nodes or different types for multiple disconnected clusters

Instances
Show ServerId Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Generic ServerId Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Associated Types

type Rep ServerId :: * -> * #

Methods

from :: ServerId -> Rep ServerId x #

to :: Rep ServerId x -> ServerId #

FromJSON ServerId Source #

to read conf

Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Binary ServerId Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Methods

put :: ServerId -> Put #

get :: Get ServerId #

putList :: [ServerId] -> Put #

type Rep ServerId Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

type Rep ServerId = D1 (MetaData "ServerId" "Control.Distributed.Raketka.Type.Arg" "raketka-1.1.2-IZQHFJ57ILoJVdh9CvR8fh" False) (C1 (MetaCons "ServerId" PrefixI True) (S1 (MetaSel (Just "host") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Just "port") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "service") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))

data Cluster Source #

config file structure

Constructors

Cluster [ServerId] 
Instances
Show Cluster Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Generic Cluster Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

Associated Types

type Rep Cluster :: * -> * #

Methods

from :: Cluster -> Rep Cluster x #

to :: Rep Cluster x -> Cluster #

FromJSON Cluster Source #

to read conf

Instance details

Defined in Control.Distributed.Raketka.Type.Arg

type Rep Cluster Source # 
Instance details

Defined in Control.Distributed.Raketka.Type.Arg

type Rep Cluster = D1 (MetaData "Cluster" "Control.Distributed.Raketka.Type.Arg" "raketka-1.1.2-IZQHFJ57ILoJVdh9CvR8fh" False) (C1 (MetaCons "Cluster" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ServerId])))