SpaceTimeDB
lastmod 2025-04-11created 2023-08-222 edits
DB for building multiplayer games/apps. A system that combines a database with server functionality.
About
- SpacetimeDB is a system that combines a database with server functionality
- Instead of running a separate traditional web or game server, clients connect directly to the database and run application logic
- App logic can be uploaded directly to the database as stored procedures in the form of "modules" written in Rust
- The entire application can be deployed as a single Rust binary, with no need for DevOps, containers, servers, microservices, etc.
Features
- Similar in concept to smart contracts, but unrelated to blockchain
- Much faster than existing smart contract systems
- Every element in the game is processed in the database in real time and synced to clients
- Optimized for real-time applications and designed to minimize latency
- Application state is kept in memory and written to a WAL (Write-Ahead Log) for recovery
- A relational database that can also store application logic directly
- In the form of stored procedures called 'Modules'
- Achieves speed by keeping all application state in memory
- Data goes to the WAL (Write-Ahead-Log)
- Or it can be run directly as a separate standalone instance (using the spacetime CLI)