Skip to content

Predictive Maintenance at the Edge

Finds machines whose behaviour resembles past pre-failure signatures.

Industry Level Difficulty Recommended mode
Manufacturing & IoT 5 of 5 Frontier sq8
  • Failures are rare but costly.
  • Fleet data is distributed.
  • Edge hardware is limited.

How SrvDB powers Predictive Maintenance at the Edge

Section titled “How SrvDB powers Predictive Maintenance at the Edge”
  1. Pre-failure signature windows from past failures are stored.
  2. Live windows are matched to them on the device.
  3. Fleet learning by shipping database snapshots.
  4. Rust API for embedded services.
Today With Predictive Maintenance at the Edge on SrvDB
Run to failure Early warnings
Per-site learning Fleet-wide signatures
Heavy cloud pipelines Small edge footprint
  1. Label past failures.
  2. Extract pre-failure windows.
  3. Store and ship snapshots.
  4. Match live windows.
  5. Schedule maintenance.
  • SQ8 compression (sq8): stores each value in one byte, 4× smaller than full precision.
  • Rust API: embed SrvDB directly in Rust services and devices.
  • Crash-safe persist(): after it returns, data survives a crash or power loss and reopens exactly as committed.
  • True cosine scores: scores in [-1, 1] mean the same in every mode, so thresholds are stable.
  • Bearing failures
  • Pump cavitation
  • Compressor faults
  • Conveyor wear
  • Spindle issues
  • HVAC failures

embed() is your embedding model (for example sentence-transformers, or a function that turns your records into feature vectors).

import json
import srvdb
db = srvdb.Database("./predictive-maintenance-edge-db", dimension=128, mode="sq8")
def ingest(items):
"""items: list of (id, text, metadata dict)"""
db.upsert(
ids=[i for i, _, _ in items],
embeddings=[embed(t) for _, t, _ in items],
metadatas=[json.dumps(m) for _, _, m in items],
)
db.persist() # crash-safe checkpoint
def pre_failure_match(window, k=5):
hits = db.search(embed(window), k)
return [(json.loads(db.get(i)), round(score, 3)) for i, score in hits]
  • Needs enough labelled failures; validate before acting.
  1. Prototype: load a sample of real data with flat mode and check that searches return what an expert expects.
  2. Measure: if you move to an approximate mode, compare its results with flat on the same queries (recall).
  3. Pipeline: add continuous upsert and decide when to call persist().
  4. Harden: test restarts and crashes, add logging, review every output path with domain experts.
  5. Deploy: ship the database directory with the application or service.
Level Project What it does
1 · Beginner Maintenance Assistant Technicians describe a symptom and get the right manual section and past fixes.
2 · Intermediate Defect Matcher Matches new defects to past ones, from text and images.
3 · Advanced Sensor Anomaly Detector Flags sensor windows far from normal operation.
4 · Expert Plant Knowledge Agent An agent with shift memory across lines, manuals and quality records.
5 · Frontier Predictive Maintenance at the Edge (this page) Finds machines whose behaviour resembles past pre-failure signatures.

See also: Use cases · Live examples (coming soon)