Working on a FBP runtime, have some questions

44 views
Skip to first unread message

Tom

unread,
Nov 9, 2023, 8:19:51 AM11/9/23
to flow-based-...@googlegroups.com
Hello.

I'm writing a FBP runtime using TypeScript and functional programing (https://gcanti.github.io/fp-ts/) and I'm trying to adhere to the https://github.com/flowbased/fbp-protocol tests and eventually get it working as a backend to the Flowhub IDE.

The repository can be found here: https://github.com/Industrial/c9-fbp/tree/main

I have some questions:
1) Is there a Discord server or another chat community to discuss FBP?
2) I wrote some tests for the implementation: https://github.com/Industrial/c9-fbp/blob/main/src/runtime.test.ts#L180. My tests and implementation may be too strict for the `fbp-protocol` tests but I may also have found some errors/shortcomings in it.
2.1) The tests in `fbp-protocol` all depend on the state that the previous test left it in. I found this to be error-prone so I made my tests completely wipe and re-assemble the state by stopping and starting the server between each test.
2.1) https://github.com/flowbased/fbp-protocol/blob/master/src/WebSocket.js#L256 at this point it tests addedge but looking at the code above only two nodes have been added to the graph and `graph/addport` hasn't been sent to the runtime, so there aren't any ports for the edge to point to. My runtime returns a `graph/error` at this point with a message of `OutportNotFound` or `InportNotFound`. Is that the intended way to implement this?
2.2) The same happens at https://github.com/flowbased/fbp-protocol/blob/master/src/WebSocket.js#L403 where an IIP is added to the graph but the input port is not there.
3) For some events like `graph/addnode` don't require the property `graph` on the payload but others like `graph/removenode` do. Is this intentional? Wouldn't it be easier to always require a graph name?

Tom

unread,
Dec 7, 2023, 8:41:28 AM12/7/23
to flow-based-...@googlegroups.com
Is there anyone out there?

p.s. There's a lot of spam mails coming through to this list. Can we do something about this?
Reply all
Reply to author
Forward
0 new messages