Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/architecture/data-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ All data passed between workflow nodes is **Apache Parquet** (Snappy-compressed,

```mermaid
flowchart LR
A["🧩 Node A<br/>NodeOutputWriter"] -->|"output.{portId}.parquet"| S3[("🗄️ MinIO (S3)")]
S3 -->|"input.{portId}.parquet"| B["🧩 Node B<br/>NodeInputReader"]
A[/"🧩 <b>Node A</b><br/>NodeOutputWriter"/] ==>|"write<br/>output.{portId}.parquet"| S3[("🗄️ <b>MinIO (S3)</b><br/>one Parquet file<br/>per port")]
S3 ==>|"read<br/>input.{portId}.parquet"| B[\"🧩 <b>Node B</b><br/>NodeInputReader"\]

classDef ui fill:#8b5cf633,stroke:#8b5cf6,stroke-width:2px
classDef core fill:#ec489933,stroke:#ec4899,stroke-width:2px
classDef stream fill:#f59e0b33,stroke:#f59e0b,stroke-width:2px
classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef store fill:#10b98133,stroke:#10b981,stroke-width:2px
classDef hero fill:#06b6d433,stroke:#06b6d4,stroke-width:4px,stroke-dasharray:6 3
class A,B worker
class S3 store
```
Expand Down
18 changes: 11 additions & 7 deletions docs/architecture/node-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,25 @@ At startup, each worker publishes its available nodes to Kafka so the platform c

```mermaid
flowchart LR
W["🧩 Worker (startup)<br/>discovers all @ContinuumNode<br/>beans via Spring"]
K["📨 Kafka topic<br/>FeatureRegistration<br/>(Avro binary)"]
B["🔁 Message Bridge<br/>consumes &amp; upserts<br/>per node"]
DB[("🐘 PostgreSQL<br/>registered_nodes<br/>nodeId + taskQueue")]
W[/"🧩 <b>Worker starts</b><br/>finds every @ContinuumNode<br/>bean via Spring"/]
K[["📨 <b>Kafka topic</b><br/>FeatureRegistration<br/><i>Avro binary</i>"]]
B["🔁 <b>Message Bridge</b><br/>consumes and upserts<br/>one row per node"]
DB[("🐘 <b>PostgreSQL</b><br/>registered_nodes<br/>nodeId + taskQueue")]
UI(["🖥️ <b>Workbench palette</b><br/>your node appears"])

W -->|publish| K --> B -->|upsert| DB
W ==>|"publish"| K ==> B ==>|"upsert"| DB -.->|"served via API"| UI

classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef stream fill:#f59e0b33,stroke:#f59e0b,stroke-width:2px
classDef ui fill:#8b5cf633,stroke:#8b5cf6,stroke-width:2px
classDef core fill:#ec489933,stroke:#ec4899,stroke-width:2px
classDef stream fill:#f59e0b33,stroke:#f59e0b,stroke-width:2px
classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef store fill:#10b98133,stroke:#10b981,stroke-width:2px
classDef hero fill:#06b6d433,stroke:#06b6d4,stroke-width:4px,stroke-dasharray:6 3
class W worker
class K stream
class B core
class DB store
class UI ui
```

<Steps>
Expand Down
63 changes: 38 additions & 25 deletions docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,38 @@ Continuum is split into a browser frontend, a core backend (API server + Tempora

```mermaid
flowchart TB
subgraph Browser["🖥️ Browser — Continuum Workbench"]
UI["Eclipse Theia IDE + React Flow canvas"]
subgraph Browser["🖥️ Browser: Continuum Workbench"]
UI(["🎨 Eclipse Theia IDE + React Flow canvas"])
end

API["🌐 API Server"]
Bridge["🔁 Message Bridge<br/>Kafka → MQTT"]
Temporal["⏱️ Temporal<br/>orchestration"]
Kafka["📨 Kafka"]
API["🌐 <b>API Server</b>"]
Temporal{{"⏱️ <b>Temporal</b><br/>orchestration"}}
Bridge["🔁 <b>Message Bridge</b><br/>Kafka → MQTT"]
Kafka[["📨 <b>Kafka</b><br/>events"]]

subgraph Workers["🧩 Feature Workers"]
subgraph Workers["🧩 Feature Workers: add yours here"]
direction LR
Base["📊 Base"]
Chem["🧪 Cheminformatics"]
AI["🤖 AI / ML"]
end

MinIO[("🗄️ MinIO (S3)<br/>Parquet files")]
MinIO[("🗄️ <b>MinIO (S3)</b><br/>Parquet files")]

UI -->|REST| API
Bridge -->|MQTT / WebSocket| UI
API --> Temporal
Temporal -->|dispatches| Workers
Workers -->|events| Kafka
Kafka --> Bridge
Workers <-->|read / write| MinIO
UI ==>|"REST"| API
Bridge -.->|"MQTT / WebSocket<br/>live status"| UI
API ==> Temporal
Temporal ==>|"dispatches"| Workers
Workers -.->|"events"| Kafka
Kafka -.-> Bridge
Workers <-->|"read / write"| MinIO

classDef ui fill:#8b5cf633,stroke:#8b5cf6,stroke-width:2px
classDef core fill:#ec489933,stroke:#ec4899,stroke-width:2px
classDef stream fill:#f59e0b33,stroke:#f59e0b,stroke-width:2px
classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef store fill:#10b98133,stroke:#10b981,stroke-width:2px
classDef hero fill:#06b6d433,stroke:#06b6d4,stroke-width:4px,stroke-dasharray:6 3
class UI ui
class API,Temporal core
class Kafka,Bridge stream
Expand Down Expand Up @@ -74,17 +75,29 @@ sequenceDiagram
participant S as 🗄️ MinIO
participant K as 📨 Kafka → MQTT

B->>A: Execute workflow (REST)
A->>T: Start ContinuumWorkflow
T->>A: InitializeActivity: resolve task queues
loop each unblocked DAG node
T->>W: IContinuumNodeActivity.run()
W->>S: Read input Parquet
W->>S: Write output Parquet
W-->>T: Progress signals
T-->>K: WorkflowUpdateEvent
K-->>B: Node status (MQTT over WebSocket)
rect rgba(139, 92, 246, 0.10)
Note over B,T: 🚀 Start
B->>+A: Execute workflow (REST)
A->>+T: Start ContinuumWorkflow
T->>A: InitializeActivity: resolve task queues
deactivate A
end

loop 🔁 each unblocked DAG node
rect rgba(6, 182, 212, 0.10)
Note over T,S: ⚙️ Run the node
T->>+W: IContinuumNodeActivity.run()
W->>S: Read input Parquet
W->>S: Write output Parquet
W-->>-T: Progress signals
end
rect rgba(245, 158, 11, 0.12)
Note over T,B: 📡 Live status
T-->>K: WorkflowUpdateEvent
K-->>B: Node status (MQTT over WebSocket)
end
end
deactivate T
```

## Why this survives crashes
Expand Down
95 changes: 55 additions & 40 deletions docs/contributing/create-new-nodes/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,77 @@ slug: /contributing/create-new-nodes

# Create New Nodes

This guide walks you through building a **feature worker** with your own workflow node, from an empty folder to a passing build and a worker that registers its node with the platform. The running example is a **Word Counter** node that counts the words in a text column and appends the count as a new column.
<Lead>

Start from the **`continuum-feature-template`** repository, rename it, replace its example node with yours, and ship a worker. You write one Kotlin or Java class per node. The template provides everything else.

</Lead>

<Badges>
<Badge color="cyan">Kotlin + Gradle</Badge>
<Badge color="green">9 steps</Badge>
<Badge color="cyan">Kotlin or Java</Badge>
<Badge color="green">6 steps</Badge>
<Badge color="amber">Platform 0.0.20</Badge>
</Badges>

You need to know some Kotlin and Gradle. You don't need to know Temporal, Kafka or Spring internals; the Continuum Gradle plugins and the worker starter handle those.

:::info[Versions used in this guide]
Verified against **Continuum platform `0.0.20`** (Spring Boot 4.0.6, Kotlin 2.2, Jackson 3, Gradle 8.14, JDK 21). Check [Maven Central](https://central.sonatype.com/artifact/org.projectcontinuum.core/continuum-commons) for the latest platform version, and use the same version everywhere in your project.
:::

## How the pieces fit

A feature worker is a small Gradle multi-project:

## The idea in one minute

A **node** is a block on the Workbench canvas that reads tables, does something and writes tables. Nodes live in a **feature worker**, a small Spring Boot app that registers its nodes with the platform at startup.

You don't build a worker from scratch. The template is already a complete, working worker with two example nodes (one Kotlin, one Java), a build, tests, CI/CD, a Helm chart and a local stack. Your job is to rename it and swap in your own nodes.

```mermaid
flowchart TB
S1(["🧲 <b>1 · Clone and run</b><br/>see it work first"]) --> S2(["🔭 <b>2 · Tour</b><br/>what to touch"])
S2 --> S3(["🏷️ <b>3 · Rename</b><br/>make it yours"])
S3 --> S4(["✍️ <b>4 · Write</b><br/>class, help, test"])
S4 --> S5(["🧪 <b>5 · Test and run</b><br/>see it in the Workbench"])
S5 --> S6(["🚢 <b>6 · Ship</b><br/>release and Helm"])
S6 ==> Done(["🎉 <b>Your nodes are live</b>"])

classDef setup fill:#8b5cf633,stroke:#8b5cf6,stroke-width:2px
classDef build fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef ship fill:#ec489933,stroke:#ec4899,stroke-width:2px
classDef done fill:#10b98133,stroke:#10b981,stroke-width:3px
class S1,S2 setup
class S3,S4 build
class S5,S6 ship
class Done done
linkStyle 5 stroke:#10b981,stroke-width:4px
```
continuum-feature-demo/
├── settings.gradle.kts # plugin versions + module list
├── gradle.properties # continuumPlatformVersion, featureVersion
├── features/
│ └── continuum-feature-demo/ # library module: your node classes
└── worker/ # thin Spring Boot app that hosts the nodes
```

- **Feature modules** (`org.projectcontinuum.feature` plugin) hold the node classes. They're plain libraries and can be published and reused.
- **The worker module** (`org.projectcontinuum.worker` plugin) is a Spring Boot app with no node logic of its own. It depends on your feature modules and on `continuum-worker-springboot-starter`. At startup the starter finds every `@ContinuumNode` bean, polls a Temporal task queue for node executions, and publishes one registration message per node to Kafka.

See [Node Model & Feature Registration](../../architecture/node-model.md) for what happens after registration.

## Prerequisites
## What you need

| Requirement | Notes |
|-------------|-------|
| JDK 21 | Eclipse Temurin recommended. The plugins set a Java 21 toolchain. |
| Gradle wrapper 8.14+ | Older wrappers (for example 8.4) can't load the Spring Boot 4 Gradle plugin. |
| Docker | Only needed to run the worker against the [local stack](../../getting-started/local-setup.md). |
| JDK 21 | Eclipse Temurin recommended. Check with `java -version`. |
| Docker and Compose | Runs the local Continuum stack, about 8 GB of RAM. |
| Some Kotlin or Java | You don't need to know Temporal, Kafka or Spring internals. |
| A GitHub account | The template is used from GitHub, and the release steps run on GitHub Actions. |

You **don't** need a GitHub token. All Continuum artifacts and Gradle plugins are published to **Maven Central**.
You don't need a GitHub token, and you don't need to install Gradle: the repository includes the wrapper. Everything comes from Maven Central. To publish your work you also need Docker Hub (or another registry) credentials, and optionally a Maven Central account; [Step 6](./step-6-ship-it.md) covers both.

## The steps

<Steps>

1. [Create the root project](./step-1-root-project.md)
2. [Create the feature module](./step-2-feature-module.md)
3. [Write the node](./step-3-write-the-node.md)
4. [Add node documentation](./step-4-node-documentation.md)
5. [Write unit tests](./step-5-unit-tests.md)
6. [Create the worker module](./step-6-worker-module.md)
7. [Build and test](./step-7-build-and-test.md)
8. [Run the worker against the local stack](./step-8-run-locally.md)
9. [Ship it](./step-9-ship-it.md)
1. [Clone the template and run it](./step-1-clone-and-run.md): see the example nodes working before you change anything.
2. [Tour the template](./step-2-tour-the-template.md): which files you write, which you rename and which you leave alone.
3. [Make it yours](./step-3-make-it-yours.md): a checklist for renaming the project, packages, worker and chart.
4. [Write your node](./step-4-write-your-node.md): the node class (Kotlin and Java), its help page and its unit test.
5. [Test and run your node](./step-5-test-and-run.md): build, run the worker and use your node in the Workbench.
6. [Ship it](./step-6-ship-it.md): versions, CI, release and Kubernetes.

</Steps>

If something goes wrong along the way, see [Troubleshooting](./troubleshooting.md).
After the six steps, [More node recipes](./recipes.md) covers adding more nodes, source nodes, credentials, retries, extra libraries, logging and debugging.

## Where to look when something breaks

- Your node doesn't appear in the Workbench: [Troubleshooting](./troubleshooting.md).
- The platform's side of registration: [Node Model & Feature Registration](../../architecture/node-model.md).
- A full list of errors and fixes, from the build to Kubernetes: [Troubleshooting](./troubleshooting.md).
- The template's own README and `AGENTS.md` list its commands and rules.

:::info[Versions]
Verified against **Continuum platform `0.0.20`** (Spring Boot 4.0.6, Kotlin 2.2, Jackson 3, Gradle 8.14, JDK 21). Check [Maven Central](https://central.sonatype.com/artifact/org.projectcontinuum.core/continuum-commons) for newer versions.
:::
Loading
Loading