Back to browse
Dspx – Native C++ DSP Library for Node.js Built for AWS Lambda (1.3MB)

Dspx – Native C++ DSP Library for Node.js Built for AWS Lambda (1.3MB)

by a-kgeorge·Mar 10, 2026·2 points·0 comments

AI Analysis

●●●BangerNiche GemBig Brain

1.3MB C++ DSP library for Node.js Lambda beats SciPy's 90MB bloated package.

Strengths
  • 1.3MB bundle size crushes SciPy's 90MB limit for serverless deployments.
  • State serialization handles BLE jitter and clock drift elegantly.
Weaknesses
  • Niche intersection of Node, DSP, and Lambda limits potential user base.
  • C++ bindings add maintenance overhead for JS ecosystem users.
Target Audience

Node.js developers doing signal processing on serverless

Similar To

SciPy · Node-audio-processing · AWS Lambda Layers

Post Description

This grew out of a project called Myovine — a BLE EMG armband that streams 2 kHz × 8 channels to a mobile app for real-time muscle activity analysis. The signal processing ran on Lambda, which meant SciPy was immediately out (60–90MB package, 250MB unzipped limit). Existing JS options either had no concept of serializing filter state across invocations or weren't fast enough for the throughput requirements. So I built dspx around three constraints: small enough to deploy on Lambda, fast enough to matter (105M samples/sec on arm64), and stateful enough to resume — full pipeline state serializes to ElastiCache in 0.008ms binary. The harder problem turned out to be irregular timestamps. BLE jitter, packet loss, and hardware clock drift mean sensor data rarely arrives at consistent intervals. TimeAlignment handles resampling as a first-class pipeline stage with PLL-based drift compensation, and that state serializes with everything else.

Benchmarks, architecture writeup, and the hybrid EC2 + Lambda cost model: https://a-kgeorge.me/projects/dspx

Benchmark suite (JS, Python, Java across Ryzen 9 5900X, i5-12600T, GCP Xeon, Lambda arm64/x64): https://github.com/A-KGeorge/dspx-benchmark/tree/main/charts

Similar Projects

OtherMid

Order Empanadas from the CLI in SF

Hardcoded menu mapping breaks on price changes, but ordering burritos via pip is fun.

CozyShip It
willy_
202mo ago