DEV Community

mote
mote

Posted on

MoteDB: Embedded multi-modal database for edge AI

Hi everyone,

I’ve been working on something for the past few months and finally feel it’s ready to show. It’s called MoteDB – an embedded database that’s trying to be a good fit for the kind of AI stuff happening on edge devices right now.

The short version: It’s an embedded, multi-model database (think vectors, text, spatial, time-series, plain old columns) written in Rust, designed to run inside robots, AR glasses, or industrial gizmos without needing a separate server process.

Why bother? When I was playing with some hobby robotics stuff, I kept running into the same friction: I needed to store sensor readings (time-series), find similar camera frames (vectors), remember object locations (spatial), and keep some config data (columns) – all in one place. Bolt on a vector DB here, a time-series DB there, maybe SQLite for the rest… it gets messy fast. I wanted something that just treats all these as native citizens from the start.

So MoteDB gives you:

  • A SQL interface (yes, real SQL – subqueries, joins, the works) for the boring stuff.
  • Native multi-modal indexes: You can throw vectors, text, or coordinates at it and query them directly. The index types (DiskANN-like for vectors, BM25 for text, R-tree for spatial) are built-in, not afterthoughts.
  • Embedded: It links into your Rust app. No network, no container, no drama.
  • MVCC transactions with savepoints, because even robots need consistent state.
  • It’s written in Rust. (Obviously, given where I’m posting this.) The whole thing is no_std friendly in core, with the standard runtime for the SQL parser and such.

A quick taste:

// Create a table
db.execute("CREATE TABLE items (id INT, embedding VECTOR(128), tag TEXT, location POINT)")?;

// Insert some multi-modal data
db.execute("INSERT INTO items VALUES (1, '[0.1, 0.2, ...]', 'camera_frame', POINT(10.5, 20.3))")?;

// Find similar vectors (KNN) within a spatial range
let results = db.query(
    "SELECT id, vdistance(embedding, '[0.15, 0.25, ...]') as score 
     FROM items 
     WHERE MBRContains(location, ST_GeomFromText('POLYGON((...))'))
     ORDER BY score 
     LIMIT 5"
)?;
Enter fullscreen mode Exit fullscreen mode

Performance-wise, it’s not messing around:

  • Batch inserts: ~700k rows/sec on my test hardware.
  • Vector search: <5ms latency at 95% recall.
  • Memory footprint: Core structures sit under 100MB.

It’s still early days (v0.1.0 just dropped), but the core is solid and I’m actively using it in a couple of projects. The API is stabilizing, and I’d love for more folks to kick the tires.

If you’re into:

  • Embedded systems / robotics
  • Vector search at the edge
  • Multimodal data modelling
  • Or just like poking at new Rust databases

…check out the GitHub repo. The quick start guide gets you going in about 5 minutes.

Feedback, issues, or even just a star to let me know it’s not a completely terrible idea – all very welcome. Happy to answer questions here too.

Cheers,
[Your Name/Handle]

Top comments (1)

Collapse
 
li_meluo_55007a63e1a7dcd3 profile image
li meluo

It sounds highly similar to SQLite. What competitive advantages does it have?