-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receive graph events from runtime #564
Conversation
|
||
when 'removenode' | ||
id = payload.payload.id | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check to see if the node has already been removed
@bergie and @jonnor, I reviewed this and the other PR and it looks good to me. I wanted to mention one thing, which maybe should make it into the comments of Updates get from the editor to the runtime like this:
With this PR, we're now listening for |
@ifitzpatrick the required noflo-runtime PR has now been merge. Can you update this? |
@@ -26,7 +26,7 @@ | |||
"noflo/noflo-indexeddb": "*", | |||
"noflo/noflo-github": "*", | |||
"noflo/noflo-graph": "*", | |||
"noflo/noflo-runtime": "*", | |||
"ifitzpatrick/noflo-runtime": "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be possible to swap back to upstream
@jonnor component.json now points back to noflo |
I don't see any changes here regarding 'live mode', in particular the When this change is in, what is the correct behavior for a runtime which is already running a graph? What will happen if a runtime does not do send these |
Correct behavior would be that when the runtime receives network:getstatus, it would build the graph with the normal methods graph:addnode, graph:addedge etc. I will write up some documentation for fbp-protocol to reflect that. If it sends both getsource and the new events, the graph: events should be ignored since the nodes and edges those events are trying to add will already exist in the graph. Legacy runtimes should still be able to respond to getsource instead, or along with the new events if it is transitioning gradually. |
Maybe we should have another event besides getstatus though to request a fresh graph? There might be other reasons a UI might want to request status besides starting up originally. Maybe a new graph:getgraph command so the protocols of the request and response match? Would love to hear your thoughts. I chose getstatus because of this comment on the "live mode" thread. |
Once we nail down how exactly the protocol should function I will work on getting fbp-test to test this functionality. |
e84009d
to
a57774c
Compare
@jonnor After looking over the get source stuff, I think that the runtime should probably decide whether it wants to support a |
I have a pull request ready for fbp-protocol describing the graph:getgraph message, which depends on the json-schema pull request awaiting approval. I will share that once we finalize the json-schema pr. |
Will reopen or open a new PR once we have cleared up the protocol situation |
This pull request allows noflo-ui to respond to commands from the runtime such as addnode, addedge, etc., and update the graph exposed by the graph editor accordingly. It depends on this pull request to noflo-runtime: noflo/noflo-runtime#66
The two pull requests are together intended to address this issue: #390.