Copyright | (c) Tim Watson 2013 - 2014 |
---|---|
License | BSD3 (see the file LICENSE) |
Maintainer | Tim Watson <[email protected]> |
Stability | experimental |
Portability | non-portable (requires concurrency) |
Safe Haskell | None |
Language | Haskell2010 |
Control.Distributed.Process.Execution
Description
- Inter-Process Traffic Management
The Execution Framework provides tools for load regulation, workload shedding and remote hand-off. The currently implementation provides only a subset of the plumbing required, comprising tools for event management, mailbox buffering and message routing.
Synopsis
- statistics :: Mailbox -> Process MailboxStats
- active :: Mailbox -> Filter -> Process ()
- data BufferType
- data Delivery = Delivery {}
- type Limit = Integer
- data Mailbox
- monitor :: Mailbox -> Process MonitorRef
- deliver :: Mailbox -> Process ()
- __remoteTable :: RemoteTable -> RemoteTable
- data FilterResult
- notify :: Mailbox -> Process ()
- startMailbox :: ProcessId -> BufferType -> Limit -> Process Mailbox
- startSupervisedMailbox :: ProcessId -> BufferType -> Limit -> SupervisorPid -> Process Mailbox
- createMailbox :: BufferType -> Limit -> Process Mailbox
- resize :: Mailbox -> Integer -> Process ()
- data MailboxStats = MailboxStats {}
- data NewMail = NewMail !Mailbox !Integer
- acceptEverything :: Closure (Message -> Process FilterResult)
- acceptMatching :: Closure (Closure (Message -> Process FilterResult) -> Message -> Process FilterResult)
- data Message = Message {}
- createMessage :: Serializable m => String -> [(String, String)] -> m -> Message
- data ExchangeType s = ExchangeType {}
- post :: Serializable a => Exchange -> a -> Process ()
- data Exchange
- startSupervisedRef :: ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
- broadcastExchange :: Process Exchange
- broadcastExchangeT :: Process BroadcastExchange
- broadcastClient :: Exchange -> Process (InputStream Message)
- startExchange :: ExchangeType s -> Process Exchange
- runExchange :: ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
- postMessage :: Exchange -> Message -> Process ()
- configureExchange :: Serializable m => Exchange -> m -> Process ()
- bindToBroadcaster :: Exchange -> Process ()
- type BroadcastExchange = ExchangeType BroadcastEx
- type HeaderName = String
- data Binding
- = BindKey {
- bindingKey :: !String
- | BindHeader {
- bindingKey :: !String
- headerName :: !HeaderName
- | BindNone
- = BindKey {
- class (Hashable k, Eq k, Serializable k) => Bindable k
- type BindingSelector k = Message -> Process k
- data RelayType
- router :: Bindable k => RelayType -> BindingSelector k -> Process Exchange
- supervisedRouter :: Bindable k => RelayType -> BindingSelector k -> SupervisorPid -> Process Exchange
- route :: Serializable m => Exchange -> m -> Process ()
- routeMessage :: Exchange -> Message -> Process ()
- messageKeyRouter :: RelayType -> Process Exchange
- bindKey :: String -> Exchange -> Process ()
- headerContentRouter :: RelayType -> HeaderName -> Process Exchange
- bindHeader :: HeaderName -> String -> Exchange -> Process ()
- applyHandlers :: a -> Message -> [Message -> Process (Maybe a)] -> Process a
Mailbox Buffering
statistics :: Mailbox -> Process MailboxStats Source #
Obtain statistics (from/to anywhere) about a mailbox.
active :: Mailbox -> Filter -> Process () Source #
Instructs the mailbox to send a Delivery
as soon as any mail is
available, or immediately (if the buffer already contains data).
NB: signals are only delivered to the mailbox's owning process.
data BufferType Source #
Describes the different types of buffer.
Constructors
Queue | FIFO buffer, limiter drops the eldest message (queue head) |
Stack | unordered buffer, limiter drops the newest (top) message |
Ring | FIFO buffer, limiter refuses (i.e., drops) new messages |
Instances
Show BufferType Source # | |
Defined in Control.Distributed.Process.Execution.Mailbox Methods showsPrec :: Int -> BufferType -> ShowS # show :: BufferType -> String # showList :: [BufferType] -> ShowS # | |
Eq BufferType Source # | |
Mail delivery.
Constructors
Delivery | |
Instances
Represents the maximum number of messages the internal buffer can hold.
Opaque handle to a mailbox.
Instances
Binary Mailbox Source # | |
Addressable Mailbox Source # | |
Linkable Mailbox Source # | |
Resolvable Mailbox Source # | |
Routable Mailbox Source # | |
Defined in Control.Distributed.Process.Execution.Mailbox Methods sendTo :: (Serializable m, Resolvable Mailbox) => Mailbox -> m -> Process () # unsafeSendTo :: (NFSerializable m, Resolvable Mailbox) => Mailbox -> m -> Process () # | |
Generic Mailbox Source # | |
Show Mailbox Source # | |