Check out our all new pricing plans! Learn more.

Serverless. ACID + Relational. Built for speed.

The easiest way to build a multiplayer

use spacetimedb::{table, reducer, ReducerContext, Table};

#[table(name = person, public)]
pub struct Person {
    name: String,
}

#[reducer]
pub fn add(ctx: &ReducerContext, name: String) {
    log::info!("Inserting {}", name);
    ctx.db.person().insert(Person { name });
}

#[reducer]
pub fn say_hello(ctx: &ReducerContext) {
    for person in ctx.db.person().iter() {
        log::info!("Hello, {}!", person.name);
    }
    log::info!("Hello, World!");
}

Try the demo

Start by editing the example Rust or C# module. Click "Go live" to publish your SpacetimeDB module instantly.
use spacetimedb::{table, reducer, ReducerContext, Table};

#[table(name = person, public)]
pub struct Person {
    name: String,
}

#[reducer]
pub fn add(ctx: &ReducerContext, name: String) {
    log::info!("Inserting {}", name);
    ctx.db.person().insert(Person { name });
}

#[reducer]
pub fn say_hello(ctx: &ReducerContext) {
    for person in ctx.db.person().iter() {
        log::info!("Hello, {}!", person.name);
    }
    log::info!("Hello, World!");
}

A SERVER AND DATABASE IN ONE.

What is SpacetimeDB

You can think of SpacetimeDB as both a relational database and a server combined into one. Instead of deploying a web or game server that sits in between your clients and your database, clients connect directly to the database and execute your logic inside the database itself. No more Docker, Kubernetes, VMs, microservices or extensive ops infrastructure.

We built SpacetimeDB because we needed a reliable, transactional and super fast backend to run BitCraft. The entire backend, including all logic, real-time updates, and persistent state, is implemented as a SpacetimeDB module.

Learn More
Why use SpacetimeDB
Deploying to
Cloud Service Provider
  • 1
    Set up accounts/billing with a cloud provider
  • 2
    Figure out cloud services for your use case
  • 3
    Provision services and machines
  • 4
    Configure a persistence layer/database
  • 5
    Manage persistent state across deploys
  • 6
    Become a Docker + Kubernetes wizard
  • 7
    Configure networking policy
  • 8
    Choose a performant web server technology
  • 9
    Use an ORM or raw SQL to talk to your database
  • 10
    Develop a protocol for client/.server state sync
  • 11
    Hard-code persistence logic for in-memory state
  • 12
    Design a bespoke permissions system
  • 13
    And after all that you've still got atomicity, consistency, and isolation problems!
  • 1
    Set up accounts/billing with a cloud provider
  • 2
    Figure out cloud services for your use case
  • 3
    Provision services and machines
  • 4
    Configure a persistence layer/database
  • 5
    Manage persistent state across deploys
  • 6
    Become a Docker + Kubernetes wizard
  • 7
    Configure networking policy
  • 8
    Choose a performant web server technology
  • 9
    Use an ORM or raw SQL to talk to your database
  • 10
    Develop a protocol for client/.server state sync
  • 11
    Hard-code persistence logic for in-memory state
  • 12
    Design a bespoke permissions system
  • 13
    And after all that you've still got atomicity, consistency, and isolation problems!
Deploying to
SpacetimeDB
1
Write a SpacetimeDB module
2
Compile the module to WebAssembly
3
Upload to SpacetimeDB
Modern Database Environment
Modern database environment
SpacetimeDB takes stored procedures to the next level, allowing you to deploy your whole app directly into the database for the best performance and developer experience.
documentation

Old ideas. Brand new paradigm.

SpacetimeDB is a developer-first platform that builds on concepts from computer science which date back to the 1960s. We're bridging the gap between theoretical foundations and developer experience to make development delightful again.
  • Serverless

    Serverless

    SpacetimeDB is a serverless technology. That means you don't have to deal with machines, VMs, containers, or deployments. All you do is upload your module and we handle scaling, replicas, scheduling, data migration, and more.
  • ACID + Relational

    ACID + Relational

    SpacetimeDB is a genuine, general purpose relational database with ACID transactions. That means it's just as powerful as your old relational database and better performance is just an index declaration away. Imagine being able to query every single piece of live game data at run-time.
  • Built for speed

    Built for speed

    SpacetimeDB wasn't built in a vacuum. It's the system that powers our own large-scale MMORPG BitCraft. We designed it specifically for the performance requirements of games. That means extremely low latency (~100 us/Tx) and extremely high throughput (~100,000 Tx/s).
Supporters

Some of our investors