How does the dual-write fallback between Supabase and SQLite work? #1
-
|
Curious about the failover behavior — if Supabase is unreachable, does AgriTwin queue writes locally and sync later, or just drop to SQLite-only until the connection is restored? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
SQLite is the primary write target and Supabase is the sync layer: every write goes to SQLite first (so the app never blocks on network), then a background task mirrors it to Supabase. If Supabase is unreachable, the row stays flagged unsynced in SQLite and a retry loop pushes it once the connection comes back — no writes are ever dropped, they just degrade to local-only until sync catches up. |
Beta Was this translation helpful? Give feedback.
SQLite is the primary write target and Supabase is the sync layer: every write goes to SQLite first (so the app never blocks on network), then a background task mirrors it to Supabase. If Supabase is unreachable, the row stays flagged unsynced in SQLite and a retry loop pushes it once the connection comes back — no writes are ever dropped, they just degrade to local-only until sync catches up.