noflo / noflo-ui

NoFlo Development Environment
https://app.flowhub.io
MIT License
767 stars 173 forks source link

loadbang - how to start a network #97

Closed forresto closed 10 years ago

forresto commented 10 years ago

Pure Data has a loadbang component, which does what it says. I'm thinking this could be useful for NoFlo: a component that sends one bang when the network starts. That could trigger kicks to send their data, and anything else that needs to start when the network starts.

Another option would be a way for the UI to save a bang IIP. Then kick could be loadbang when needed.

https://groups.google.com/forum/#!topic/flow-based-programming/2KTl-bhNzpw -- Mikko used output as a loadbang :skull:

With the clock example I cheated, editing the JSON to send an IIP to the kick's in (you can't do that in the UI).

mikkoh commented 10 years ago

I don't think it's a bad thing to have a simple component that just sends out a bang. I believe they do this also in Max.

I feel though in most production code you'll be initiating things via user interaction (on frontend) or other input (on backend) however for testing it's always handy to have a component which just sends a bang.

mikkoh commented 10 years ago

Just checked in Max it's also called loadbang.

alfa256 commented 10 years ago

I implemented a component called Start in my implementation, you can have many of them in a graph and what the engine does is initialize them with their IIPs and makes then run. They offer a clear view for the maintainer of the starting points of the graph. A nice thing I've seen in node.red from IBM is that bang ports have a little button that you can press in the GUI to send the "iip" again.

bergie commented 10 years ago

The issue here is that per NoFlo spec, components are not supposed to do anything before they receive input. Instead of an "auto-bang" component, why not just use a core/Repeat or any of the other components that just pass their input forward, and give it an IIP?

forresto commented 10 years ago

I forgot about core/Repeat. That's part of the issue: it doesn't sound like a way to start a graph.

Good to make this info Googleable here and StackOverflow.

http://stackoverflow.com/questions/22021565/noflo-how-to-start-a-graph-network

bergie commented 10 years ago

@forresto then please re-post this to http://stackoverflow.com/questions/tagged/noflo :-)

borromeotlhs commented 10 years ago

This, by far, is the hardest thing to figure out with flowhub : ( Until I figured out how to send something to test a graph I'd made, this was nothing but a diagramming tool : ( Now that Flowhub is out, is there a tutorial for creating a simple graph? (I ask, as the examples aren't reach-able for some reason from the Chrome app)

bergie commented 10 years ago

@borromeotlhs documentation needs still a lot of work, but here is something: http://flowhub.io/documentation/

borromeotlhs commented 10 years ago

Yeah, I finally found the right combo of links to get going on the chrome app.

In a perverse way, I think using your tool first and then reading the seminal flow based programming paper/book made the concepts easier to digest.

Interestingly, the first demo app I made was connecting to github and pulling out my user profile. For a post 'hello world' app, it was pretty powerful in convincing me of flow based programming's true 'black-box' potential.

Once I finish the book, I'll try to compile a tutorial detailing some of the things I've discovered.

R/ TJ On Aug 5, 2014 2:29 AM, "Henri Bergius" notifications@github.com wrote:

@borromeotlhs https://github.com/borromeotlhs documentation needs still a lot of work, but here is something: http://flowhub.io/documentation/

— Reply to this email directly or view it on GitHub https://github.com/noflo/noflo-ui/issues/97#issuecomment-51173698.