1.. _Flow_Graph_Buffering_in_Nodes:
2
3Flow Graph Basics: Buffering and Forwarding
4===========================================
5
6
7|full_name| flow graph nodes use messages
8to communicate data and to enforce dependencies. If a node passes a
9message successfully to any successor, no further action is taken with
10the message by that node. As noted in the section on Single-push vs.
11Broadcast-push, a message may be passed to one or to multiple
12successors, depending on the type of the node, how many successors are
13connected to the node, and whether the message is pushed or pulled.
14
15
16There are times when a node cannot successfully push a message to any
17successor. In this case what happens to the message depends on the type
18of the node. The two possibilities are:
19
20
21-  The node stores the message to be forwarded later.
22-  The node discards the message.
23
24
25If a node discards messages that are not forwarded, and this behavior is
26not desired, the node should be connected to a buffering node that does
27store messages that cannot be pushed.
28
29
30If a message has been stored by a node, there are two ways it can be
31passed to another node:
32
33
34-  A successor to the node can pull the message using ``try_get()`` or
35   ``try_reserve()``.
36-  A successor can be connected using ``make_edge()``.
37
38
39If a ``try_get()`` successfully forwards a message, it is removed from
40the node that stored it. If a node is connected using ``make_edge`` the
41node will attempt to push a stored message to the new successor.
42
43