From fe3fb2b19f87a557332a10b3f50df5980ab16e36 Mon Sep 17 00:00:00 2001 From: suirad Date: Mon, 21 Apr 2025 15:23:46 -0500 Subject: [PATCH] add workflow preview to index --- docs/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/index.md b/docs/index.md index a8b671c..ba75dba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 + +
+ SpacetimeDB Application Workflow Preview +
+ SpacetimeDB Application Workflow Preview +
+
+ + +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.