[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] How to Specify a Broadcast Channel



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

On 15 Jun 2020, at 05:22, Earnshaw <dongluming77@xxxxxxxxx> wrote:

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...@xxxxxxxxx> 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/38ae9985-8b69-4060-99e5-7dfe6f5d130eo%40googlegroups.com.


--
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+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/711b99c3-6f5d-446b-81ed-eca8e50f2972o%40googlegroups.com.

--
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+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/E4646EB1-3339-4DAF-8973-49DA190BF8A0%40gmail.com.