Holumbus-Distribution-0.1.1: intra- and inter-program communication

MaintainerStefan Schmidt (stefanschmidt@web.de)




Version : 0.1

This module offers the distrubted value datatype.

A DValue is like a distributed MVar, but is can only be set once on the local node. If the value is set, it cannot be changed any more.

I don't know if this is useful at all, so the implementation is not quite finished an some things could be improved.



data DValue a Source

creating and closing a DValue

newDValue :: Binary a => String -> a -> IO (DValue a)Source

Creates new DValue on the local DNode. The first parameter is the name of the value which could be used in other processes to access this stream. If you leave it empty, a random Id will be created.

newRemoteDValue :: String -> String -> IO (DValue a)Source

Creates a new DValue. The first parameter is the name of the resource and the second one the name of the node.

closeDValue :: DValue a -> IO ()Source

Closes a DValue.

access a DValue

getDValue :: Binary a => DValue a -> IO (Maybe a)Source

Gets value. It will only access the network on the first time and my throw an exception. It returns always (Just a) but this may change in the future, so the type sticks to (Maybe a)