From 4b22105bd1fe641f2b0ad969a08f9dc243ae9cb2 Mon Sep 17 00:00:00 2001 From: Petr Stefan Date: Fri, 12 Aug 2016 18:57:30 +0200 Subject: [PATCH] Updated Monitor (markdown) --- Monitor.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Monitor.md b/Monitor.md index 73b8c31..590204a 100644 --- a/Monitor.md +++ b/Monitor.md @@ -27,9 +27,10 @@ Monitor runs in 2 threads - _Thread 1_ is main thread, which initializes all com Incomming ZeroMQ message is received and parsed to JSON format (same as our WebSocket communication format). JSON string is then passed to _thread 2_ for sending. Each message has an identifier of channel where to send it to. -If there's connected receiver on that channel id, there is separate instance _asyncio.Queue_ where ready-to-send messages are stored. Messages from that queue are sent through corresponding WebSocket connection via main event loop as soon as possible. This approach with separate queue per connection is easy to implement and guarantees reliability and order of message delivery. +There can be multiple receivers to one channel id. Each one has separate _asyncio.Queue_ instance where new messages are added. In addition to that, there is one list of all messages per channel. If a client connects a bit later, it'll receive all messages from the beginning. Messages are stored 5 minutes after last progress command (FINISHED), then are permanently deleted. + +Messages from client's queue are sent through corresponding WebSocket connection via main event loop as soon as possible. This approach with separate queue per connection is easy to implement and guarantees reliability and order of message delivery. -When there's no connected receiver for message channel id, the message is dropped with warning message in monitor's log file. ## Installation