Skip to content

Split backend connector protocol - #196

Draft
simolus3 wants to merge 2 commits into
mainfrom
connector-split
Draft

simolus3 wants to merge 2 commits into
mainfrom
connector-split

Conversation

@simolus3

@simolus3 simolus3 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

This implements the proposal from https://github.com/orgs/powersync-ja/discussions/787 and allows splitting PowerSyncBackendConnectorProtocol into its individual parts: An Authenticator responsible for returning a JWT used when connecting to the PowerSync service, and a MutationUploader callback uploading local mutations.

Additionally, this adds connect() overloads that only take an authenticator (for download-only mode) or uploader (for upload-only mode sync). The key differences are:

This is a breaking for users implementing CustomCheckpointRequestConnector, they now need to implement PowerSyncBackendConnectorProtocol as well. Fine as that is an alpha interface.

Another known problem is that checkpoints can't be applied when there's local data, so a download-only mode might make the sync client stuck. We'll expose this from the core extension to handle this as an error in powersync-ja/powersync-sqlite-core#227.

AI use: Reviewed with Claude Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cached credentials are reused after they expire while the app is suspended, costing a 401 and a full retry delay on resume

1 participant