Skip to content

Commit 19080bf

Browse files
authored
Various fixes polish (#190)
* document metadata field and add JS example * table format for performance and limits * Fix icon size
1 parent 7f1d33e commit 19080bf

File tree

13 files changed

+301
-152
lines changed

13 files changed

+301
-152
lines changed

installation/client-side-setup/define-your-schema.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ Similar functionality exists in the PowerSync [CLI](/usage/tools/cli).
2222

2323
For an example implementation of the client-side schema, see the _Getting Started_ section of the SDK reference for your platform:
2424

25-
### <Icon icon="flutter" iconType="solid" size="24"/> Flutter
25+
### <Icon icon="flutter" iconType="solid" size={32}/> Flutter
2626

2727
* [1\. Define the Schema](/client-sdk-references/flutter#1-define-the-schema)
2828

29-
### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo
29+
### <Icon icon="react" iconType="solid" size={32}/> React Native & Expo
3030

3131
* [1\. Define the Schema](/client-sdk-references/react-native-and-expo#1-define-the-schema)
3232

33-
### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web
33+
### <Icon icon="js" iconType="solid" size={32}/> JavaScript Web
3434

3535
* [1\. Define the Schema](/client-sdk-references/javascript-web#1-define-the-schema)
3636

37-
### <Icon icon="k" iconType="solid" size="24"/> Kotlin Multiplatform
37+
### <Icon icon="k" iconType="solid" size={32}/> Kotlin Multiplatform
3838

3939
* [1\. Define the Schema](/client-sdk-references/kotlin-multiplatform#1-define-the-schema)
4040

41-
### <Icon icon="swift" iconType="solid" size="24"/> Swift
41+
### <Icon icon="swift" iconType="solid" size={32}/> Swift
4242

4343
* [1\. Define the Schema](/client-sdk-references/swift#1-define-the-schema)
4444

45-
### <Icon icon="node-js" iconType="solid" size="24"/> Node.js (alpha)
45+
### <Icon icon="node-js" iconType="solid" size={32}/> Node.js (alpha)
4646

4747
* [1\. Define the Schema](/client-sdk-references/node#1-define-the-schema)
4848

49-
### <Icon icon="microsoft" iconType="solid" size="24"/> .NET (alpha)
49+
### <Icon icon="microsoft" iconType="solid" size={32}/> .NET (alpha)
5050

5151
* [1\. Define the Schema](/client-sdk-references/dotnet#1-define-the-schema)
5252

installation/client-side-setup/instantiate-powersync-database.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ In your client-side app, you can read from and write to the local SQLite databas
1111

1212
For an example implementation of instantiating the client-side database, see the _Getting Started_ section of the client SDK reference for your platform:
1313

14-
### <Icon icon="flutter" iconType="solid" size="24"/> Flutter
14+
### <Icon icon="flutter" iconType="solid" size={32}/> Flutter
1515

1616
* [2\. Instantiate the PowerSync Database](/client-sdk-references/flutter#2-instantiate-the-powersync-database)
1717

18-
### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo
18+
### <Icon icon="react" iconType="solid" size={32}/> React Native & Expo
1919

2020
* [2\. Instantiate the PowerSync Database](/client-sdk-references/react-native-and-expo#2-instantiate-the-powersync-database)
2121

22-
### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web
22+
### <Icon icon="js" iconType="solid" size={32}/> JavaScript Web
2323

2424
* [2\. Instantiate the PowerSync Database](/client-sdk-references/javascript-web#2-instantiate-the-powersync-database)
2525

26-
### <Icon icon="k" iconType="solid" size="24"/> Kotlin Multiplatform
26+
### <Icon icon="k" iconType="solid" size={32}/> Kotlin Multiplatform
2727

2828
* [2\. Instantiate the PowerSync Database](/client-sdk-references/kotlin-multiplatform#2-instantiate-the-powersync-database)
2929

30-
### <Icon icon="swift" iconType="solid" size="24"/> Swift
30+
### <Icon icon="swift" iconType="solid" size={32}/> Swift
3131

3232
* [2\. Instantiate the PowerSync Database](/client-sdk-references/swift#2-instantiate-the-powersync-database)
3333

34-
### <Icon icon="node-js" iconType="solid" size="24"/> Node.js (alpha)
34+
### <Icon icon="node-js" iconType="solid" size={32}/> Node.js (alpha)
3535

3636
* [2\. Instantiate the PowerSync Database](/client-sdk-references/node#2-instantiate-the-powersync-database)
3737

38-
### <Icon icon="microsoft" iconType="solid" size="24"/> .NET (alpha)
38+
### <Icon icon="microsoft" iconType="solid" size={32}/> .NET (alpha)
3939

4040
* [2\. Instantiate the PowerSync Database](/client-sdk-references/dotnet#2-instantiate-the-powersync-database)
4141

installation/client-side-setup/integrating-with-your-backend.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@ Accordingly, you must pass a _backend connector_ as an argument when you call `c
2121

2222
For an example implementation of a PowerSync 'backend connector', see the _Getting Started_ section of the SDK reference for your platform:
2323

24-
### <Icon icon="flutter" iconType="solid" size="24"/> Flutter
24+
### <Icon icon="flutter" iconType="solid" size={32}/> Flutter
2525

2626
* [3\. Integrate with your Backend](/client-sdk-references/flutter#3-integrate-with-your-backend)
2727

28-
### <Icon icon="react" iconType="solid" size="24"/> React Native & Expo
28+
### <Icon icon="react" iconType="solid" size={32}/> React Native & Expo
2929

3030
* [3\. Integrate with your Backend](/client-sdk-references/react-native-and-expo#3-integrate-with-your-backend)
3131

32-
### <Icon icon="js" iconType="solid" size="24"/> JavaScript Web
32+
### <Icon icon="js" iconType="solid" size={32}/> JavaScript Web
3333

3434
* [3\. Integrate with your Backend](/client-sdk-references/javascript-web#3-integrate-with-your-backend)
3535

36-
### <Icon icon="node-js" iconType="solid" size="24"/> Node.js (alpha)
36+
### <Icon icon="node-js" iconType="solid" size={32}/> Node.js (alpha)
3737

3838
* [3\. Integrate with your Backend](/client-sdk-references/node#3-integrate-with-your-backend)
3939

40-
### <Icon icon="k" iconType="solid" size="24"/> Kotlin Multiplatform
40+
### <Icon icon="k" iconType="solid" size={32}/> Kotlin Multiplatform
4141

4242
* [3\. Integrate with your Backend](/client-sdk-references/kotlin-multiplatform#3-integrate-with-your-backend)
4343

44-
### <Icon icon="swift" iconType="solid" size="24"/> Swift
44+
### <Icon icon="swift" iconType="solid" size={32}/> Swift
4545

4646
* [3\. Integrate with your Backend](/client-sdk-references/swift#3-integrate-with-your-backend)
4747

installation/database-connection.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This page covers PowerSync Cloud. For self-hosted PowerSync, refer to [this sect
1919

2020
Each database provider has their quirks when it comes to specifying connection details, so we have documented database-specific and provider-specific instructions below:
2121

22-
## <Icon icon="elephant" iconType="solid" size="24"/> Postgres Provider Specifics
22+
## <Icon icon="elephant" iconType="solid" size={32}/> Postgres Provider Specifics
2323

2424
Select your Postgres hosting provider for steps to connect your newly-created PowerSync instance to your Postgres database:
2525
<AccordionGroup>
@@ -130,7 +130,7 @@ PowerSync deploys and configures an isolated cloud environment for you, which ca
130130
</Accordion>
131131

132132

133-
## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB Specifics
133+
## <Icon icon="leaf" iconType="solid" size={32}/> MongoDB Specifics
134134

135135
1. Fill in your connection details from MongoDB:
136136
1. Copy your cluster's connection string and paste it into the PowerSync instance **URI** field. PowerSync will automatically parse this URI to populate other connection details.
@@ -147,7 +147,7 @@ Also see:
147147
- [MongoDB Atlas Device Sync Migration Guide](/migration-guides/mongodb-atlas)
148148
- [MongoDB Setup](/installation/database-setup#mongodb)
149149

150-
## <Icon icon="dolphin" iconType="solid" size="24"/> MySQL (Alpha) Specifics
150+
## <Icon icon="dolphin" iconType="solid" size={32}/> MySQL (Alpha) Specifics
151151

152152
1. Fill in your connection details from MySQL:
153153
1. "**Name**" can be any name for the connection.

installation/database-setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Jump to: [Postgres](#postgres) | [MongoDB](#mongodb) | [MySQL](#mysql-alpha)
99
import PostgresPowerSyncUser from '/snippets/postgres-powersync-user.mdx';
1010
import PostgresPowerSyncPublication from '/snippets/postgres-powersync-publication.mdx';
1111

12-
## <Icon icon="elephant" iconType="solid" size="24" /> Postgres
12+
## <Icon icon="elephant" iconType="solid" size={32} /> Postgres
1313

1414
<Check>
1515
**Version compatibility**: PowerSync requires Postgres version 11 or greater.
@@ -198,7 +198,7 @@ For other providers and self-hosted databases:
198198

199199
Due to the logical replication requirement, not all Postgres hosting providers are supported. Notably, some "serverless Postgres" providers do not support logical replication, and are therefore not supported by PowerSync yet.
200200

201-
## <Icon icon="leaf" iconType="solid" size="24" /> MongoDB
201+
## <Icon icon="leaf" iconType="solid" size={32} /> MongoDB
202202

203203
<Check>
204204
**Version compatibility**: PowerSync requires MongoDB version 6.0 or greater.
@@ -285,7 +285,7 @@ If you need to use private endpoints with MongoDB Atlas, see [Private Endpoints]
285285
286286
For more information on migrating from Atlas Device Sync to PowerSync, see our [migration guide](/migration-guides/mongodb-atlas).
287287
288-
## <Icon icon="dolphin" iconType="solid" size="24" /> MySQL (Alpha)
288+
## <Icon icon="dolphin" iconType="solid" size={32} /> MySQL (Alpha)
289289
290290
<Info>
291291
This section is a work in progress. More details for MySQL connections are coming soon. In the meantime, ask on our [Discord server](https://discord.gg/powersync) if you have any questions.

installation/database-setup/security-and-ip-filtering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Security & IP Filtering"
33
---
44

5-
## <Icon icon="elephant" iconType="solid" size="24"/> TLS with Postgres
5+
## <Icon icon="elephant" iconType="solid" size={32}/> TLS with Postgres
66

77
PowerSync always [enforces TLS](/usage/lifecycle-maintenance/postgres-maintenance#tls) on connections to the database, and certificate validation cannot be disabled.
88

integration-guides/supabase-+-powersync/handling-attachments.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Examples of syncing attachments between a client app and Supabase
55

66
import SupabaseStorage from '/snippets/supabase-storage-config.mdx';
77

8-
## <Icon icon="react"iconType="solid" size="24"/> React Native Example
8+
## <Icon icon="react"iconType="solid" size={32}/> React Native Example
99

1010
Our React Native [To-Do List demo app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist) showcases how to sync attachments (such as photos) using the [@powersync/attachments](https://www.npmjs.com/package/@powersync/attachments) library, the PowerSync Service, and Supabase.
1111

@@ -80,15 +80,15 @@ The following improvements can be considered for this implementation.
8080
* An easier way to set up the local-only `attachments` table and related schema.
8181
* Better tooling/APIs for retrying/resuming uploads or downloads when transitioning from an offline into an online state.
8282

83-
## <Icon icon="flutter"iconType="solid" size="24"/> Flutter Example
83+
## <Icon icon="flutter"iconType="solid" size={32}/> Flutter Example
8484

8585
Our Flutter [To-Do List demo app](https://github.com/powersync-ja/powersync.dart/tree/master/demos/supabase-todolist) showcases how to sync attachments (such as photos) using our [powersync\_attachments\_helper](https://pub.dev/packages/powersync_attachments_helper) package for Flutter.
8686

87-
## <Icon icon="kotlin"iconType="solid" size="24"/> Kotlin Example
87+
## <Icon icon="kotlin"iconType="solid" size={32}/> Kotlin Example
8888

8989
Our Kotlin [To-Do List demo app](https://github.com/powersync-ja/powersync-kotlin/tree/main/demos/android-supabase-todolist) showcases how to sync attachments using built-in attachments helpers.
9090

91-
## <Icon icon="swift"iconType="solid" size="24"/> Swift Example
91+
## <Icon icon="swift"iconType="solid" size={32}/> Swift Example
9292

9393
Our Swift [To-Do List demo app](https://github.com/powersync-ja/powersync-swift/tree/main/Demo) showcases how to sync attachments using built-in attachments helpers.
9494

resources/performance-and-limits.mdx

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
---
22
title: "Performance and Limits"
3+
description: "Expected performance and limits for PowerSync Cloud."
34
mode: wide
45
---
56

6-
The [current Pro and Team plans](https://www.powersync.com/pricing) of PowerSync Cloud have the following limits and expected performance.
7-
8-
The PowerSync Cloud Enterprise plan allows for limits to be customized.
9-
10-
* Number of synced buckets per user: 1,000.
11-
* Sync requests where this number is exceeded will fail with a hard error.
12-
* We have plans to increase this limit.
13-
* Maximum row/document size: 15MB
14-
* This applies to both the source row/document, and the transformed row synced to the client.
15-
* Number of concurrent connections per [PowerSync Service](/architecture/powersync-service) instance: Limited to 3,000 by default.
16-
* Replicated rows/documents (Source database -> PowerSync Service):
17-
* Expect a peak of around 2,000-4,000 operations/second for small rows/documents, or 5MB/second for large rows/documents.
18-
* This also applies to reprocessing sync rules or adding new tables/collections.
19-
* Smaller transactions are processed at around 60 transactions/second.
20-
* Synced rows (PowerSync Service -> Client):
21-
* Over 1M rows per client is supported, with no hard limit.
22-
* Expect a rate of around 2,000-20,000 operations/second/client, depending on the client.
23-
* Database size and initial sync time may impose practical limits on number of rows.
24-
* Storage size: A soft limit of 100GB for data stored on the PowerSync Service by default.
25-
* Number of unique users: No hard limit.
26-
* Number of tables: No hard limit, but having hundreds of tables may slow down startup and sync performance.
27-
* Number of columns per table: Hard limit of 1999 columns per table in the client schema, excluding the id column.
7+
PowerSync Cloud **Pro and Team** plans have the limits and performance expectations outlined below.
8+
9+
The PowerSync Cloud **Enterprise** plan allows these limits to be customized based on your specific needs.
10+
11+
## Limits
12+
13+
| **Component** | **Limit** | **Details** |
14+
|---|---|---|
15+
| **Synced buckets per user** | 1,000 | Sync requests exceeding this will fail with an error. We plan to increase this limit in the future. |
16+
| **Maximum row/document size** | 15MB | Applies to both source database rows and transformed rows synced to clients. |
17+
| **Concurrent connections** | 3,000 | Default limit per [PowerSync Service](/architecture/powersync-service) instance. This can be increased upon request. |
18+
| **Storage size** | 100GB | Soft limit for data stored on PowerSync Service (default). |
19+
| **Columns per table** | 1,999 | Hard limit of the client schema, excluding the `id` column. |
20+
| **Number of users** | No limit | No hard limit on unique users. |
21+
| **Number of tables** | No limit | Hundreds of tables may impact startup and sync performance. |
22+
23+
## Performance Expectations
24+
25+
### Database Replication (Source DB → PowerSync Service)
26+
27+
- **Small rows**: 2,000-4,000 operations per second
28+
- **Large rows**: Up to 5MB per second
29+
- **Transaction processing**: ~60 transactions per second for smaller transactions
30+
- **Reprocessing**: Same rates apply when reprocessing sync rules or adding new tables
31+
32+
### Sync (PowerSync Service → Client)
33+
34+
- **Rows per client**: Over 1 million rows supported with no hard limit
35+
- Database size and initial sync time may impose practical limits on the number of rows
36+
- **Sync speed**: Expect a rate of 2,000-20,000 operations per second per client, depending on the client
37+
38+
39+

usage/lifecycle-maintenance/implementing-schema-changes.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Nothing in PowerSync will fail hard if there are incompatible schema changes. Bu
4444

4545
To avoid certain types of breaking changes on older clients, Sync Rule [transformations](/usage/sync-rules/data-queries) may be used.
4646

47-
## <Icon icon="elephant" iconType="solid" size="24" /> Postgres Specifics
47+
## <Icon icon="elephant" iconType="solid" size={32} /> Postgres Specifics
4848

4949
PowerSync keeps the [sync buckets](/usage/sync-rules/organize-data-into-buckets) up to date with any incremental data changes, as recorded in the Postgres [WAL](https://www.postgresql.org/docs/8.0/wal.html) / received in the logical replication stream. This is also referred to as DML (Data Manipulation Language) queries.
5050

@@ -128,7 +128,7 @@ There are additional changes that can be made to a table in a publication:
128128

129129
Those changes are not automatically picked up by PowerSync during replication, and can cause PowerSync to miss changes if the changes are filtered out. PowerSync will not automatically recover the data when for example removing a row filter. Use these with caution.
130130

131-
## <Icon icon="leaf" iconType="solid" size="24" /> MongoDB Specifics
131+
## <Icon icon="leaf" iconType="solid" size={32} /> MongoDB Specifics
132132

133133
Since MongoDB is schemaless, schema changes generally do not impact PowerSync. However, adding, dropping, and renaming collections require special consideration.
134134

@@ -149,7 +149,7 @@ Renaming an unsynced collection to a name that is included in the Sync Rules tri
149149
Circular renames (e.g., renaming `todos``todos_old``todos`) are not directly supported. To reprocess the database after such changes, a Sync Rules update must be deployed.
150150

151151

152-
## <Icon icon="dolphin" iconType="solid" size="24" /> MySQL (Alpha) Specifics
152+
## <Icon icon="dolphin" iconType="solid" size={32} /> MySQL (Alpha) Specifics
153153

154154
<Info>
155155
This section is a work in progress. More details for MySQL connections are coming soon. In the meantime, ask on our [Discord server](https://discord.gg/powersync) if you have any questions.

usage/lifecycle-maintenance/upgrading-the-client-sdk.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Upgrading the Client SDK"
33
---
44

5-
## <Icon icon="flutter" iconType="solid" size="24"/> Flutter
5+
## <Icon icon="flutter" iconType="solid" size={32}/> Flutter
66

77
In order to upgrade to a newer version of the PowerSync package, first check the [changelog](https://pub.dev/packages/powersync/changelog) for any breaking changes.
88

@@ -12,7 +12,7 @@ Then, run the below command in your project folder:
1212
flutter pub upgrade powersync
1313
```
1414

15-
## <Icon icon="react" iconType="solid" size="24"/> React Native & Expo
15+
## <Icon icon="react" iconType="solid" size={32}/> React Native & Expo
1616

1717
Run the below command in your project folder:
1818

@@ -35,7 +35,7 @@ pnpm upgrade @powersync/react-native @journeyapps/react-native-quick-sqlite
3535
</Tabs>
3636

3737

38-
## <Icon icon="js" iconType="solid" size="24"/> JavaScript Web
38+
## <Icon icon="js" iconType="solid" size={32}/> JavaScript Web
3939

4040
Run the below command in your project folder:
4141

@@ -57,7 +57,7 @@ pnpm upgrade @powersync/web @journeyapps/wa-sqlite
5757
</Tab>
5858
</Tabs>
5959

60-
## <Icon icon="js" iconType="solid" size="24"/> Node.js (alpha)
60+
## <Icon icon="js" iconType="solid" size={32}/> Node.js (alpha)
6161

6262
Run the below command in your project folder:
6363

@@ -79,10 +79,10 @@ Run the below command in your project folder:
7979
</Tab>
8080
</Tabs>
8181

82-
## <Icon icon="code" iconType="solid" size="24"/> Kotlin Multiplatform
82+
## <Icon icon="code" iconType="solid" size={32}/> Kotlin Multiplatform
8383

8484
Update your project's Gradle file (`build.gradle.kts`) with the latest version of the [SDK](https://central.sonatype.com/artifact/com.powersync/core).
8585

86-
## <Icon icon="swift" iconType="solid" size="24"/> Swift
86+
## <Icon icon="swift" iconType="solid" size={32}/> Swift
8787

8888
Update the version number in `Package.swift` or via Xcode Package Dependencies as documented in the SDK's installation instructions: [Installation](/client-sdk-references/swift#installation)

0 commit comments

Comments
 (0)