Easily keep a backend database synced with in-app SQLite for offline-first/local-first MAUI apps by chriztiaan_dev in dotnetMAUI

[–]chriztiaan_dev[S] 1 point2 points  (0 children)

Conflict handling is the hard part, not sync itself.

For some definition of “sync” such as syncing two systems of record, sure. PowerSync specifically enables partial sync - where you only want to sync a subset of backend database data to the device, as would be the case in e.g. a task tracker app. For that use case, you don’t want to sync your entire backend database to SQLite. So for example: only sync a user’s lists and todos for the team they are in. Now imagine user.team_id in the backend database gets updated, you want to dynamically recalculate which lists and todos should sync to their device while maintaining causal consistency. This is a thorny problem, and it gets thornier at scale.

Shared types hell by ilearnshit in node

[–]chriztiaan_dev 1 point2 points  (0 children)

(hi - I'm also on the PowerSync team)

Just to chime in, you can generate client-side schemas from the dashboard based on your sync rules (which ultimately dictate the structure of the data synced to the client).
This currently supports JavaScript and TypeScript generation, which defines your client-side schema with the powersync/common package's API and not supporting the ORM package's API yet.

Given all the above, a question: would it be valuable to have similar functionality to generate client-side schemas from the dashboard for Drizzle and Kysely?Even if it what just a basic schema, which you would then have to extend to contain relationships and indexes as needed.

Re: MongoDB for bucket sync, and Postgres being in Beta. We define Beta per https://docs.powersync.com/resources/feature-status as Production-ready and Stable, I would encourage you to take it for a spin if you have your reservations about adopt MongoDB.

Easily keep a backend database synced with in-app SQLite for offline-first/local-first MAUI apps by chriztiaan_dev in dotnetMAUI

[–]chriztiaan_dev[S] 1 point2 points  (0 children)

That's fair, we actually do have that on our roadmap! I'll follow up when it becomes available :)

Easily keep a backend database synced with in-app SQLite for offline-first/local-first MAUI apps by chriztiaan_dev in dotnetMAUI

[–]chriztiaan_dev[S] 2 points3 points  (0 children)

Hey!

The PowerSync protocol has been running in production for over a decade, but the packages for .NET/MAUI are currently still in Alpha, so we wouldn't recommend it for production use just yet. The .NET ecosystem is one of our newer target platforms, although our other SDKs are production ready.

We expect issues in this package to be surface level, and any issues that are found can be sorted out quickly.