Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions installation/database-connection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ PowerSync deploys and configures an isolated cloud environment for you, which ca
</Accordion>


## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB (Alpha) Specifics
## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB (Beta) Specifics

1. Fill in your connection details from MongoDB:
1. "**Name**" can be any name for the connection.
Expand All @@ -136,7 +136,7 @@ PowerSync deploys and configures an isolated cloud environment for you, which ca

PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.

**Note**: PowerSync automatically selects the "Beta" version of the Service when adding a MongoDB connection while MongoDB support is in alpha.
**Note**: PowerSync automatically selects the "Beta" version of the Service when adding a MongoDB connection while MongoDB support is in a beta release, as updates may be made against this version more frequently.

Also see:
- [MongoDB Atlas Migration Guide](/migration-guides/mongodb-atlas)
Expand All @@ -154,5 +154,5 @@ Also see:

PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.

**Note**: PowerSync automatically selects the "Beta" version of the Service when adding a MySQL connection while MySQL support is in alpha.
**Note**: PowerSync automatically selects the "Beta" version of the Service when adding a MySQL connection while MySQL support is in alpha, as updates may be made against this version more frequently.

25 changes: 24 additions & 1 deletion installation/database-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,35 @@ Due to the logical replication requirement, not all hosting providers are suppor

Notably, some "serverless Postgres" providers do not support logical replication, and are therefore not supported by PowerSync yet.

## <Icon icon="leaf" iconType="solid" size="24" /> MongoDB (Alpha)
## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB (Beta)

<Check>
**Version compatibility**: PowerSync requires MongoDB version 6.0 or greater.
</Check>

### Status of MongoDB support in PowerSync

In PowerSync nomenclature, Beta means the package is ready to be used for production given you have adequately tested your use case. We typically don't make any breaking API changes when moving from Beta to V1.

#### Alpha (Completed)

Refer to the instructions above on how to use the current alpha support for MongoDB.

**Known Issues (Alpha)**

- [x] **FIXED**: MongoDB -> PowerSync Service replication is not optimized for performance yet. We are targeting 2,000+ operations per second for the Beta.
- [x] **FIXED**: Unhelpful "Something went wrong" error in the Dashboard when PowerSync IPs have not been allowed for Atlas users (Network Access -> IP Access List)
- [x] **FIXED**: Unhelpful "Something went wrong" error in the Dashboard when `mongodb://` is used for the URI scheme; `mongodb+srv://` must be used
- [x] **FIXED**: Consistency guarantees are currently _eventually consistent_ — that is, operations can arrive out of order on the client. We are targeting to provide _causal+ consistency_ using `changeStreamPreAndPostImages`. **Update:** Instances can now be configured to use Post Images to resolve consistency issues.

#### Beta (In Progress - ETA 2024Q4)
- [x] Availability in PowerSync Cloud
- [x] Fully functional diagnostics API
- [x] Validate that TLS connections Just Work ™️ without any additional configuration
- [x] Address all known issues in _Known Issues_

#### V1 (Not Started) — Estimated start 2025Q1

### Permissions required - MongoDB Atlas

For MongoDB Atlas databases, the minimum permissions are:
Expand Down
2 changes: 1 addition & 1 deletion installation/quickstart-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Quickstart Guide / Installation Overview"
sidebarTitle: "Quickstart / Overview"
---

PowerSync is designed to be stack agnostic, and currently supports **Postgres**, **MongoDB** (alpha) and **MySQL** (alpha) as the source database, and has official SDKs for [**Flutter**](/client-sdk-references/flutter) (mobile and [web](/client-sdk-references/flutter/flutter-web-support)), [**React Native**](/client-sdk-references/react-native-and-expo) (mobile and [web](/client-sdk-references/react-native-and-expo/react-native-web-support)), [**JavaScript/Web**](/client-sdk-references/javascript-web) (vanilla JS, React, Vue), [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform) (beta) and [**Swift**](/client-sdk-references/swift) (alpha) available on the client-side today.
PowerSync is designed to be stack agnostic, and currently supports **Postgres**, **MongoDB** (beta) and **MySQL** (alpha) as the source database, and has official SDKs for [**Flutter**](/client-sdk-references/flutter) (mobile and [web](/client-sdk-references/flutter/flutter-web-support)), [**React Native**](/client-sdk-references/react-native-and-expo) (mobile and [web](/client-sdk-references/react-native-and-expo/react-native-web-support)), [**JavaScript/Web**](/client-sdk-references/javascript-web) (vanilla JS, React, Vue), [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform) (beta) and [**Swift**](/client-sdk-references/swift) (beta) available on the client-side today.

<Note>
Support for additional platforms is on our [Roadmap](https://roadmap.powersync.com/). If one isn't supported today, please add your vote and check back soon.
Expand Down
4 changes: 2 additions & 2 deletions intro/powersync-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ PowerSync is designed to be backend database agnostic and currently supports:
<CardGroup cols={3}>
<Card title="Postgres" icon="elephant" href="/installation/database-setup/#postgres" />

<Card title="MongoDB" icon="leaf" href="/installation/database-setup/#mongodb-alpha">
Currently in an alpha release.
<Card title="MongoDB" icon="leaf" href="/installation/database-setup/#mongodb-beta">
Currently in a beta release.
</Card>

<Card title="MySQL" icon="dolphin" href="/installation/database-setup/#mysql-alpha">
Expand Down
32 changes: 4 additions & 28 deletions migration-guides/mongodb-atlas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ If you have MongoDB Atlas Device Sync deployed today, at a high level your archi
<img src="/images/resources-1.png"/>
</Frame>

## PowerSync alpha support for MongoDB

As of September 20, 2024, PowerSync has developed **alpha support** for MongoDB as a backend database source. PowerSync's MongoDB module is not yet considered production-ready.
## PowerSync beta support for MongoDB

As of December 2024, support for MongoDB as a backend database source is available in a beta release. This means that MongoDB replication is considered ready for production-use, provided that you have adequately tested your use cases.

It is currently available for testing in hosted or self-hosted environments:

* Hosted by us: Refer to [Database Connection](/installation/database-connection#mongodb-alpha-specifics)
* Hosted by us: Refer to [Database Connection](/installation/database-connection#mongodb-beta-specifics)
* Self-hosted using Docker Compose: An end-to-end demo app is [available here](https://github.com/powersync-ja/self-host-demo/tree/main/demos/nodejs-mongodb). Please refer to its README for further instructions.

Migrating to PowerSync's MongoDB module would take you to this: (new components in green)
Expand Down Expand Up @@ -83,7 +82,7 @@ We are constantly adding additional PowerSync Client SDKs and some of them are u
| [Flutter/Dart](/client-sdk-references/flutter) | Stable | N/A |
| [Kotlin Multiplatform](/client-sdk-references/kotlin-multiplatform) | Beta | V1 ETA 2025Q1 |
| [Swift](/client-sdk-references/swift) | Beta | V1 ETA 2025Q1 |
| Node.js | PoC | Alpha ETA 2024Q4 |
| Node.js | PoC | Alpha ETA 2025Q1 |
| .NET | Not Started | Alpha ETA 2025Q1 |

<Info>
Expand All @@ -95,26 +94,3 @@ We are constantly adding additional PowerSync Client SDKs and some of them are u
You will need to host a backend that can accept client writes if you do not already have one. The app backend needs to expose an API endpoint to write changes from the PowerSync client.

Additional implementation notes are available [here](/installation/app-backend-setup/writing-client-changes).

### Status of MongoDB support in PowerSync

In PowerSync nomenclature, Beta means the package is ready to be used for production given you have adequately tested your use case. We typically don't make any breaking API changes when moving from Beta to V1\. Alpha is a bit more unstable and could have breaking changes when moving to Beta, so we do not recommend using it in production.

#### Alpha (Completed)

Refer to the instructions above on how to use the current alpha support for MongoDB.

**Known Issues (Alpha)**

- [x] **FIXED**: MongoDB -> PowerSync Service replication is not optimized for performance yet. We are targeting 2,000+ operations per second for the Beta.
- [x] **FIXED**: Unhelpful "Something went wrong" error in the Dashboard when PowerSync IPs have not been allowed for Atlas users (Network Access -> IP Access List)
- [x] **FIXED**: Unhelpful "Something went wrong" error in the Dashboard when `mongodb://` is used for the URI scheme; `mongodb+srv://` must be used
- [x] **FIXED**: Consistency guarantees are currently _eventually consistent_ — that is, operations can arrive out of order on the client. We are targeting to provide _causal+ consistency_ using `changeStreamPreAndPostImages`. **Update:** Instances can now be configured to use Post Images to resolve consistency issues.

#### Beta (In Progress - ETA 2024Q4)
- [x] Availability in PowerSync Cloud
- [x] Fully functional diagnostics API
- [x] Validate that TLS connections Just Work ™️ without any additional configuration
- [x] Address all known issues in _Known Issues_

#### V1 (Not Started) — Estimated start 2025Q1
4 changes: 2 additions & 2 deletions usage/lifecycle-maintenance/implementing-schema-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ There are additional changes that can be made to a table in a publication:

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.

## <Icon icon="leaf" iconType="solid" size="24" /> MongoDB (Alpha) Specifics
## <Icon icon="leaf" iconType="solid" size="24" /> MongoDB (Beta) Specifics

<Info>
This section is a work in progress. More details for MongoDB connections are coming soon. In the meantime, check our [MongoDB guide](/migration-guides/mongodb-atlas) to try out our MongoDB alpha support, and ask on our [Discord server](https://discord.gg/powersync) if you have any questions.
This section is a work in progress. More details for MongoDB connections are coming soon. In the meantime, check our [MongoDB guide](/migration-guides/mongodb-atlas) to try out our MongoDB database support, and ask on our [Discord server](https://discord.gg/powersync) if you have any questions.
</Info>

Since MongoDB is generally schemaless, there are generally no schema changes that impact PowerSync.
Expand Down
4 changes: 2 additions & 2 deletions usage/sync-rules/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ There is no dedicated boolean data type. Boolean values are represented as `1` (

`json` and `jsonb` values are treated as `text` values in their serialized representation. JSON functions and operators operate directly on these `text` values.

## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB (Alpha) Type Mapping
## <Icon icon="leaf" iconType="solid" size="24"/> MongoDB (Beta) Type Mapping

<Info>
This section is a work in progress. More details for MongoDB connections are coming soon. In the meantime, check our [MongoDB guide](/migration-guides/mongodb-atlas) to try out our MongoDB alpha support, and ask on our [Discord server](https://discord.gg/powersync) if you have any questions.
This section is a work in progress. More details for MongoDB connections are coming soon. In the meantime, check our [MongoDB guide](/migration-guides/mongodb-atlas) to try out our MongoDB database support, and ask on our [Discord server](https://discord.gg/powersync) if you have any questions.
</Info>

| BSON Type | PowerSync / SQLite Column Type | Notes |
Expand Down
Loading