流程图(Flow Graph)
图(graph)
节点和边的句柄
graph_node
节点的基类
sender
信息发送节点的基类
receiver
信息接收节点的基类
转发和缓冲(Forwarding and Buffering)
转发
图中向后继者转发信息的节点有两种可能的转发策略,这是节点的属性之一:
- 广播(broadcast-push)——信息将被推送给尽可能多的接收信息的后继结点。如果没有后继节点接收信息,信息的命运将取决于节点的输出缓冲策略
- 单播(single-push)——如果后继者接受了该信息,则不会再推送该信息。如果后继者拒绝了该信息,则会尝试该集合中的下一个后继者。这种情况一直持续到有后继者接收信息,或者所有后继者都尝试过为止。如果没有后继者接收信息,信息将被保留,一遍将来可以重新发送。成功传送后,该信息将从节点中删除
缓冲
有两种策略可以处理无法推送给任何后继者的信息:
- 缓冲(buffering)——如果没有后继者接收信息,则将其存起来;try_get():true
- 丢弃(discarding)——如果没有后继者接收信息,则其将被丢弃;try_get():false
节点策略:
Node | try_get()? | Forwarding |
---|---|---|
函数节点(Functional Nodes) | ||
input_node | yes | broadcast-push |
function_node<rejecting> | no | broadcast-push |
function_node<queueing> | no | broadcast-push |
continue_node | no | broadcast-push |
multifunction_node<rejecting> | no | broadcast-push |
multifunction_node<queueing> | no | broadcast-push |
缓冲节点(Buffering Nodes) | ||
buffer_node | yes | single-push |
priority_queue_node | yes | single-push |
queue_node | yes | single-push |
sequencer_node | yes | single-push |
overwrite_node | yes | broadcast-push |
write_once_node | yes | broadcast-push |
拆分合并节点(Split/Join Nodes) | ||
join_node<queueing> | yes | broadcast-push |
join_node<reserving> | yes | broadcast-push |
join_node<tag_matching> | yes | broadcast-push |
split_node | no | broadcast-push |
indexer_node | no | broadcast-push |
其它节点(Other Nodes) | ||
broadcast_node | no | broadcast-push |
limiter_node | no | broadcast-push |