Skip to content

Conversation

stevensJourney
Copy link
Contributor

Overview

Sync Stream

A recent issue #11 (comment) showed that under certain conditions the sync stream network request would fail in web.

We currently use the fetch_client package to bind to the JS fetch method. This supports streaming for request body and request responses. The streaming of request bodies requires Chromium 105+ based browsers and requires server to use HTTP/2 or HTTP/3. We only require streaming for request responses. This allows us to remove the streamRequests: true param and maintain better compatibility.

Dependency update

This PR also updates sqlite_async.dart to the latest alpha version.

Testing

This was tested in the Supabase todolist app. The sync stream connection was verified by having data sync down to the client in real time.

sync-requests.mov

@stevensJourney stevensJourney marked this pull request as ready for review May 30, 2024 12:13
 - powersync@1.3.0-alpha.5
 - powersync_attachments_helper@0.3.0-alpha.2
@stevensJourney stevensJourney merged commit 0e03710 into alpha-release May 30, 2024
@stevensJourney stevensJourney deleted the fix/streaming-requests branch May 30, 2024 12:32
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.

2 participants