Comparison
How TopGun compares to other solutions in the ecosystem.
| Feature | TopGun | Firebase | Supabase Realtime | Yjs | RxDB | Replicache | InstantDB |
|---|---|---|---|---|---|---|---|
| Primary Model | Local-First CRDT grid | Cloud Doc DB | Postgres pub/sub | Collaborative CRDT framework | Local-First DB | Client-auth sync | Local-first graph DB |
| Offline Support | First-Class | Good | Limited | Excellent | Excellent | Good | First-Class |
| Latency | ~0ms (in-memory) | Network-dependent | Network-dependent | ~0ms (in-memory) | ~5–10ms (IndexedDB) | ~0ms local / server-validated | ~0ms (in-memory) |
| Backend Control | Self-host (Apache-2.0) | Proprietary | Self-host or Supabase Cloud | BYO transport / provider | CouchDB / Custom | Self-host or Replicache Cloud | InstantDB Cloud (self-host community) |
| Consistency | HLC + CRDT | Server-authoritative LWW | Server Authority | CRDT (Y-types) | Revision Trees | Server Authority | Server-authoritative with optimistic UI |
| Distributed Locks | Fencing Tokens (single-node stable; cluster Raft: in progress) | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |
| License | Apache-2.0 | Proprietary | Apache-2.0 | MIT | Apache-2.0 / Proprietary (Premium) | Apache-2.0 | MIT (client) + proprietary cloud |
| AI Agents (MCP) | Native — read, mutate, search & subscribe over MCP (8 tools, stdio) | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |
| Hybrid Search | Tri-hybrid (exact + BM25 + HNSW vector), RRF-fused, live subscriptions | No built-in hybrid search in the realtime path | No built-in vector/hybrid search in the realtime path | Not Supported | Full-text via plugin; no built-in vector/hybrid | Not Supported | No built-in vector/hybrid search |
Distributed Locks — Deployment Mode Semantics
Distributed locks in cluster mode currently use partition-routing without Raft consensus. They are safe for deployments where a single node owns the relevant partition, but provide weaker guarantees under split-brain. Raft-backed cluster locks are in development.
Why TopGun?
- vs Firebase:
TopGun gives you ownership of your data. Run it on your own cloud, use your own backend, and never get locked into a proprietary platform.
- vs Supabase Realtime:
Supabase Realtime is Postgres pub/sub — great for server-driven events, but not designed for offline-first local writes. TopGun persists data locally in IndexedDB and syncs seamlessly when the network returns.
- vs Yjs:
Yjs is an excellent CRDT framework for collaborative text editing but requires you to bring your own transport, persistence, and server. TopGun ships with a full server, IndexedDB persistence, and a React SDK out of the box.
- vs RxDB:
RxDB is a mature local-first database with good offline support, but its writes go through IndexedDB (5–10ms). TopGun operates entirely in-memory for zero-latency reads/writes, with async write-behind to the configured backend.
- vs Replicache:
TopGun uses CRDTs for automatic conflict resolution — mutations apply locally first and merge deterministically. Replicache is server-authoritative: mutations queue and the server validates them. Related: Zero (also from Rocicorp) offers a similar server-authoritative model with a managed cloud option. Both Replicache and TopGun are Apache-2.0 open source.
- vs InstantDB:
InstantDB is a local-first graph database with an excellent developer experience. It currently runs on InstantDB Cloud (community-led self-hosting available via the open-source repo). TopGun is fully self-hostable under Apache-2.0 with no cloud dependency.
- AI agents:
TopGun’s bundled MCP server gives AI assistants (Claude Desktop, Cursor, or any MCP-compatible client) native read/write/search/subscribe access to your live CRDT data over stdio — no proxy or custom integration required. None of the compared tools ship a first-party MCP server today.
- Hybrid search:
TopGun runs exact, BM25 full-text (tantivy), and HNSW semantic vector search in a single query and fuses results with Reciprocal Rank Fusion. Subscriptions update in real time as data changes. The compared tools either lack built-in vector/hybrid search or require a separate search service outside the sync path.