Synapse: The High Performance Systems Trilogy
Synapse is a suite of three complementary, zero-dependency, ultra-fast systems libraries written in Rust with native bindings for Go, C, and Python.
It provides everything developers need to build high-speed storage, typo-tolerant search, and instant autocomplete with microsecond latencies.
Performance Benchmarks
All operations execute in microseconds (tested on Intel Core i5-11400 @ 4.40 GHz via Go bindings):
| Operation | Latency | Throughput | Description |
|---|---|---|---|
StorePut |
2.9 µs | ~343,000 ops/sec | Append-only WAL write + in-memory MemTable update |
StoreGet |
3.2 µs | ~311,000 ops/sec | Binary-searched SSTable + MemTable lookup |
SearchAutocomplete |
2.5 µs | ~392,000 queries/sec | Prefix Trie traversal |
SearchFuzzy |
12.3 µs | ~81,000 queries/sec | Levenshtein edit-distance typo correction |
The Trilogy Architecture
┌────────────────────────┐
│ Host Application │
│ (Go, Python, C++, Node)│
└───────────┬────────────┘
│ Zero-Copy FFI Call
▼
┌────────────────────────────────────────────────────────┐
│ synapse-bridge (C ABI) │
└──────────────┬──────────────────────────┬──────────────┘
│ │
▼ ▼
┌────────────────────────┐ ┌─────────────────────────────┐
│ synapse-store │ │ synapse-search │
│ Embedded LSM-Tree DB │ │ Fuzzy & Autocomplete Engine│
│ │ │ │
│ • BTreeMap MemTable │ │ • Prefix Trie (Autocomplete)│
│ • Append-Only WAL │ │ • Levenshtein Edit-Distance │
│ • Indexed SSTables │ │ • Inverted Index (TF-IDF) │
│ • Level Compaction │ │ │
└────────────────────────┘ └─────────────────────────────┘
Quickstart
1. Using in Go
package main
import (
"fmt"
"synapse"
)
func main()
2. Using in Rust
Add the dependencies to your Cargo.toml:
[]
= { = "synapse-store" }
= { = "synapse-search" }
use SynapseStore;
use SynapseSearch;
Testing & Verification
Run all workspace tests:
Run Go test harness & benchmarks:
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.