Skip to content
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

How to use this? #354

Open
linonetwo opened this issue Jul 9, 2023 · 1 comment
Open

How to use this? #354

linonetwo opened this issue Jul 9, 2023 · 1 comment

Comments

@linonetwo
Copy link

I'm now planning to create a basic UI, and JSON stringify result, send to backend using custom REST API, and use another API to execute flow on backend.

Can this package save me some time? How to use this?

@linonetwo
Copy link
Author

By inspect the The noflo-nodejs command line execution flow:

  1. Read the file path from the command line arguments and load it as a Graph object using the fbp-graph library.
  2. Start a local socket server for your own local connection or flowhub connection.
  3. Listen for changes to the graph via runtime.graph.registerGraph, broadcast them, and set them to the current mainGraph to be returned at a future getRuntime.
    1. Who will chage the local graph and why does it change? I think it's all done by the remotes, probably to synchronize with all the other remotes if one of them does something locally.
    1. It looks like a runtime can only have one graph? So if you want to execute multiple graphs in the background, you need to start multiple runtimes, but maybe that's just for development, production can run multiple graphs directly with the noflo package.

It should be possible to do without the logic here, since it is mainly for remote connection to flowhub development and supports broadcasting to multiple collaborations.

If we have our own embedded diagram editor and are single-user, we can just save and execute the diagrams ourselves.

We'll add the runtime and fbp protocol stuff back in when we need to do multiplayer collaboration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant