flowbased / fbp-protocol

Tests, schemas, and specifications for the Flow Based Programming Network Protocol
https://flowbased.github.io/fbp-protocol/
MIT License
40 stars 7 forks source link

Clarify the expected Graph Protocol messages from runtimes to clients #24

Closed ruippeixotog closed 8 years ago

ruippeixotog commented 8 years ago

It is not clear, by reading the FBP protocol, what is required that runtimes send to clients in the Graph Protocol.

For example, by reading the spec, I understood that the runtime is expected to react to a removenode with a succession of changeedge, removeedge, changenode and finally removenode. What is the rationale behind deleting the metadata of an edge before removing it? I believe noflo-ui takes care of deleting dependent edges/IIPs before removing a node; why is that not expected of every client, requiring the runtime to handle only simple cases? Or assume the runtime takes care of all dependent resources in a removenode, requiring it to reply with a single removenode?

I was also confused with the response to changing the metadata of edges or nodes.

I noticed another related issue, a bit more severe: when "removing an IIP", the spec indicates the runtime "should provide response that iip was removed". The message it expects is a removeinitial command but contains a src field, which is not accepted in removeinitial messages.

The rationale behind the requests and responses/events should be clarified in the spec, so people implementing runtimes have a clear idea of how to handle those cases. My personal opinion is that request message types should not be used also as "notification event" message types, as the contents differ in some cases and drawing that line that would result in a clearer protocol. However, anything that is defined a bit more formally would be great for me! :)

ruippeixotog commented 8 years ago

Looking a bit more thoroughly at the issues, it seems this is kind of a duplicate of #12. I'll add this there as a comment.