{"repo":"heywinit/discodb","free":true,"listed":false,"github":"https://github.com/heywinit/discodb","clone":"git clone https://github.com/heywinit/discodb.git","description":"relational database stored in discord guilds","language":"Go","stars":151,"topics":["database","discord","relational-database","sql"],"license":"GPL-3.0","category":"databases-storage","readme_excerpt":"discodb A relational database implemented entirely on top of Discord's primitives. What is discodb? discodb treats Discord as a distributed storage backend: - Messages → Row storage / WAL entries - Channels → Segments (heap files) - Categories → Table namespaces - Roles → Free Space Map (tracking free slots) - Forum channels → B-Tree indexes - Threads → TOAST/overflow storage - Attachments → Blob storage Built in Go, discodb exposes a PostgreSQL-compatible wire protocol, so you can connect using psql : Key Characteristics - Log-structured : Append-only design, not heap-based - Eventually consistent : Built on Discord's eventual consistency with transactional overlays - API-bound : All I/O is network-bound and rate-limited - WAL-first : Write-Ahead Logging ensures durability and recoverability - MVCC : Multi-Version Concurrency Control via append-only row versions Why? It sounded funny, I won't lie. Also, Discord provides primitives that, while not designed for database use, can be leveraged as storage surface: Discord Primitive Database Concept ------------------ ------------------ Guild Database Category Table namespace Channel Segment (heap file) Message Row / WAL entry Embed Column storage Thread TOAST / overflow Attachment Blob storage Role FSM page Forum Channel B-Tree index The challenge is building correctness guarantees (ACID properties) on top of an API that wasn't designed for this purpose. Architecture Your standard database with Discord as the underlying storage e","default_branch":null,"files":null,"tree":[],"storefront":"/r/heywinit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/heywinit/discodb/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}