clockworklabs / clockworklabs/SpacetimeDB

Docs: Dataflow schematic of Stdb

Open
#5,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

it would be nice to have a dataflow schematic of how spacetimedb works.
where in the function chains gets the data copied into and from wasm:

  • ctx.db.table().column().find()
  • ctx.db.table().index().filter()
  • ctx.db.table().insert()
  • ctx.db.table().column().delete()
  • ctx.db.table().column().update()
  • ctx.db.table().iter()
  • when and where views run.
  • how the subscription response get's calculated
  • where and how the clog get's written
  • how the error rollback works. (do attempted row writes get counted to the energy cost?)
  • what runs in it's own thread? what uses more than one core? what shares a core?

and so on
it's basically about how to optimize and write stdb by understanding what is happening with the data inside and outside of wasm.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the listed entry points, including ctx.db.table().column().find(), index().filter(), insert(), delete(), update(), iter(), views, subscription responses, the clog, and rollback behavior. Map where data crosses WASM, what is copied, and how threading and energy costs work; done means a dataflow schematic covers these paths and explains the relevant execution boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
databases, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.