-
|
Is serverless or sync-wasm better for web apps? I would guess the answer comes down to the size of
Assuming using
Inspecting the npm packages I am also assuming with "partial sync" the
Is my reasoning sound? Any additional considerations to add? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Your model is directionally right, but partial sync is not just a freshness tracker. The So I would choose this way:
For a read-heavy app, the missing term in the formula is repeated reads. Serverless keeps paying network latency per remote query; sync-wasm pays a bigger initial/runtime cost so later reads can hit local state when the needed pages are present. |
Beta Was this translation helpful? Give feedback.
Your model is directionally right, but partial sync is not just a freshness tracker.
The
sync-wasmpackage is the local database path: it brings pages into browser storage and syncs with Turso Cloud. The current partial-sync option is experimental and is configured around bootstrap strategies such as "load the first N bytes" or "load pages touched by this SQL query", plus segment/prefetch options. That reduces how much of the database is materialized locally, but it still has the WASM/local-storage cost and page-level sync behavior.So I would choose this way:
@tursodatabase/serverlessfor normal web apps where first load size and simple remote reads matter most@tursodatabase/sync-wasm…