384I build for the war zone.
← Back to Arsenal

// case study · fullstack

BioStream ML.

Real-Time Surgical Telemetry Engine

PythonRedis StreamsDockerIsolation Forest
View on GitHub →

// the problem

In OR telemetry, deterioration is caught by eye — minutes after it starts. Monitors beep on threshold, not trend. That window is where patients are lost.

// overview

Patient monitors today beep when a vital crosses a threshold. By the time the threshold trips, the deterioration has been under way for minutes — a window where the anomaly is visible in the trend but invisible to the alarm. BioStream fills that gap with online anomaly detection on the stream itself.

// how it works

  • 01Redis Streams as the event bus — gives us consumer groups, exactly-once-ish semantics, and back-pressure for free.
  • 02Isolation Forest trained on quiet periods, re-scored per patient so idiosyncratic baselines don't trigger alerts.
  • 03Dockerized pipeline — the ML step, the ingress, and the alert sink each scale independently.
  • 04Idempotent writes downstream so a replay on failure can't double-alert a clinician.

// measured impact

Throughput

~3,000 events/s

single-node dev pipeline

Per-event latency

< 5 ms (p50)

ingress → anomaly score

Data loss under forced restart

0

Redis Streams + idempotent sink

// what I'd change

Isolation Forest was the right starting point — cheap, interpretable, no labels needed. At scale I'd pair it with a lightweight LSTM on top for trend detection the forest misses, and swap Redis Streams for a Kafka-backed ingress if the hospital has the infra for it.

// want one of these for your stack?

I take on systems work with clear, measurable outcomes.

Start a project