patterns-0.1.1: Common patterns in message-oriented applications

Portabilitynon-portable
Stabilityexperimental
Safe HaskellNone

Network.Mom.Patterns.Broker.Common

Description

Majordomo common definitions

Synopsis

Documentation

mdpC01 :: ByteStringSource

Majordomo protocol client/worker version 1

mdpW01 :: ByteStringSource

Majordomo protocol client/worker version 1

xReady :: ByteStringSource

Message types (ready, request, reply, heartbeat, disconnect)

xDisc :: ByteStringSource

Message types (ready, request, reply, heartbeat, disconnect)

xHeartBeat :: ByteStringSource

Message types (ready, request, reply, heartbeat, disconnect)

xReply :: ByteStringSource

Message types (ready, request, reply, heartbeat, disconnect)

xRequest :: ByteStringSource

Message types (ready, request, reply, heartbeat, disconnect)

type ServiceName = StringSource

Service name

mmiHdr :: ByteStringSource

Majordomo Management Interface (MMI) - "mmi.service"

mmiSrv :: ByteStringSource

Majordomo Management Interface (MMI) - "mmi.service"

mmiFound :: ByteStringSource

Majordomo Management Interface -- responses: Found ("200"), NotFound ("404"), NotImplemented ("501")

mmiNimpl :: ByteStringSource

Majordomo Management Interface -- responses: Found ("200"), NotFound ("404"), NotImplemented ("501")

mmiNotFound :: ByteStringSource

Majordomo Management Interface -- responses: Found ("200"), NotFound ("404"), NotImplemented ("501")

mdpCSndReq :: ServiceName -> Conduit ByteString ()Source

Client -> Broker: send request

mdpCRcvReq :: Conduit o (Identity, ByteString)Source

Client -> Broker: receive request

mdpCSndRep :: ByteString -> [Identity] -> Conduit ByteString ()Source

Broker -> Client: send reply

mdpCRcvRep :: ServiceName -> Conduit ByteString ()Source

Broker -> Client: receive reply

mdpWSndReq :: Identity -> [Identity] -> Conduit ByteString ()Source

Broker -> Server: send request

mdpWRcvReq :: Conduit o WFrameSource

Broker -> Server: receive request

mdpWSndRep :: [Identity] -> Conduit ByteString ()Source

Server -> Broker: send reply

mdpWRcvRep :: Conduit o WFrameSource

Server -> Broker: receive reply

mdpWBeat :: Conduit ByteString ()Source

Broker <-> Server: send heartbeat

mdpWConnect :: ServiceName -> SourceSource

Server -> Broker: send connect request (ready)

mdpWDisconnect :: SourceSource

Server -> Broker: disconnect

mdpWBrkDisc :: Identity -> SourceSource

Broker -> Server: disconnect

data WFrame Source

Broker / Server protocol: Heartbeat, Ready, Reply, Request, Disconnect

Instances

data FrameType Source

Worker Frame Type

frameType :: Conduit o FrameTypeSource

Get frame type

empty :: Conduit o ()Source

Get empty segment

chunk :: ByteString -> String -> Conduit o ()Source

Check segment contents

getChunk :: Conduit o ByteStringSource

Get segment contents

identity :: Conduit o IdentitySource

Get identity

envelope :: Conduit o [Identity]Source

Get block of identities (envelope)

toIs :: [Identity] -> [ByteString]Source

Create envelope [(identity, B.empty)]

data MDPException Source

MDP Exception

Constructors

ServerExc String

Server-side exception

ClientExc String

Client-side exception

BrokerExc String

Broker exception

MDPExc String

Generic Protocol

MMIExc String

MMI Protocol