
CowryPod — Digital Wallet
High-concurrency micro-transaction ledger processing 18,000+ TPS using append-only event sourcing and Redis batching.
Search Latency (Top 10)
12 ms
p99
Active RAM Overhead
42 MB
Serialization Overhead
< 0.1 ms
Zero-copy
Works on
Built with
01 / The Problem & Hard Constraints
As on-device LLMs become viable on mobile hardware via LiteRT, Local RAG is the next frontier.
02 / Architecture & Core Design Decisions
03 / Crossing the Dart/Rust FFI Boundary
The Problem: Passing a 768-dimension float array query from Dart to Rust triggers costly serialization, spiking the Dart Garbage Collector and dropping UI frames.
The Solution: Zero-Copy Pointer Passing. The Rust core allocates the memory buffer. Dart requests a memory pointer via FFI, writes the query embedding directly into C-allocated memory, and invokes the search. Serialization overhead dropped from ~12ms to 0.04ms.
Benchmarks
| Metric | Standard SQLite/JSON | ArokoDB (Rust + FFI + mmap) |
|---|---|---|
| Search Latency (Top 10) | > 850 ms | 12 ms (p99) |
| Active RAM Overhead | ~480 MB | 42 MB |
| Serialization Overhead | 12 - 18 ms | < 0.1 ms (Zero-copy) |