Show HN: Dspx – Native C++ DSP Library for Node.js Built for AWS Lambda (1.3MB)
2 points
1 hour ago
| 0 comments
| HN
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

No one has commented on this post.