Architecture
  • 22 Mar 2024
  • 3 Minutes to read
  • Contributors
  • PDF

Architecture

  • PDF

Article summary

Work Model
Data Flow has a project based working model. Every Data Flow project has the potential to become a standalone product itself. In a way you can think of Data Flow as a platform for producing and hosting new products.

Nodes
Data Flow projects rely on nodes to produce value. There are many different types of nodes readily shipped with Knovvu Data Flow.

image.png

Custom Nodes
Often times your project will need some kind of extra processing. Sometimes you see a new and shiny service which you think will add great value to your product. In those times you can just make a new node yourself.

The custom nodes are one of the best ways to add unique value to your product. The custom node you add yourself will behave just like any other node. You can connect other nodes' outlets to your custom node and read their outputs, you can also produce your own events then send it to other nodes.

When you create a new node it comes filled with an example code. The example code shows the things that can be achieved with a node. You can just edit it or delete all the content and write it yourself from scratch.

Your node can be as simple as an event filter that just reads input events and writes only some of them to the output. Or it can be a most complex one that calls several network services and maybe run several algorithms. In the end it all depends on you and what you want to achieve.

Connections
Each node adds some value to your project. Nodes should be connected to each other in different ways to construct a project. Connecting the nodes correctly and efficiently is an important part of a good project.

image.png

Node Connection Rules

  • The green and the purple squares to the right and the left of the sample nodes above are the data inlets/outlets for those nodes.
  • A green box means binary (audio) and a purple box means text(json formatted event) connection point.
  • The boxes to the left of each node are that node's inlets.
  • The boxes to the right of each node are that node's outlets.
  • Each node may have binary or text inlets|outlets depending on what functionality it provides. For example Emotion node takes audio as input and produces emotion events in the output. You should check each node's documentation to see what they achieve in detail.
  • A connection is made by left clicking on an inlet and dragging the generated arrow onto an outlet.
  • You can only connect a green inlet box to a green outlet box and a purple inlet box to a purple outlet box. The arrow that connects the inlet to the outlet also takes the same color.
  • An outlet can be connected to multiple inlets in which case the output of the node will be send to all the connected inlets.
  • An inlet can receive connections from multiple outlets.
  • All the data enter the system through the Entry node. There is exactly one Entry node for each project.
  • Any data that arrives at the Publisher node will be sent to the customer through the currently open connection. There is exactly one Publisher node for each project.
  • Unused inlets or outlets may be left empty.
  • You can assign a condition to any connection by double clicking on it.
    • The conditions are evaluated only once for each session. The evaluation is performed while the project is being prepared for use when the start message is received.
    • the conditions assigned to connections are evaluated as JavaScript codes. They should be evaluated to true or false.
    • ChannelCount and SampleRate are predefined variables that you can use for these conditions.
    • You can send additional variables in the start message's Settings field.
{  
  ...,
  "Settings":
  {
    "Variable1": "value1",
    "Variable2": "value2"
  }  
} 

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.