DeBros Network Overview¶
The DeBros Network is a decentralized P2P system built in Go that provides:
- Distributed SQL database powered by RQLite (Raft consensus)
- Topic-based Pub/Sub messaging
- Peer discovery and resilient networking over LibP2P
- HTTP/WebSocket gateway with enhanced authentication (API keys, JWT, wallet)
Components¶
- Node: Full P2P participant that runs services (RQLite database, pubsub), manages discovery, and participates in replication.
- Client: Lightweight library for apps and CLI. Connects only to bootstrap peers and exposes Database, PubSub, and NetworkInfo interfaces.
- Gateway: REST and WebSocket surface over the client with authentication and namespace enforcement.
Architecture¶
┌─────────────────────────────────────────────────────────────┐
│ DeBros Network Cluster │
├─────────────────────────────────────────────────────────────┤
│ Application Layer │
│ ┌─────────────┐ ┌─────────────┐ ┌────────────────────────┐ │
│ │ Anchat │ │ Custom App │ │ CLI Tools │ │
│ └─────────────┘ └─────────────┘ └────────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Client API │
│ ┌─────────────┐ ┌────────────────────────┐ │
│ │ Database │ │ PubSub │ │
│ │ Client │ │ Client │ │
│ └─────────────┘ └────────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Network Node Layer │
│ ┌─────────────┐ ┌─────────────┐ ┌────────────────────────┐ │
│ │ Discovery │ │ PubSub │ │ Database │ │
│ │ Manager │ │ Manager │ │ (RQLite) │ │
│ └─────────────┘ └─────────────┘ └────────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Transport Layer │
│ ┌─────────────┐ ┌─────────────┐ ┌────────────────────────┐ │
│ │ LibP2P │ │ Noise/TLS │ │ RQLite │ │
│ │ Host │ │ Encryption │ │ Database │ │
│ └─────────────┘ └─────────────┘ └────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Features¶
- Distributed SQL with ACID semantics and automatic failover
- Namespaced multi-tenancy for data isolation
- Real-time messaging via Pub/Sub and WebSockets
- Secure transport (Noise/TLS), peer identity management
- Simple CLI and client APIs for app integration
See also: network/README.md
for deeper details.