Replies: 3 comments
-
This is just a dirty sketch of how |
Beta Was this translation helpful? Give feedback.
-
And this is another dirty sketch that shows type hierarchy traversal with respect to mutability of messages. |
Beta Was this translation helpful? Give feedback.
-
The first working sketch: https://github.com/Stiffstream/so5extra/blob/d3e1d71c8a17427a4daf93d57d8d118ec4492ab7/dev/test/so_5_extra/msg_hierarchy/simple/main.cpp#L17-L84 |
Beta Was this translation helpful? Give feedback.
-
Another iteration around issue #25.
A sketch
It may looks like:
General Description
So the main idea is to have a special object, demuxer, instead of just one mbox.
This demuxer object owns a bunch of separate mboxes:
A "receiving mbox" is created as a unique instance for two keys:
special_image
), or it can be a root of type hierarchy (likeimage_base
orcamera_vendor_2
);The ID of a consumer seems to be mandatory because a demuxer should understand that a message is already sent to a receiver. For example, let's assume that we have
receiver-1
andreceiver-2
agents. Both of them make subscriptions forimage_base
, butreceiver-1
also has a subscription forspecial_image
. It means thatreceiver-1
has subscriptions from two separate mboxes -- one forimage_base
, another forspecial_image
.When an instance of
special_image
is being sent the demuxer should push it to the mbox forspecial_image
forreceiver-1
and to the mbox forimage_base
forreceiver-2
. But if there is a common mbox forimage_base
forreceiver-1
andreceiver-2
, thenreceiver-1
will receive the message twice: first time from a mbox forspecial_image
, another time from a mbox forimage_base
.The presence of a unique consumer ID resolves this problem.
Beta Was this translation helpful? Give feedback.
All reactions