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
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@ npm run build

Generates static content into `build/`.

## Search

Full-text search uses [`@easyops-cn/docusaurus-search-local`](https://github.com/easyops-cn/docusaurus-search-local). The index is built with the site, so there's no external service or API key. Search only works in a production build (`npm run build && npm run serve`), not with `npm run start`. Press <kbd>Ctrl</kbd>/<kbd>⌘</kbd> + <kbd>K</kbd> to focus the search box. Results come from the docs version you're reading.

## Writing docs

Pages are Markdown with MDX, so besides normal Markdown, admonitions (`:::tip[Title]`) and ` ```mermaid ` diagrams, every page can use these components without importing them ([src/components/DocBlocks](src/components/DocBlocks/index.tsx)):

| Component | Use it for |
|-----------|------------|
| `<Lead>` | A larger intro paragraph under the page title |
| `<Badges>` / `<Badge color="green">` | A row of small coloured tags |
| `<CardGrid cols={3}>` / `<Card icon="🚀" title="…" color="pink" doc="getting-started/local-setup">` | Feature or link cards. `doc` takes a doc id and links within the version being viewed; use `href` for external links |
| `<Steps>` | Wrap a Markdown numbered list to show it as connected, numbered steps |

Colours: `purple`, `pink`, `amber`, `green`, `cyan`, `blue`, `red`, `lime`. Leave a blank line inside `<Lead>` and `<Steps>` so their content is parsed as Markdown.

Sidebar icons come from a leading emoji in `sidebar_label` or a category `label`. Categories with an emoji also set `link.title` and `link.slug` so the page heading and URL stay clean.

## Versioning

The docs are versioned by **Continuum platform version** and readers pick one from the version dropdown in the navbar.

| Folder | Served at | What it is |
|--------|-----------|------------|
| `docs/` | `/docs/next/` | Next (unreleased): edit here for upcoming platform changes |
| `versioned_docs/version-<x.y.z>/` | `/docs/` (newest) or `/docs/<x.y.z>/` | Frozen snapshot for a released platform version |

`versions.json` lists the released versions, newest first. The first entry is the default version served at `/docs/`.

**When a new platform version is released**, update `docs/` for it, then snapshot it:

```bash
npm run docusaurus docs:version 0.0.21
```

This copies `docs/` to `versioned_docs/version-0.0.21/`, copies the sidebar to `versioned_sidebars/`, and adds the version to `versions.json`.

**To fix a mistake in a released version**, edit its file under `versioned_docs/` as well as in `docs/` if the fix applies to the next version too.

## Deployment

Pushing to `main` triggers [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml), which builds the site and publishes it to GitHub Pages.
Expand Down
6 changes: 4 additions & 2 deletions docs/architecture/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"label": "Architecture",
"label": "🏗️ Architecture",
"position": 3,
"link": {
"type": "generated-index",
"description": "How a workflow actually executes, end to end."
"description": "How a workflow actually executes, end to end.",
"title": "Architecture",
"slug": "/category/architecture"
}
}
42 changes: 38 additions & 4 deletions docs/architecture/data-format.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
---
sidebar_label: "📦 Data Format"
sidebar_position: 3
---

# Data Format

<Lead>

All data passed between workflow nodes is **Apache Parquet** (Snappy-compressed, Avro schema `DataRow`) — not JSON. This keeps data columnar, compressed, and query-ready from the moment it leaves a node.

- `NodeOutputWriter.OutputPortWriter` writes rows to the node's output port(s).
- `NodeInputReader` reads rows from each connected input port.
- Output files are named `output.{portId}.parquet`; input files `input.{portId}.parquet`.
- Files are staged in a local cache path before upload to (or after download from) MinIO, the platform's S3-compatible object store.
</Lead>

<Badges>
<Badge color="green">Apache Parquet</Badge>
<Badge color="amber">Snappy</Badge>
<Badge color="purple">Avro schema DataRow</Badge>
</Badges>

```mermaid
flowchart LR
A["🧩 Node A<br/>NodeOutputWriter"] -->|"output.{portId}.parquet"| S3[("🗄️ MinIO (S3)")]
S3 -->|"input.{portId}.parquet"| B["🧩 Node B<br/>NodeInputReader"]

classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef store fill:#10b98133,stroke:#10b981,stroke-width:2px
class A,B worker
class S3 store
```

<CardGrid cols={2}>
<Card icon="✍️" title="Writing" color="purple">
`NodeOutputWriter.OutputPortWriter` writes rows to the node's output port(s).
</Card>
<Card icon="📖" title="Reading" color="cyan">
`NodeInputReader` reads rows from each connected input port.
</Card>
<Card icon="🏷️" title="File names" color="pink">
Output files are named `output.{portId}.parquet`; input files `input.{portId}.parquet`.
</Card>
<Card icon="🗂️" title="Staging" color="green">
Files are staged in a local cache path before upload to (or after download from) MinIO, the platform's S3-compatible object store.
</Card>
</CardGrid>

:::tip[Mix and match workers]
Because every node reads and writes the same Parquet/Avro format regardless of which worker or language implements it, nodes written in different feature repos — base analytics, cheminformatics, AI/ML — can be freely wired together in the same workflow graph.
:::
37 changes: 29 additions & 8 deletions docs/architecture/node-model.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
sidebar_label: "🧩 Node Model & Registration"
sidebar_position: 2
---

Expand All @@ -10,12 +11,16 @@ Every workflow node is defined inside a **feature worker** — an independent se

Every node:

<Steps>

1. Is annotated `@ContinuumNode` (not just `@Component`) — enforced at build time by a Gradle validation task and at startup by the node activity handler.
2. Extends `ProcessNodeModel` (data nodes) or `TriggerNodeModel` (source nodes).
3. Overrides `inputPorts`, `outputPorts`, and `metadata` (as `ContinuumWorkflowModel.NodeData`).
4. Implements `execute()` — the simple overload for most nodes, or the `ExecutionContext` overload for nodes that need credentials.

```kotlin
</Steps>

```kotlin title="MyNodeModel.kt"
@ContinuumNode
class MyNodeModel : ProcessNodeModel() {
override val inputPorts = mapOf("input" to ContinuumWorkflowModel.NodePort(...))
Expand All @@ -38,20 +43,34 @@ Node documentation is auto-loaded from `resources/<package>/<ClassName>.doc.md`

At startup, each worker publishes its available nodes to Kafka so the platform can build a central registry of "which node lives on which worker":

```
┌──────────────────────┐ Avro binary ┌──────────────────────┐ PostgreSQL
│ Worker (startup) │ ──── Kafka topic ─────► │ Message Bridge │ ────► registered_nodes
│ Discovers all │ FeatureRegistration │ Consumes & upserts │ (nodeId + taskQueue)
│ @ContinuumNode │ │ per node │
│ beans via Spring │ │ │
└──────────────────────┘ └──────────────────────┘
```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 -->|publish| K --> B -->|upsert| DB

classDef worker fill:#06b6d433,stroke:#06b6d4,stroke-width:2px
classDef stream fill:#f59e0b33,stroke:#f59e0b,stroke-width:2px
classDef core fill:#ec489933,stroke:#ec4899,stroke-width:2px
classDef store fill:#10b98133,stroke:#10b981,stroke-width:2px
class W worker
class K stream
class B core
class DB store
```

<Steps>

1. On `ApplicationReadyEvent`, the worker iterates every `ContinuumNodeModel` bean it has.
2. For each node, it builds a `FeatureRegistrationRequest` — containing `nodeId` (fully-qualified class name), `workerId`, `featureId`, `taskQueue`, a JSON `nodeManifest` (ports, schemas, title, icon), and the node's documentation markdown — and publishes it to Kafka (Avro, keyed by `nodeId`).
3. `continuum-message-bridge` consumes the message and performs an atomic upsert into the `registered_nodes` table.
4. The orchestration service's `InitializeActivity` later queries this registry (via the API server) to resolve which task queue should run each node in a workflow.

</Steps>

`featureId` is derived by stripping the trailing `.node` package segment from the class name, e.g. `org.projectcontinuum.feature.analytics.node.CreateTableNodeModel` → `org.projectcontinuum.feature.analytics`.

`nodeManifest` is kept as an opaque JSON string (not typed Avro fields) so the schema stays forward-compatible as `NodeData` evolves. Registration is one message per node, enabling clean idempotent upserts, and `extensions` (a `map<string>`) is reserved for future fields without breaking schema compatibility.
Expand All @@ -63,4 +82,6 @@ Nodes that need external secrets (API keys, DB passwords) don't receive them aut
- The node's `propertiesUISchema` declares a control with `options.format = "credential"` purely so `continuum-workbench` renders a credential picker in its config dialog — the backend doesn't read this schema.
- Inside `execute()`, the node reads its own `properties` to find the configured credential name, then calls `executionContext.getCredential<T>(name)`. This fetches the credential on demand from `continuum-credentials-server` (`GET /api/v1/credentials/{name}`) and deserializes it into `T`, throwing if not found.

:::info[Credentials are never stored in the workflow]
Credentials are fetched lazily, per execution — never bundled into the workflow definition or passed through Kafka.
:::
103 changes: 73 additions & 30 deletions docs/architecture/overview.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,56 @@
---
sidebar_label: "🗺️ System Overview"
sidebar_position: 1
---

# System Overview

Continuum is split into a browser frontend, a core backend (API server + Temporal orchestration), and independent feature workers that provide the actual workflow nodes.

```
┌─────────────────────────────────────────────────────┐
│ BROWSER (Continuum Workbench) │
│ Eclipse Theia IDE + React Flow drag-and-drop │
└──────────────┬────────────────────┬─────────────────┘
│ REST │ MQTT / WebSocket
▼ ▼
┌────────────────┐ ┌──────────────────┐
│ API Server │ │ Message Bridge │
│ │ │ Kafka → MQTT │
└───────┬────────┘ └────────▲─────────┘
│ │
▼ │
┌──────────────┐ ┌────────┴────────┐
│ Temporal │ │ Kafka │
│ orchestration │ │ │
└───────┬───────┘ └────────▲────────┘
│ dispatches │ events
▼ │
┌──────────────────────────────┐
│ FEATURE WORKERS │
│ Base · Cheminformatics · AI │
└──────────────┬───────────────┘
│ read / write
▼
┌─────────────────┐
│ MinIO (S3) │
│ Parquet files │
└─────────────────┘
```mermaid
flowchart TB
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"]

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

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

UI -->|REST| API
Bridge -->|MQTT / WebSocket| 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
class UI ui
class API,Temporal core
class Kafka,Bridge stream
class Base,Chem,AI worker
class MinIO store
```

## Execution flow

<Steps>

1. You design a workflow in the browser (React Flow canvas) and hit **Execute**.
2. `continuum-api-server` receives the REST call and starts a Temporal workflow (`ContinuumWorkflow`, on `WORKFLOW_TASK_QUEUE`).
3. `InitializeActivity` resolves which task queue (= which worker) handles each node, via `POST /api/v1/node-explorer/nodes/task-queues` against the API server's node registry.
Expand All @@ -48,9 +60,40 @@ Continuum is split into a browser frontend, a core backend (API server + Tempora
7. `continuum-message-bridge` consumes the Kafka event and republishes it to Mosquitto (MQTT).
8. The browser receives the update over MQTT-over-WebSocket and lights up the corresponding node in real time.

</Steps>

The same flow as a sequence:

```mermaid
sequenceDiagram
autonumber
participant B as 🖥️ Browser
participant A as 🌐 API Server
participant T as ⏱️ Temporal
participant W as 🧩 Worker
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)
end
```

## Why this survives crashes

Temporal persists workflow state (in PostgreSQL) at every step. If a worker process dies mid-execution, the orchestration service simply redispatches the pending activity once a worker becomes available again — no data loss, no restart from scratch. This is the "crash-proof execution" promise: a failed Kafka broker, a restarted worker pod, or a dropped network connection doesn't lose workflow progress.
:::tip[Crash-proof by design]
Temporal persists workflow state (in PostgreSQL) at every step. If a worker process dies mid-execution, the orchestration service simply redispatches the pending activity once a worker becomes available again — no data loss, no restart from scratch.
:::

This is the "crash-proof execution" promise: a failed Kafka broker, a restarted worker pod, or a dropped network connection doesn't lose workflow progress.

## Task queues

Expand Down
6 changes: 4 additions & 2 deletions docs/contributing/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"label": "Contributing",
"label": "🤝 Contributing",
"position": 7,
"link": {
"type": "generated-index",
"description": "Add your own workflow nodes to Project Continuum."
"description": "Add your own workflow nodes to Project Continuum.",
"title": "Contributing",
"slug": "/category/contributing"
}
}
2 changes: 1 addition & 1 deletion docs/contributing/create-new-nodes/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "Create New Nodes",
"label": "🛠️ Create New Nodes",
"position": 2,
"link": {
"type": "doc",
Expand Down
12 changes: 11 additions & 1 deletion docs/contributing/create-new-nodes/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ slug: /contributing/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.

<Badges>
<Badge color="cyan">Kotlin + Gradle</Badge>
<Badge color="green">9 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
:::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.
:::

Expand Down Expand Up @@ -45,6 +51,8 @@ You **don't** need a GitHub token. All Continuum artifacts and Gradle plugins ar

## 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)
Expand All @@ -55,4 +63,6 @@ You **don't** need a GitHub token. All Continuum artifacts and Gradle plugins ar
8. [Run the worker against the local stack](./step-8-run-locally.md)
9. [Ship it](./step-9-ship-it.md)

</Steps>

If something goes wrong along the way, see [Troubleshooting](./troubleshooting.md).
5 changes: 5 additions & 0 deletions docs/contributing/create-new-nodes/step-1-root-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ title: "Step 1: Create the root project"

# Step 1: Create the root project

<Badges>
<Badge color="purple">Step 1 of 9</Badge>
<Badge color="green">11% through the guide</Badge>
</Badges>

Create the folder and add a Gradle wrapper. If Gradle is installed, run `gradle wrapper --gradle-version 8.14`. Otherwise, copy `gradlew`, `gradlew.bat` and `gradle/wrapper/` from an existing feature repo such as `continuum-feature-base`.

**`gradle.properties`**
Expand Down
7 changes: 6 additions & 1 deletion docs/contributing/create-new-nodes/step-2-feature-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ title: "Step 2: Create the feature module"

# Step 2: Create the feature module

<Badges>
<Badge color="purple">Step 2 of 9</Badge>
<Badge color="green">22% through the guide</Badge>
</Badges>

**`features/continuum-feature-demo/build.gradle.kts`**

```kotlin
Expand All @@ -22,7 +27,7 @@ continuum {
}
```

:::warning Always set `continuumVersion`
:::warning[Always set `continuumVersion`]
If you leave out the `continuum { }` block, the plugin falls back to a built-in default version that is older than the plugin itself. Read the value from `gradle.properties` so plugins and libraries always match.
:::

Expand Down
Loading
Loading