CMQ, a UDP-based inherently asynchronous message queue to orchestrate messages,
events and processes in the cloud. It trades guarantees, consistency mechanisms,
(shared) state and transactions for robustness, scalability and performance.
CMQ fares especially well in modern Layer 2 switches in data center networks,
as well as in the presence of errors.
Message is pushed to the queue together with a queue identifier (
KEY that specifies the recipient. Messages can be pushed in logarithmic
time and the next message can be retrieved in constant time.
This implementation is based on
- J. Fritsch, C. Walker, CMQ - A lightweight, asynchronous high-performance messaging queue for the cloud (2012).
The queue identifier (Token)
read "192.0.2.1" :: IPv4192.0.2.1
Destination identifier (KEY)
|:: Serialize a|
Socket does not need to be in connected state.
Maximum Queue length in bytes.
Maximum Queue age in ms.
|-> IO (Cmq a)|
Token returned to identify the Queue.
Builds and returns a new instance of Cmq.
(token) <- newRq soc 512 200
Insertion (Push Message)
O(log n). Push a message to the queue.
cwPush soc ("192.168.35.69", 0) ("ping" :: String) token