8000 Make sure IPs are only sent once when sending to ArrayPort on a subgraph by kenhkan · Pull Request #41 · noflo/noflo · GitHub
[go: up one dir, main page]

Skip to content

Make sure IPs are only sent once when sending to ArrayPort on a subgraph - #41

Closed
kenhkan wants to merge 2 commits into
noflo:masterfrom
kenhkan:link_arrayport_on_subgraphs
Closed

kenhkan wants to merge 2 commits into
noflo:masterfrom
kenhkan:link_arrayport_on_subgraphs

Conversation

@kenhkan
@kenhkan kenhkan commented Aug 19, 2012
Copy link
Copy Markdown
Contributor

When sending to a subgraph, the same IP is sent to the subgraph the same number of times as how many processes are attached to an open ArrayPort. Something like:

subgraph.fbp:

Merge(Merge) OUT -> IN Output(Output) 

main_graph.fbp:

'subgraph.fbp' -> IN Graph(Graph)
'a' -> MERGE.IN Graph()
'b' -> MERGE.IN Graph()
'c' -> MERGE.IN Graph()

The above should print:

a
b
b
c
c
c

This seems to be due to using ArrayPort-to-ArrayPort attachment to make a link between the graph and the subgraph. Sending the IP only to the first socket solves the problem as all the sockets point to the same process in the subgraph anyway.

@travisbot
Copy link
Copy Markdown

This pull request passes (merged ff09619 into 5f4fcfa).

@kenhkan
kenhkan commented Aug 20, 2012
Copy link
Copy Markdown
Contributor Author

Just a clarification. The above currently prints:

a
b
b
c
c
c

where it should print:

a
b
c

@travisbot
Copy link
Copy Markdown

This pull request passes (merged 7f68b38 into 5f4fcfa).

@kenhkan
kenhkan commented Aug 25, 2012
Copy link
Copy Markdown
Contributor Author

I have this crazy thought... Would this problem persist if the whole noflo is implemented asynchronously? Say:

'SomeInitial' -> IN A(Something) OUT -> IN B(Graph) OUT -> IN C(SomethingElse)

In the current implementation, 'SomeInitial' is sent to A and then sent to B immediately. If data flow is async, wouldn't B setting up be run before 'SomeInitial' is passed to it, making the ports to be available for attachment between A and B?

@kenhkan
kenhkan commented Aug 27, 2012
Copy link
Copy Markdown
Contributor Author

See #42

@bergie
bergie commented Aug 28, 2012
Copy link
Copy Markdown
Member

Thanks for the PR! I'm mostly offline this week in Istanbul, so I'll be able to look at these in details next week

@bergie
bergie commented Oct 1, 2012
Copy link
Copy Markdown
Member

@kenhkan sorry about taking my time with these. This pull req doesn't apply cleanly any longer, unfortunately. Can you rebase and push so it gets updated?

8000

@kenhkan
kenhkan commented Oct 19, 2012
Copy link
Copy Markdown
Contributor Author

@bergie Humorously the same thing happened to me. I was in Vietnam for several weeks so I'm sorry that I couldn't comment any earlier.

#41 should not be an issue if #42 is fixed. It's two solutions to the same problem. Well, #42 is a more complete solution. I'm closing this now.

@kenhkan kenhkan closed this Oct 19, 2012
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 12, 2026
bergie added a commit that referenced this pull request Nov 7, 2026
toDOT and graph --format dot (work document #41 item 1)
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Nov 11, 2026
@noflo/graph gains toDOT(): renders the canonical graph document as a
deterministic Graphviz digraph — nodes labeled with their components,
port-to-port edge labels, IIPs as note-shaped nodes, exports as dashed
boundary nodes, groups as clusters, quotes and backslashes escaped.
The fbp-client CLI's graph command accepts --format dot. The stored-
trace retrieval item stays gated: the 0x34/0x35 vocabulary does not
exist in @noflo/fbp-protocol yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0