Ports and Links
Ports and links are how you connect nodes together to create data flow in your graph. Ports are connection points on nodes, and links are the visual connections you draw between ports. Together, they create the pathways that data follows through your pipeline.What are Ports?
Ports are connection points on nodes where data enters or exits:- Input ports - Receive data (located on the left side of nodes)
- Output ports - Send data (located on the right side of nodes)
Ports are strongly typed—each port has a specific schema type. You can only connect ports with compatible types.
What are Links?
Links are visual connections you draw between ports:- Connect output to input - Drag from an output port to an input port
- Create topics automatically - Links automatically create topics
- Show data flow - Links visually represent how data moves through your graph
Why Use Ports and Links?
Visual Design
See data flow at a glance. Links make it immediately clear how data moves through your system.
Type Safety
The editor prevents incompatible connections. You can only link ports with matching types.
Automatic Topics
Links automatically create topics. No manual topic configuration needed.
Easy Refactoring
Redraw links to change data flow. No code changes required.
Port Types and Appearance
Input Ports
Input ports appear on the left side of nodes:- Blue circle - Normal input port
- Red circle - Trigger input port (executes node when data arrives)
- Port label - Shows the port name (e.g.,
i0,temperature_in) - Topic name - Shows the connected topic name
Output Ports
Output ports appear on the right side of nodes:- Green circle - Output port
- Port label - Shows the port name (e.g.,
o0,temperature_out) - Topic name - Shows the connected topic name
Creating Links
Creating links is simple:1
Enter connection mode
Click the Connect tool in the toolbar (or press
C key).The cursor should change to indicate connection mode is active.
2
Click output port
Click and hold on a green output port (on the right side of a node).
You should see a line starting from the output port, following your cursor.
3
Drag to input port
Drag the line to a blue input port (on the left side of another node).
The input port should highlight when you’re over it, indicating a valid connection.
4
Release to connect
Release the mouse button to create the link.
You should see a line connecting the two ports. A topic is automatically created.
Link Validation
The editor validates links before creating them:Valid Connections
- Type match - Output type matches input type
- Same schema - Both ports use the same schema
- Compatible types - Types are structurally compatible
Invalid Connections
- Type mismatch - Output and input types don’t match
- Self-connection - Trying to connect a node to itself (usually invalid)
- Duplicate connection - Ports already connected
Link Properties
Each link has properties you can configure:- Topic name - The name of the topic created by this link
- Type - The schema type (read-only, determined by port types)
- Transport - Local or network (auto-selected by framework)
- QoS settings - Quality of service configuration (optional)
Renaming Topics
To rename a topic created by a link:- Click the link to select it
- Open the properties panel
- Edit the topic name
- Press Enter to save
Topic names must be unique within a graph. If you try to use a duplicate name, the editor will suggest an alternative.
Multiple Links
One Output, Many Inputs (Fan-Out)
You can connect one output port to multiple input ports:Each link creates a separate topic. All subscribers receive the same data, but through different topics.
Many Outputs, One Input (Fan-In)
You can connect multiple output ports to one input port:Modifying Links
Moving Links
Links automatically adjust when you move nodes. The connection remains valid as long as both nodes exist.Deleting Links
To delete a link:- Click the link to select it
- Press
Deletekey (or right-click → Delete)
Reconnecting Links
To change which ports a link connects:- Delete the existing link
- Create a new link between the desired ports
Link Best Practices
Clear Layout
Arrange nodes so links don’t cross unnecessarily. A clean layout is easier to understand.
Meaningful Names
Rename topics created by links to have descriptive names. “temperature_readings” is better than “topic1”.
Avoid Loops
Be careful with circular connections. They can cause infinite loops if not handled properly.
Type Safety First
Always ensure port types match before connecting. The editor helps, but understanding types prevents errors.
Common Patterns
Linear Pipeline
Simple one-to-one connections:Broadcast Pattern
One publisher, many subscribers:Merge Pattern
Many publishers, one subscriber:Troubleshooting Links
Can't connect ports
Can't connect ports
Problem: The editor won’t let you create a link.Solutions:
- Check that port types match (output type must match input type)
- Verify both nodes are in the same graph
- Ensure ports aren’t already connected (delete existing link first)
- Check for schema errors that might prevent type validation
Link disappears
Link disappears
Problem: Link is gone after moving nodes or saving.Solutions:
- Check that both nodes still exist
- Verify the graph file was saved correctly
- Look for errors in the console that might indicate a problem
- Try recreating the link
Type mismatch error
Type mismatch error
Problem: Editor shows type mismatch when trying to connect.Solutions:
- Verify both ports use the same schema
- Check that schemas are correctly defined
- Ensure schema files are saved and loaded
- Look for schema validation errors