Skip to content
Open
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
87 changes: 87 additions & 0 deletions docs/diagrams/bioloop_architecture.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
digraph bioloop_architecture {
rankdir=TB;
node [shape=box, style=filled, fontname="Helvetica", fontsize=11];
edge [fontname="Helvetica", fontsize=9];
compound=true;
nodesep=0.6;
ranksep=0.8;
splines=ortho;

// ── Row 1: User ──
user [label="Researcher /\nOperator", shape=ellipse, style=filled, fillcolor="#e0e0e0"];

// ── Row 2: Frontend ──
subgraph cluster_frontend {
label="Frontend";
style=filled; fillcolor="#dce8f8";
ui [label="UI\n(Vue 3 / Vite)", fillcolor="#b3d4f5"];
}

// ── Row 3: Core Services + Auth side by side ──
subgraph cluster_core {
label="Core Services";
style=filled; fillcolor="#fff3cd";
api [label="API\n(Node / Express)", fillcolor="#ffe082"];
secure_dl [label="Secure Download\n(Node.js)", fillcolor="#ffe082"];
}

subgraph cluster_auth {
label="Auth";
style=filled; fillcolor="#fde8e8";
signet [label="Signet\n(OAuth 2.0)", fillcolor="#f5b8b8"];
signet_db [label="PostgreSQL\n(Signet)", fillcolor="#f5b8b8"];
}

// ── Row 4: Rhythm (left) + Workers (right) ──
subgraph cluster_workflow {
label="Workflow Engine (Rhythm)";
style=filled; fillcolor="#e8f5e8";
rhythm [label="Rhythm API\n(FastAPI)", fillcolor="#a5d6a7"];
queue [label="RabbitMQ", fillcolor="#a5d6a7"];
mongo [label="MongoDB\n(Task State)", fillcolor="#a5d6a7"];
}

subgraph cluster_workers {
label="Workers (Python / Celery)";
style=filled; fillcolor="#f0e8ff";
celery [label="celery_worker\n(Task Executor)", fillcolor="#ce93d8"];
watch [label="watch\n(File Monitor)", fillcolor="#ce93d8"];
}

// ── Row 5: Storage ──
subgraph cluster_storage {
label="Storage";
style=filled; fillcolor="#fff8e1";
postgres [label="PostgreSQL\n(App Data)", fillcolor="#ffe57f"];
landing [label="Shared File Volume\n(/opt/sca/data)", shape=cylinder, fillcolor="#ffe57f"];
}

// ── Rank constraints for portrait layout ──
{ rank=same; user }
{ rank=same; ui }
{ rank=same; api; secure_dl; signet }
{ rank=same; rhythm; queue; celery; watch }
{ rank=same; postgres; landing; mongo }

// ── Edges ──
user -> ui;
ui -> api;
ui -> secure_dl;

api -> signet;
signet -> signet_db;

api -> rhythm [label="dispatch"];
api -> postgres;

rhythm -> queue;
rhythm -> mongo;
queue -> celery [label="tasks"];
celery -> mongo [label="results"];
celery -> landing;

watch -> landing;
watch -> api [label="trigger\ningest"];

secure_dl -> landing;
}
244 changes: 244 additions & 0 deletions docs/diagrams/bioloop_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/diagrams/dataflow_pipeline.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
digraph dataflow_pipeline {
rankdir=TB;
node [shape=box, style=filled, fontname="Helvetica"];
compound=true;

subgraph cluster_lab {
label="Laboratory";
style=filled; fillcolor="#f0f0f0";
inst1 [label="Instrument\n(legacy OS)", fillcolor="#d0d0d0"];
inst2 [label="Instrument\n(modern)", fillcolor="#d0d0d0"];
}

subgraph cluster_vm {
label="Hosted Instance";
style=filled; fillcolor="#dce8f8";

samba [label="Samba\n(SMB Gateway)", fillcolor="#b3d4f5"];

subgraph cluster_bioloop {
label="Bioloop";
style=filled; fillcolor="#e8f0fc";
watch [label="watch worker\n(file monitor)", fillcolor="#90caf9"];
bioloop [label="API + celery_worker\n(orchestration)", fillcolor="#90caf9"];
}

tape [label="Tape Archive\n(HPSS / SDA)", shape=cylinder, fillcolor="#b3d4f5"];
hpc [label="HPC Filesystem\n(Lustre / Slate)", shape=cylinder, fillcolor="#b3d4f5"];
}

subgraph cluster_access {
label="Researcher Access";
style=filled; fillcolor="#e8f5e8";
webui [label="Web Browser\n(Bioloop UI)", fillcolor="#a5d6a7"];
hpclogin [label="HPC Systems\n(direct access)", fillcolor="#a5d6a7"];
}

inst1 -> samba [label="SMB write"];
inst2 -> samba [label="SMB write"];
samba -> watch [label="new files detected"];
watch -> bioloop [label="trigger ingest"];

bioloop -> tape [label="1. archive\n(tar + checksum)"];
tape -> bioloop [label="confirmed"];
bioloop -> hpc [label="2. stage\n(untar to Lustre)"];

hpc -> webui [label="secure download"];
hpc -> hpclogin [label="direct I/O"];
webui -> bioloop [label="manage / notify"];
}
Loading