locked
Functionality of Combine Operator &>- in Axum RRS feed

  • Question

  • The Axum documentation says that " the combine operator takes a vector of sources, receives a message from each, then packages them into an array and forwards the result to the right hand operator."

    Let's assume for this eample that the vector of sources is A and B.

    What is the result of the combine opertor when A recieves 2 messages before B recieves one? Does the combine operator send the first message sent to A or the most recent (second) one?

    What is the result of the combine operator when A receives two messages and then B receives two? Is only one package array sent, or are two sent?

    It is VERY impotant to know the details of the combine opertor actions in the case of out of sequence and multiple message combinations. The functionality of the application may be very dependent on this behavior and bugs may be very difficult to diagnose and reproduce.

    Is it possible to specify or configure the behavior of the combine operator in the case of out of sequence messages?

    Monday, May 17, 2010 1:54 AM

Answers

  • The documentation is correct and specified from the perspective of the operator itself. Some of the questions you ask depend on circumstances outside the operator. Let use the network "{A,B} &>- C" as our example.

    You ask:

    What is the result of the combine opertor when A recieves 2 messages before B recieves one? Does the combine operator send the first message sent to A or the most recent (second) one?

    The answer is that this depends on the source A: an unbounded buffer, for example, will guarantee in-order delivery, so it will hold the first value until B produces one and both can be consumed. A single item interaction point, on the other hand, will only allow linked targets (such as the combine operator) to consume the last value.

    You ask:

    What is the result of the combine operator when A receives two messages and then B receives two? Is only one package array sent, or are two sent?

    That depends on how the target of the combine operator was linked: by default, using the language constructs, it will keep sending until the network {A,B} &>- C is disposed and the connection to C unlinked. However, if somebody disassembles what the compiler is generating, it is possible to figure out how to create the underlying objects directly and create a transient link to the combine block, which means that C would only get the first tuple from {A,B}. The language construct streams until the network is torn down, the underlying infrastructure supports both.

    Niklas

     

    Monday, May 17, 2010 7:17 PM
    Moderator