Skip to content
Search

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'
  • Without a separate server, clients connect directly to the DB and run application logic inside the DB
  • Optimized to guarantee 'maximum speed' and 'minimum latency' rather than for batch or OLAP workloads
    • Achieves speed by keeping all application state in memory
    • Data goes to the WAL (Write-Ahead-Log)
  • The actual backend of the MMORPG BitCraft Online runs as a single SpacetimeDB module. No separate server
  • Works as an embedded database library, so it can be embedded in your own application
    • Or it can be run directly as a separate standalone instance (using the spacetime CLI)
  • Installs on Mac/Linux/Windows as a single binary written in Rust
  • "Multiplayer at the speed of light"

See also

Favorite site

author Zer0 sitemap