Skip to content

Supporting different delivery modes for connections #1

Description

@jonnor

Right now messages will be correctly sent between Participants when they have queues/topics which are matching. Currently the msgflo Coordinator does not consider this to be an "connected" edge though...

On AMQP one can create a fanout exchange for every outport, and then set up bindings from these to the inports the outport is connected to.
Such a exchange will likely be needed for the Coordinator to be able to observe data going though the network, for debugging in Flowhub (using FBP runtime network:data messages). This because with a direct exchange, like the default, messages are only delivered to one consumer (in round-robin fashion).

Problem is that MQTT brokers does not support "binding" topics to eachother, so something else needs to perform that operation. The msgflo Coordinator could perform this, but this makes it required for normal functioning of the system (and not just debug/reprogramming).
In practical scenarios this might be a non-issue though, as the Coordinator can probably run on the same machine as the Broker.

In general there are two ways to change the connections between particpants,
complicating the architecture a bit:

    1. ask the Coordinator to re-bind the output->input bindings
    1. request the Participant to change its queues/topic. (not implemented, messages specced)

From the perspective of the running system, these should be equivalent.

One could say that for participants to know where they are sending mesages is somewhat breaking the "loose binding" concept, but for MQTT that is the only possibility which does not require more than clients+broker at runtime.

Activity

  1. changed the title [-]Better support for peer-to-peer edge connections[/-] [+]Conceptual challenges for peer-to-peer edge connections[/+] on Apr 4, 2015
  2. jonnor commented on Apr 4, 2015

    @jonnor
    MemberAuthor

    A major problem with option 2) is that is requires changes to the Participant code, making it impossible to use existing/foreign participants. This would limit use to systems where one has complete control over each node. And make nodes participate in multiple networks/system very difficult.
    So the way forward seems to be the bindings approach.
    Note that we might want to have minimal support for participants self-initializing with possibly matching queues, but this will then be secondary. Major reason for this right now is allowing use on Heroku/AMQP without needing Coordinator to set up communication...

    For MQTT and similar systems where the Broker cannot provide this functionality, a helper will be used by the Coordinator to perform this role. Probably hidden behind the transport.MessageBroker interface.

  3. jonnor commented on Apr 9, 2015

    @jonnor
    MemberAuthor

    Another problem is consoliating the need for various type of communication stategies. For instance in http://github.com/jonnor/imgflo-server we want round-robin between API frontend and the workers, but the result from worker should be communicated back to the API frontend which made the processing request.
    The back-comm can be done using either a reply-to/peer-based model, or pub-sub.

    Current thinking is to make edges be pub-sub by default (currently its transport dependent), and let a special router component implement round-robin. In AMQP (and other transports with neccesary capabilities) this would not actually be code in the coordinator, but instead just configure the broker suitably. On MQTT etc it will be implemented using a helper in the coordinator.
    ACK/NACK would the be optional??

  4. jonnor commented on Apr 13, 2015

    @jonnor
    MemberAuthor

    All transports are now pub-sub by default. Need to still develop a msgflo/RoundRobin type component/participant

  5. jonnor commented on Jun 15, 2015

    @jonnor
    MemberAuthor

    RoundRobin now exists since 1+week

  6. jonnor commented on May 3, 2017

    @jonnor
    MemberAuthor

    Inside one role on AMQP, round-robin is the default since 2016. One can use msgflo/PubSub pseudo-component in order for all participant of a single-role to all get the message. Example usage in imgflo-server

  7. changed the title [-]Conceptual challenges for peer-to-peer edge connections[/-] [+]Supporting different delivery modes for connections[/+] on May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions