specify array port index in edge #128

Closed
forresto opened this Issue Jan 11, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@forresto
Member

forresto commented Jan 11, 2014

To show ArrayPorts in the UI (flowhub/the-graph#51) it would be helpful if the index were defined in the edge. Is there a way to do this in FBP?

{
  "src": {
    "process": "SplitOne",
    "port": "out",
    "index": 0
  },
  "tgt": {
    "process": "Thing",
    "port": "in"
  }
}

Otherwise, the only way to find its index is by the order of the edges, which seems fragile. And the only way to know if it is an ArrayPort (#90) is by waiting for the component def from the library.

@alfa256

This comment has been minimized.

Show comment
Hide comment
@alfa256

alfa256 Jan 11, 2014

Example from the book:

    Read(THFILERD) OUT ->
      IN Count(THCOUNT) OUT -> 
        IN [0] Concatenate(THMERGE) OUT ->
          IN Print(THVIEW),
    Count COUNT -> IN[1] Concatenate,
   'data.fil' -> OPT Read;

It uses IN [0] , and OUT [0] would be the obvious choice.

alfa256 commented Jan 11, 2014

Example from the book:

    Read(THFILERD) OUT ->
      IN Count(THCOUNT) OUT -> 
        IN [0] Concatenate(THMERGE) OUT ->
          IN Print(THVIEW),
    Count COUNT -> IN[1] Concatenate,
   'data.fil' -> OPT Read;

It uses IN [0] , and OUT [0] would be the obvious choice.

@forresto forresto added the ui-related label Feb 7, 2014

@bergie bergie referenced this issue in flowbased/fbp Feb 7, 2014

Closed

Allow addressing ArrayPorts #15

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Feb 7, 2014

Member

This needs a compatibility fallback, i.e. setting index based on order edges are specified when loading the JSON specification if no index is provided there.

Member

bergie commented Feb 7, 2014

This needs a compatibility fallback, i.e. setting index based on order edges are specified when loading the JSON specification if no index is provided there.

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Feb 7, 2014

Member

This is also connected with the UI-side of things: noflo/noflo-ui#14

Member

bergie commented Feb 7, 2014

This is also connected with the UI-side of things: noflo/noflo-ui#14

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Feb 18, 2014

Member

I think this won't be safe to do with the old-style ArrayPort, but should work with the new isAddressable() ports from #136

Member

bergie commented Feb 18, 2014

I think this won't be safe to do with the old-style ArrayPort, but should work with the new isAddressable() ports from #136

@forresto

This comment has been minimized.

Show comment
Hide comment
@forresto

forresto Apr 11, 2014

Member

I want to bump this up for https://github.com/automata/noflo-canvas/issues/1 (scratch own itch prioritization).

I guess we need a Graph method to change index? Should it be a property on the edge (not metadata, since it changes how the graph works)? Should it also sort the edges, for compatibility and legibility?

Member

forresto commented Apr 11, 2014

I want to bump this up for https://github.com/automata/noflo-canvas/issues/1 (scratch own itch prioritization).

I guess we need a Graph method to change index? Should it be a property on the edge (not metadata, since it changes how the graph works)? Should it also sort the edges, for compatibility and legibility?

@forresto

This comment has been minimized.

Show comment
Hide comment
@forresto

forresto Apr 25, 2014

Member

@bergie could you prioritize this in noflo so I can make it happen in the-graph?

Also, is there a way that I can query noflo if a port is addressable? I guess with if edge.src.index? I could infer it, but it would be nice to get before any edges are added.

Member

forresto commented Apr 25, 2014

@bergie could you prioritize this in noflo so I can make it happen in the-graph?

Also, is there a way that I can query noflo if a port is addressable? I guess with if edge.src.index? I could infer it, but it would be nice to get before any edges are added.

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Apr 25, 2014

Member

@alfa256 I just added array port index support into the FBP parser:

SomeNode OUT -> IN[2] OtherNode
Member

bergie commented Apr 25, 2014

@alfa256 I just added array port index support into the FBP parser:

SomeNode OUT -> IN[2] OtherNode

bergie added a commit to noflo/noflo-runtime-base that referenced this issue Apr 25, 2014

@bergie

This comment has been minimized.

Show comment
Hide comment
@bergie

bergie Apr 25, 2014

Member

@forresto ok, initial support is now in. Would you like to experiment with how that would connect with the UI?

Member

bergie commented Apr 25, 2014

@forresto ok, initial support is now in. Would you like to experiment with how that would connect with the UI?

bergie added a commit to noflo/noflo-runtime-iframe that referenced this issue Apr 25, 2014

bergie added a commit to noflo/noflo.github.io that referenced this issue Apr 25, 2014

@bergie bergie closed this May 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment