Skip to content

Workflow Preview in Index #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ SpacetimeDB is optimized for maximum speed and minimum latency, rather than batc

Speed and latency is achieved by holding all of your application state in memory, while persisting data to a commit log which is used to recover data after restarts and system crashes.

## Application Workflow Preview

<figure>
<img src="/images/workflow-preview-diagram.png" alt="SpacetimeDB Application Workflow Preview" style="width:100%">
<figcaption style="margin-top: 10px;" align="center">
<b align="center">SpacetimeDB Application Workflow Preview</b>
</figcaption>
</figure>


The above illustrates the Workflow that happens when using SpacetimeDB.

* All clientside reads happen with the data view that is cached locally.
* Clientside subscriptions tell the server what data client cares about and wants to be synced within its data view. Changes to data will be pushed by the server to the clientside cache.
* RLS filters restrict the data view serverside before subscriptions are evaluated. These filters can be used for access control or client scoping.
* Reducers are effectively async RPC's. The request is sent off and if the results of that reducer makes changes to data, it will be written to the database directly. As a result of that, if those changes make it through the two layers above, then the client will see the result when it queries its local cache.

## State Mirroring

SpacetimeDB can generate client code in a [variety of languages](#client-side-sdks). This creates a client library custom-designed to talk to your database. It provides easy-to-use interfaces for connecting to the database and submitting requests. It can also **automatically mirror state** from your database to client applications.
Expand Down