trustmaster / goflow

Flow-based and dataflow programming library for Go (golang)
MIT License
1.61k stars 125 forks source link

Run-time network manipulation #11

Closed trustmaster closed 9 years ago

trustmaster commented 11 years ago

Another aspect of manipulating graphs at run-time required for #7 is being able to reference and manipulate nodes in sub-graphs at run-time, e.g.:

app.AddGraph("feedGrabber")
app.Get("feedGrabber").Add("web.UrlReader", "reader")
app.Get("feedGrabber").Add("web.RssParser", "parser")
app.Get("feedGrabber").Connect("reader", "Data", "parser", "XML")
app.Get("feedGrabber").MapInPort("In", "reader", "URL")
app.Get("feedGrabber").MapOutPort("Out", "parser", "Entry")
app.Connect("crawler", "Link", "feedGrabber", "In")
app.Connect("feedGrabber", "Out", "storage", "FeedIn")
app.Run("feedGrabber")

It is also important to take into consideration how running processes react on getting connected to new nodes and getting disconnecting from nodes.