Skip to content

Commit 5eac1b3

Browse files
bfopscloutiertyler
andauthored
Add workflow preview diagram in index (#3139)
# Description of Changes Migrate clockworklabs/spacetime-docs#328 since we are merging that repo into this one. # API and ABI breaking changes None. Docs-only change. # Expected complexity level and risk 1 # Testing None --------- Signed-off-by: Zeke Foppa <[email protected]> Co-authored-by: Zeke Foppa <[email protected]> Co-authored-by: Tyler Cloutier <[email protected]>
1 parent f68369d commit 5eac1b3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/docs/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ SpacetimeDB is optimized for maximum speed and minimum latency, rather than batc
3636

3737
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.
3838

39+
## Application Workflow Preview
40+
41+
<figure>
42+
<img src="/images/workflow-preview-diagram.png" alt="SpacetimeDB Application Workflow Preview" style="width:100%">
43+
<figcaption style="margin-top: 10px;" align="center">
44+
<b align="center">SpacetimeDB Application Workflow Preview</b>
45+
</figcaption>
46+
</figure>
47+
48+
49+
The above illustrates the workflow when using SpacetimeDB.
50+
51+
* All client-side reads happen with the data view that is cached locally.
52+
* Client-side 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 client cache.
53+
* RLS filters restrict the data view server-side before subscriptions are evaluated. These filters can be used for access control or client scoping.
54+
* 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.
55+
3956
## State Mirroring
4057

4158
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.

0 commit comments

Comments
 (0)