DEV Community
•
2026-07-25 14:13
Serving a local model from a Raspberry Pi: one process for browsers (SSE) and devices (MQTT)
You have a small box — a Raspberry Pi, a Jetson, a cheap ARM VM — running a local model. Two kinds of traffic want in:
People (browser tabs, curl, httpx scripts) call an HTTP endpoint and want the answer streamed token by token, not after the last token.
Devices (sensors, cameras, controllers) speak MQTT. They report telemetry and drop batch jobs.
The conventional stack for that is three or ...