Scenarios and use cases - normenmueller/f-p GitHub Wiki

In the explanation of these scenarios, I make a strong assumption: there's at least one client available always and it's always connected to the network. Indeed this is not always the case but it helps to simplify the situations and start to build the framework based on basic primitives. Assuming the counterpart of this statement will lead to a different implementation and a more complex design.

All the messages exchanged by the nodes use the ACK-RETRY protocol specified here.

Scenario number 1

Basic components: client, node #1 and node #2 behaving as a backup node.

Description: A user wants to keep data in a main node but always to have a backup instance available for every transformation that it applies. The client is the node that sends commands to both nodes.

Situation: The main node fails

  1. Client creates a new Silo. Sends to all the recipients (main and backup node) the function that generates or fetches the data (the initial function). Along this function a failure handler is also sent, which specifies how to deal with failures on the node storing data.
  2. Client node defines a transformation over the data. Every time a transformation is applied, it's sent to each recipient. If a transformation is not confirmed (because of any kind of error), send it again with the ACK-RETRY protocol until it succeeds.
  3. Let's say n is the limit of tries (which the user should specify) and that after n tries there is no confirmation from node #1. Then the client:
    • Stops contacting node #1 as it's unable to process any message
    • Marks node #2 as the main node (single source of truth) from that moment on
  4. Client node applies more transformations over the data that are only sent to node #2.
  5. Node #1 comes alive. It sends a flag to the client alerting that he's just started.
  6. Client node receives the flag and waits t seconds to give some time so that node #1 becomes stable. Then it checks that it's still available. If it is, the client sends to node #1 the up-to-date DAG of any SiloRef that it stores.

To be finished...

Other useful information

Protocol to create a new silo

TBD