How to Specify a Broadcast Channel

58 views
Skip to first unread message

Earnshaw

unread,
Jun 11, 2020, 12:37:54 AM6/11/20
to tlaplus
Dear All:

  I am now specifying a distributed system consists of a group of nodes as a cluster.

  Some control signals are  syncronized to all the members in the cluster  by  broadcast message.    So I must specify the  message queue between each consumer and producer.

   Now I split the message bus mechanism to a N * N  unicast Queue as below:

   NodeCtrlChannel = [n \in Node |-> [m \in Node |-> <<>>]]

    But it is a little complicated, is there any simplified method to specify it? 
  

   

   

Stephan Merz

unread,
Jun 11, 2020, 2:37:11 AM6/11/20
to tla...@googlegroups.com
Can you please be more specific about what you find complicated? Doesn't

broadcast(sndr, msg) == 
  [n \in Node |-> IF n = sndr 
                  THEN [m \in Node |-> Append(chan[n], msg)]
                  ELSE chan[n]]

do what you want (where "chan" is the variable that represents the N*N matrix of channels)?

Stephan

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/38ae9985-8b69-4060-99e5-7dfe6f5d130eo%40googlegroups.com.

Earnshaw

unread,
Jun 14, 2020, 11:22:34 PM6/14/20
to tlaplus
Thanks a lot, dear Stephan, this really works, but what I previously mean is how to think a way to reduce the computing rerourses  by defining just one sharing message queue instead of the N*N matrix.

For example, each message strucure has a bitmap identifying each consumer, when the last consumer recieve and clear the bitmap, the message can be removed from the tail of the queue.


在 2020年6月11日星期四 UTC+8下午2:37:11,Stephan Merz写道:
Can you please be more specific about what you find complicated? Doesn't

broadcast(sndr, msg) == 
  [n \in Node |-> IF n = sndr 
                  THEN [m \in Node |-> Append(chan[n], msg)]
                  ELSE chan[n]]

do what you want (where "chan" is the variable that represents the N*N matrix of channels)?

Stephan

On 11 Jun 2020, at 06:37, Earnshaw <donglu...@gmail.com> wrote:

Dear All:

  I am now specifying a distributed system consists of a group of nodes as a cluster.

  Some control signals are  syncronized to all the members in the cluster  by  broadcast message.    So I must specify the  message queue between each consumer and producer.

   Now I split the message bus mechanism to a N * N  unicast Queue as below:

   NodeCtrlChannel = [n \in Node |-> [m \in Node |-> <<>>]]

    But it is a little complicated, is there any simplified method to specify it? 
  

   

   

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tla...@googlegroups.com.

Stephan Merz

unread,
Jun 15, 2020, 2:16:45 AM6/15/20
to tla...@googlegroups.com
Hello,

you can certainly model your network using a single queue per node, which models the sequence of messages sent to that node, but not yet handled by it (its "inbox"). Senders append their messages to that single queue. This may make your specification a little easier to read. However:

1. This representation enforces accidental precedence between messages. If both A and B send a message to C then in the model with a single queue, these two messages will be ordered, whereas in the model with N*N queues they are not. Whether this matters or not depends on the system you are trying to model.

2. The single-queue representation doesn't help reduce the number of states that TLC has to compute: it's not clear to me what you mean by "reducing[ing] computing resources". (The memory footprint of a single state may be a little smaller, but I doubt that you get a noticeable effect from this.)

–––

Rereading my previous message, I see that there was a mistake: as you probably found out, the correct definition should have been

broadcast(sndr, msg) == 
  [n \in Node |-> IF n = sndr 
                  THEN [m \in Node |-> Append(chan[n][m], msg)]
                  ELSE chan[n]]

Regards,

Stephan

To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/711b99c3-6f5d-446b-81ed-eca8e50f2972o%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages