feat: default to newClientImplementation #97
+33
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
We currently have two options for connecting to the PowerSync service:
newClientImplementationin Swift)Previously, the Rust client has been an experimental opt-in feature.
The Rust client has been stable for a while now and is the primary target for new features. The underlaying Kotlin SDK now uses the Rust client as the default from v1.9.0.
This updates the default implementation to be the Rust client (
newClientImplementation= true). The option to disable the Rust client, and fall back to the legacy client is now deprecated.Improvements
The old client uses HTTP streams to connect to the PowerSync service. The underlaying networking library currently has an issue which can cause high memory usage when streaming large volumes of data.
The
newClientImplementationuses a WebSocket communication layer which has an additional backpressure layer. This results in stable memory usage when streaming large amounts of data.Potentially Breaking Changes
The WebSocket layer does not currently support reporting networking logs via
SyncRequestLoggerConfiguration. Code relying onSyncRequestLoggerConfigurationwill no longer report any logs.