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

Differences between fbp Graph and noflo Network #1051

Open
linonetwo opened this issue Oct 16, 2023 · 0 comments
Open

Differences between fbp Graph and noflo Network #1051

linonetwo opened this issue Oct 16, 2023 · 0 comments

Comments

@linonetwo
Copy link
Contributor

Differences between fbpGraph in import { Graph as FbpGraph } from 'fbp-graph'; and noflo Network in import { Network } from 'noflo/lib/Network';

Assistant:

Both fbp-graph and noflo are tools related to Flow-Based Programming (FBP). However, they serve slightly different purposes and have some differences in their implementations and usage. Here are the main distinctions between FbpGraph in fbp-graph and Network in noflo:

  1. Purpose:

    • FbpGraph (fbp-graph): This is mainly focused on defining and managing the abstract graph structure, i.e., the blueprint of the FBP application. This involves nodes, connections between nodes, and other graph-related details.
    • Network (noflo): This is an executable instantiation of a graph. In other words, while FbpGraph defines the structure, Network focuses on the actual execution of that structure, running the processes and managing data flow between them.
  2. Scope:

    • FbpGraph: Deals with operations like creating nodes, defining edges (connections), setting metadata, etc. It's a representation of the FBP graph but doesn't run or execute it.
    • Network: Involves the actual execution logic. It manages lifecycle events, process initialization, data packet transmission through connections, and more.
  3. Dependencies:

    • FbpGraph: Being an abstraction of the graph, it doesn't necessarily need components or runtimes. It's more lightweight in comparison to Network.
    • Network: Requires a runtime and components to execute the graph. These components define the actual logic of each process node in the graph.
  4. Use Cases:

    • FbpGraph: Useful for situations where you want to visualize, define, or manipulate the structure of an FBP graph without concerning the execution. For example, for creating tools that allow users to draw or design FBP graphs.
    • Network: Necessary when you want to instantiate and run an FBP application, which means executing the logic defined by the graph.
  5. Interactivity and Lifecycle:

    • FbpGraph: It doesn’t deal with lifecycle events like component startup, shutdown, etc., as it's only concerned about the graph's structure.
    • Network: Manages the entire lifecycle of an FBP application, from starting up the processes, routing data, handling errors, and shutting down.
  6. Integration:

    • FbpGraph can be used independently of noflo. It serves as a general-purpose graph library.
    • Network is a core part of noflo and is tightly integrated with its runtime and components.

In summary, while both FbpGraph and Network are related to Flow-Based Programming, the former is an abstraction for representing the graph, while the latter is concerned with executing the logic defined by that graph.

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