Solve synchronization issue with streams
Closes #1699 (closed) Closes #1806 (closed)
Fixed priority, order and synchronization of stream subscribing. The issues that caused the observed synchronization problems became clear only after refactoring:
- Raw stream events has a class implementation with
encode
anddecode
methods. Before we haddict
and the dictionary structure and encode/decoding logic was owned by theDataNode
derived classes. Was important to discover stream subscribing bugs. - Lima decoding in image URI's or images (from server of files) moved from
LimaDataView
to the streaming event class to be consistent withStreamEvent
classes containing all decoding logic. The difference with otherStreamEvent
classes is that the stream data itself is not enough to do the decoding. - Refactored the
DataNode
walk logic (reuse code that was copy/paste before). Was important to discover stream subscribing bugs. -
DataNode
can now be walked. No need forDataNodeIterator
andSCAN_TYPES
to do something special for the scan nodes. The classes themselves contain the logic fromDataNodeIterator
. - Refactored the stream-reader logic (now a class instead of closure). Was important to discover stream priority bugs.
-
ChannelDataNode
andLimaImageChannelDataNode
now share the same base class - Fixed issues with
filter
when walking nodes - Added more node-walking tests to
test_publishing
(test walk filter for example)
Nothing has changed in the number of events published and the streams in which those are published.
Edited by Wout De Nolf