Skip to content

Commit 9b9b5fc

Browse files
authored
Merge pull request #1924 from appwrite/add-rxdb-integration-blog
Add rxdb integration guide and blog
2 parents 134ad73 + d3a128a commit 9b9b5fc

File tree

38 files changed

+1148
-28
lines changed

38 files changed

+1148
-28
lines changed

src/routes/blog/post/offline-first-journal/+page.markdoc

Lines changed: 878 additions & 0 deletions
Large diffs are not rendered by default.

src/routes/docs/products/databases/+layout.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
label: 'Permissions',
4141
href: '/docs/products/databases/permissions'
4242
},
43+
{
44+
label: 'Offline Sync',
45+
href: '/docs/products/databases/offline'
46+
},
4347
{
4448
label: 'Relationships',
4549
href: '/docs/products/databases/relationships'
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: article
3+
title: Offline Sync
4+
description: Enable offline synchronization of data between your apps and Appwrite Databases.
5+
---
6+
7+
Offline synchronization (or offline sync) is a mechanism that allows apps to store and update data locally when a user is offline (i.e., loses internet connectivity), and then synchronize that data with an Appwrite database once the user is back online.
8+
9+
This capability is crucial for building resilient and responsive applications, especially in environments with unreliable or intermittent internet connectivity. Suppose you are driving from one city to another and lose internet connectivitity while passing through a rural area, locally-downloaded maps in your GPS app would ensure that you do not get lost. Another example could be that you are waiting in queue at a supermarket and there is a network outage; an offline-synchronized databases with inventory data would prevent the point-of-sale (POS) systems from failing, ensuring you and your fellow customers can buy groceries.
10+
11+
Some real-world scenarios where offline sync is useful are:
12+
13+
- Journaling and note-taking apps
14+
- Warehouse inventory management systems
15+
- Medical data entry tools
16+
- Airline check-in management apps
17+
- GPS navigation software
18+
19+
# Integrate offline sync in your apps
20+
21+
{% only_light %}
22+
{% cards %}
23+
24+
{% cards_item href="/integrations/replication-rxdb" title="RxDB" image="/images/docs/databases/offline/logos/rxdb.svg" %}
25+
{% /cards_item %}
26+
27+
{% /cards %}
28+
{% /only_light %}
29+
30+
{% only_dark %}
31+
{% cards %}
32+
33+
{% cards_item href="/integrations/replication-rxdb" title="RxDB" image="/images/docs/databases/offline/logos/dark/rxdb.svg" %}
34+
{% /cards_item %}
35+
36+
{% /cards %}
37+
{% /only_dark %}
38+
39+
# How does offline sync work?
40+
41+
The process of implementing offline sync in Appwrite-powered apps (and in general) is as follows:
42+
43+
1. **Local data storage:** When a user opens your app, the app downloads relevant data from the server and saves it locally on their device via local-first data stores like IndexedDB, LocalStorage, SQLite, or RxDB.
44+
45+
2. **Working offline**: While offline, users can either read previously synced data or make changes (create, update, or delete data) in the local data store.
46+
47+
3. **Detecting connectivity**: The app monitors network status. As soon as connectivity is restored, a sync operation is triggered between the local data store and the Appwrite database.
48+
49+
5. **Two-way synchronization**: Local changes are *"pushed"* to the Appwrite database and new changes from the database are *"pulled"* into the local store. This process is called **push-pull replication**.
50+
51+
6. **Conflict resolution**: If the same data was changed both locally and on the server, the system must prioritise one of the two operations. Various strategies can be implemented to mitigate this issue, such as *last write wins* or *manual user conflict resolution*.

src/routes/integrations/ai-hugging-face-image-classification/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Understand and label the contents of images
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/ai-hugging-face-image-classification/cover.png
1010
category: ai
1111
product:

src/routes/integrations/ai-hugging-face-language-translation/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Translate text between languages
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/ai-hugging-face-language-translation/cover.png
1010
category: ai
1111
product:

src/routes/integrations/ai-hugging-face-speech-recognition/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Process speech audio into text
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/ai-hugging-face-speech-recognition/cover.png
1010
category: ai
1111
product:

src/routes/integrations/ai-openai/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Send text prompts to OpenAI GPT-3.5 and receive text generations
55
date: 2024-07-30
66
featured: true
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/ai-openai/cover.png
1010
category: ai
1111
product:

src/routes/integrations/ai-perplexity/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Send text prompts to Perplexity and receive text generations
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/ai-perplexity/cover.png
1010
category: ai
1111
product:

src/routes/integrations/deployments-github/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Manage versions and deploy Appwrite Functions
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/deployments-github/cover.png
1010
category: deployments
1111
product:

src/routes/integrations/email-sendgrid/+page.markdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Send customized emails to your users
55
date: 2024-07-30
66
featured: false
77
isPartner: true
8-
isNew: true
8+
isNew: false
99
cover: /images/integrations/email-sendgrid/cover.png
1010
category: messaging
1111
product:

0 commit comments

Comments
 (0)