Closed deontologician closed 10 years ago
Current issues involves rebroadcasting downwards. Messages are broadcast up the chain, but won't make it to siblings.
Assuming the diagram above, see what happens when A/E/G
broadcasts:
A/E
receives the broadcast, sends to A and to A/E/F
(assume it's easy to skip A/E/G
)A/E/F
receives the broadcastA
receives the broadcast, sends to A/B
and to A/E
A/B
receives the broadcast, sends to A
, A/B/C
, and A/B/D
So, there needs to be a rule to decide when to rebroadcast and it needs to rule out 3 different recipients:
Here are some rules that might stop rebroadcasting in the above example:
A/E
should not broadcast to A/E/G
because the sender of the message is a prefix of A/E/G
A/E
should broadcast to A
despite a being a sender prefix, because A/B
is a more specific sender prefix (it's closer)A
should not broadcast to A/E
because A/E
is a prefix of the sender A/E/G
B
should not broadcast to A
because A
is a prefix of the sender A/E/G
A/B/D
should not broadcast to A/B
because you only broadcast to parent nodes if you are a prefix of the sender.So in summary, here's my suggested rules:
Communication buses are how information will be sent around the spaceship.
Both "real" and simulated data will be sent over the buses.
Buses are laid out in a hierarchy (a tree). Each Bus will have a name based on its position in the hierarchy. Take the following example:
The full path names will be:
/A
/A/B
/A/B/C
/A/B/D
/A/E/F
/A/E/G
If you try to attachG
andF
, they will not, saying they both already have parents. If you try to attachG
andA
, they will not, saying thatG
andA
are already attachedA message sent from
G
should go throughE
.E
should send it both toF
and toA
At each Bus in the chain, the Bus checks all of its subscribers to see if any are interested in the message. If so, it sends the message to that subscriber. The subscriber gives a pattern which is matched against the message's topic.