Big Peer 1.65.1 is a patch release that adds optional sharding of CDC output across multiple Kafka producers to raise produce throughput, and fixes a webhook dispatcher failure that could stop webhooks being delivered after a Kafka reconnect. Added: Fixed:
- CDC can shard its output across multiple idempotent Kafka producers, controlled by the new
PRODUCER_SHARDSsetting, raising produce throughput to downstream consumers under sustained write load. The default of1leaves behavior unchanged
This does not change CDC’s ordering contract. Changes for an individual document are still delivered sequentially, and global ordering across documents is not guaranteed either way - see Event Ordering. Contact Ditto before raising
PRODUCER_SHARDS above 1, as it has a deployment prerequisite.- The webhook dispatcher no longer aborts when its Kafka consumer reconnects, so a broker restart or partition rebalance no longer leaves it restarting repeatedly instead of delivering webhooks
_SDK 5.1 common capabilities — shared by all SDK platforms. Shown in the overall SDK view; platform filters show that platform’s own blocks only.
This makes normalized data models practical at the edge. Product catalogs, order histories, task assignments, and multi-tenant views can stay separated into logical collections without forcing every screen to coordinate multiple reads.Joins use data already present in the local store. They do not fetch missing data from peers, and they are not supported in sync-subscription queries. The inner collection normally requires an appropriate index; use It can improve queries such as:Field order matters. Put fields used in equality filters first, followed by fields used for range filters or sorting. Composite indexes can also include array and object values. If you are unsure which fields to index, run Ditto identifies the range predicate and recommends an index on Run the suggested statement yourself, or use
Ditto SDK 5.1 — Faster Local Queries. More Capable Query Engine.
The new Ditto Edge SDK 5.1 delivers major features and optimizations across five areas. The release includes 77 platform and 112 SDK-specific improvements.Key takeaway: Existing applications get better performance and more efficient memory usage on the same hardware simply by upgrading to SDK 5.1.1. Performance: Faster Queries, Lower Memory Use- Evictions are 53.6× faster and deletes are 43.0× faster on average. This speeds up routine local data clean-up, like clearing the orders from a point-of-sale terminal.
- A full-collection
COUNT(*)fell from 149.03 ms to 0.89 ms, which is 167× faster on average. This speeds up badge counts and dashboard totals across an app.
JOINcombines local collections in a singleSELECT, removing the need to run separate queries and merge their results in application code.ADVISElooks at a query and tells you the indexes to create to make it faster, all without running it or reading a document.
- If a device is lost or stolen, it’s easier to revoke the device’s certificate, disconnect it from the mesh, and prevent the device from sending or receiving data.
- Revocations travel peer to peer and reach devices even when they can’t see the cloud. Connections from revoked peers are terminated and refused.
- Identifying problems is easier with better tools for analyzing deployed devices, starting with support bundles that capture the device’s effective configuration.
- Corrupted replication metadata is detected and rebuilt automatically, so field issues can be solved without a site visit.
- Multicast allows Ditto to scale to large networks with many edge devices. Edge devices subscribe to a shared group for data sync, which has lower connection cost at scale.
- Opt-in beta capability in the Swift, Kotlin/KMP, Flutter, and Rust SDKs. Support will expand to additional SDKs in the future.
- Upgrading to Ditto SDK 5.1 changes the on-disk index format.
- If you need to downgrade from Ditto SDK 5.1 or later, migrate through Ditto 5.0.2+. You can also migrate through Ditto 4.14.6+.
1. Performance: Faster Queries, Lower Memory Use
Edge applications feel database performance differently from cloud applications. A slow local query doesn’t just delay a response from a server. It can block a screen transition, increase battery use, create UI churn, or consume memory on a device with limited resources.SDK 5.1 delivers a major leap in local query performance. Applications can load data faster, complete writes sooner, and react to changes more quickly—even as their local datasets and workloads grow.The improvements span nearly every kind of local data operation: selects, indexed reads, inserts, updates, deletes, evictions, aggregations, and observers. In practice, this means more responsive user experiences, less time waiting for data operations, and greater capacity on the same device hardware.These gains come from improvements throughout the local data path. Ditto performs less decoding and allocation, finds documents more directly, executes mutations more efficiently, avoids unnecessary observer work, and reduces full database scans during subscription changes. An opt-in relaxed durability mode can further reduce disk synchronization for rebuildable sync metadata without changing the durability of application documents.Android retail benchmark
The gains are broad rather than limited to one optimized query path. In testing on an Orion O6 Android device, SDK 5.1 was faster in 70 of 71 measured scenarios, with one result too close to call. The 72-scenario suite modeled an offline-first retail application with approximately 93,000 documents across seven synced collections.These results compare median runtimes from Ditto 5.0.3 and Ditto 5.1.0. Performance varies by device, data, indexes, and query mix, so test representative workloads on your target hardware.
Dramatically faster document counts
A count is a query that answers one simple question: how many documents match? Apps use counts all the time to show how many orders are open, how many items are in stock, or how many results a search found.One of the largest individual improvements is full-collection document counting. Ditto 5.1.0 adds an optimized path forCOUNT(*), reducing the benchmark’s median execution time from 149.03 ms to 0.89 ms—approximately 167× faster. Counts with a filter also improved by approximately 4.4×.These improvements accelerate queries such as
SELECT COUNT(*) FROM tasks and SELECT COUNT(*) FROM tasks WHERE status = 'open', making it substantially faster to calculate totals for dashboards, backlog checks, pagination, and application status displays.Lower memory use
Edge devices like phones, tablets, and point-of-sale terminals have a fixed amount of memory that every app shares. The less memory Ditto uses, the more room your app has for its own work, and the less likely the operating system is to slow it down.In a separate Android workload that grew a collection from 3,000 to 30,000 documents, Ditto 5.1.0 delivered approximately 2.1× as many observer results while using less memory than Ditto 5.0.3.Total PSS estimates the process’s physical RAM footprint, and peak Total PSS is the highest that footprint reached during the test. Native heap covers Ditto’s Rust core—the pool of memory the program sets aside while it runs to hold its working data. Tombstone cleanup, bulk mutations, and retained disconnected sync sessions are also bounded more carefully to reduce peak memory in high-volume deployments.
2. Query Engine: New Ditto Query Capabilities
Performance is only half of the query story in this new release. DQL (Ditto Query Language) gains the two capabilities customers asked for the most:JOIN and composite indexes. Customers can also run ADVISE to identify any indexes that would speed up query performance.Join collections locally
A join is a query that combines related data from two collections into one result. It matches records that share a value, like a task and the project it belongs to, so your application gets one combined answer instead of two separate lists.SELECT statements on edge devices can now join multiple local collections. This removes the need to coordinate separate queries and merge their results in application code.DQL
ADVISE when you need an index recommendation.Create composite indexes
An index is a lookup structure the database maintains so it can find matching documents without reading the whole collection, much like the index at the back of a book. A composite index covers two or more fields at once, so a query that filters on one field and sorts by another can be answered in a single lookup.Edge devices now support composite indexes over multiple fields. A single composite index can accelerate queries that repeatedly filter or sort by the same combination of fields—for example, tenant and time, status and assignee, or location and category.The following index is designed for queries that filter tasks bystatus and sort them by createdAt:DQL
DQL
ADVISE against the query to get an index recommendation.Find the right indexes with ADVISE
ADVISE turns index optimization into a guided workflow. Prefix a query with ADVISE, and Ditto plans how it would execute that query without actually running it or reading any documents. It inspects the query’s filters, sorts, projections, and joins. Then, Ditto spots the places where the engine would have to scan the whole collection. For each one, the response explains why an index would help and provides a ready-to-run CREATE INDEX statement.For example, advise a query that filters tasks by estimated effort:DQL
estimateHours:ADVISE AND PROVISION to create the recommended indexes automatically. ADVISE can also recommend composite and covering indexes for more complex filters, sorting, projections, and joins. It is currently available on edge devices.Return changed documents with RETURNING
RETURNING lets an INSERT, UPDATE, DELETE, EVICT, or TOMBSTONE statement return data from the documents it changed. A data mutation and its confirmation can become one operation. Applications can receive the affected data immediately instead of issuing a second query.For example, update matching documents and return their IDs and new values in one operation:DQL
RETURNING is especially valuable with deletes and evictions because it can return document contents before they are removed. It also supports projections, expressions, aliases, and aggregates such as RETURNING COUNT(*) AS removed.Ditto 5.1 also adds INSERT ... SELECT for creating documents directly from query results.Control long-running requests
A single expensive query on an edge device can hold resources that are needed by the rest of an application. Two new system parameters can catch runaway queries before they cause performance issues.Set either parameter to
0 to disable it. Request history can also filter by request type or explicit profiling requests.3. Security: Expanded Certificate Revocation
Security policies at the edge need to keep working even when devices are not continuously connected to the cloud. Security teams lose sleep over what happens when an edge device is lost or stolen.SDK 5.1 will help security teams sleep better. Certificate revocation information now propagates securely from Ditto Server to edge devices and from peer to peer throughout the mesh. As peers connect, they share the latest revocation information.Revocation enforcement is enabled by default. Peers reject new connections that present a revoked certificate and terminate matching active connections when a revocation arrives. This isolates revoked clients and prevents them from reconnecting through another peer in the mesh.Every hop verifies the revocation’s signature against its trusted certificate authority keys, the source that issues each device’s identity credentials. A compromised peer cannot forge revocations.4. Troubleshooting: Identify Problems and Recover Automatically
A device misbehaving in the field is a hard problem to tackle in edge computing. It’s expensive and inefficient to fly an engineer out to attach a debugger to a tablet that is 3,000 miles away in the back of a restaurant.SDK 5.1 adds new options to remotely collect edge device data and identify the root cause of an issue. Support bundles now includeconfig_snapshot.json, which records the effective DittoConfig, transport configuration, system parameters, and SDK version at capture time. This provides essential device config information at the start of every investigation or support case.Other new remote diagnostics include:- A configurable Unix
debug_socketlets you remotely run DQL diagnostics against an edge device.- You can inspect a live device directly rather than reproducing the problem in a lab.
- Nine new network counters under
ditto.network.dsoq.*surface Ditto Sync over QUIC (DSOQ) protocol failures in your existing production metrics, without debug logs. - SQLite metrics distinguish the application data store from replication metadata databases on supported Unix platforms, showing which one is driving disk activity.
5. Transport at Scale: Multicast Beta
Today, Ditto’s default peer-to-peer model establishes a session between every pair of edge devices. The total connection count grows with the square of the mesh size, O(N²). Six devices need 15 connections, and sixty devices need 1,770. Connection maintenance eventually becomes the dominant cost in environments with a large number of edge devices like a mall, a ship, a concert venue, or an aircraft.Multicast is now available in SDK 5.1 as an opt-in beta. Devices join a shared multicast group rather than pairing off, which drops the connection count from O(N²) to O(N). There is one group membership per device.A sender would typically transmit an update once per device in the mesh, which is O(N). Multicast enables the sender to publish a single broadcast to the group, which is approximately O(1). There is one send, no matter how many devices are listening.The transport is built on reliable multicast (NORM, RFC 5740) combined with Ditto’s data reconciliation, so peers recover missed data and catch up after joining or reconnecting.When multicast is configured and available, it becomes the preferred replication path. Traffic is encrypted for the group, and existing peer-to-peer transports remain active as automatic fallback for peers the group cannot reach. Documents and attachments both replicate over multicast, including repair of missing attachment data.Upgrading to 5.1
The upgrade to Ditto Edge SDK 5.1 is seamless. Simply bump your dependency to 5.1.0 and Ditto handles the rest. An index migration will run automatically the first time your app starts. Data sync is backward-compatible, and 5.1 peers will work with 5.0 and v4 peers while you roll out gradually.Tested rollback compatibility
Ditto Edge SDK 5.1 has undergone extensive backward-compatibility and rollback testing to ensure production deployments can safely return to supported earlier SDK versions when needed.The 5.1 SDK changes the on-disk index format. If you need to downgrade from Ditto 5.1 or later, migrate through Ditto 5.0.2+. You can also migrate through Ditto 4.14.6+. These versions recognize the updated index format and automatically revert it to the format understood by earlier versions.During the downgrade, composite indexes are replaced with single-field indexes, one for each of the composite index’s keys.See index migration and downgrade behavior for details. As with any production upgrade, validate the procedure with representative application data before deployment.Swift-Specific Changes
The Swift SDK in Ditto 5.1 improves concurrency behavior and diagnostics:- Store observers now deliver callbacks on the queue specified by the
deliverOnparameter. - The store observation handler type aliases are now
@Sendable. - Exceptions thrown by application callbacks preserve their original call stack, so crash reporters attribute them to the throwing code instead of to Ditto.
- Custom identity providers no longer stall the SDK during the first credential refresh.
DiskUsageInspectorView, a SwiftUI diagnostic view for inspecting live disk usage, growth trends, health thresholds, per-collection rankings, and document-size distributions.Platform changes
- Intel (
x86_64) Mac support and tvOS support are removed. - DittoSwiftTools now requires iOS 15+, Mac Catalyst 15+, or macOS 12+.
- The bundled
DittoSwiftPresenceVieweris removed. UseDittoPresenceViewerfrom DittoSwiftTools instead. - The
CBORenum and obsolete CBOR-specific store errors are deprecated.
Swift Specific Changelog
Added:DittoMulticastBetaConfigandDittoPeerToPeer.multicastBetafor configuring the beta reliable UDP multicast transport. The transport is disabled by default and currently supported on iOS and macOS. On iOS, changes requested while sync is active take effect after sync is stopped and successfully started again, when Ditto validates the required platform configuration. (#SDKS-4471)DittoConnectionType.multicastenum option representing beta reliable UDP multicast connections. The transport is currently supported on iOS and macOS. (#SDKS-4471)DiskUsageInspectorViewin DittoSwiftTools: a SwiftUI diagnostic view that shows live total disk usage, health status against an adjustable threshold, growth-rate trend, and projected time to threshold. Opt-in scans add per-collection rankings and a per-collection document-size histogram. (#SUPP-284)
- DittoSwiftTools minimum platform requirements are raised to iOS 15+, Mac Catalyst 15+, and macOS 12+ (previously iOS 14+, Mac Catalyst 14+, and macOS 11+). The tvOS 15+ requirement is unchanged. (#SDKS-3141)
- The
DittoStoreObservationHandler,DittoStoreObservationHandlerWithSignalNext, andDittoSignalNexttype aliases are now@Sendable. (#SDKS-3856)
- Uncaught exceptions thrown inside SDK callback closures are now re-raised with the original call stack preserved, so crash reporters attribute the crash to the throwing code instead of reporting a
SIGABRTinside Ditto. (#SDKS-3483) - Custom identity providers using
DITIdentityProviderno longer stall the SDK the first time a credential refresh is requested. The refresh request is released immediately so the peer is not blocked. (#SDKS-3623) DittoStore.registerObservernow dispatches its callback on the queue specified by thedeliverOnparameter, resolving a crash when used with Swift concurrency. (#SDKS-3856)
DittoPeerOS.tvOS. The case is retained so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)- The
CBORenum and theDittoError.StoreErrorReasoncasesinvalidDocumentStructure(cbor:)andnonStringKeyInDocument(key:). The SDK no longer produces these; they will be removed in a future version. (#SDKS-4009)
- Support for Intel (
x86_64) Macs. (#SDKS-2924) - The
DittoSwiftPresenceViewerframework target and podspec. Use theDittoPresenceViewerproduct from DittoSwiftTools via Swift Package Manager instead. (#SDKS-3141) - tvOS platform support. (#SDKS-3944)
Kotlin-Specific Changes
Data Streams Public Preview
Android Kotlin applications can now open low-latency, bidirectional byte streams to specific reachable peers on named topics. Reliable streams deliver messages in order or fail the connection. Unreliable streams favor latency and may lose, reorder, or duplicate messages.Stream payloads are ephemeral: they are never stored, queried, or synchronized as documents. The preview requires explicit opt-in and NGN configuration. See Data Streams for setup, lifecycle, framing, reconnection, and backpressure guidance.Observability and lifecycle improvements
- Kotlin and Kotlin Multiplatform applications can opt into OpenTelemetry spans for DQL, transaction, and attachment operations.
- Slow Flow collectors now receive a single coalesced, up-to-date result instead of a backlog of stale observer results.
- DQL argument maps accept additional Kotlin scalar, collection, attachment, and serializable values.
- Memory and lifecycle fixes cover observers, diffs, attachments, query results, subscriptions, presence, and authentication handlers.
Kotlin Specific Changelog
Added:- Data Streams Public Preview: low-latency, bidirectional byte streams between reachable Android peers. See Data Streams for requirements and usage guidance.
transports_wifi_aware_instant_communication_enabledsystem parameter (default:true). Set it tofalseto disable Wi-Fi Aware Instant Communication Mode on single-radio devices that experience Wi-Fi instability from multi-channel switching. (#21321)transports_ble_warm_gatt_cache_enabledsystem parameter (Android, default:false). When enabled before sync starts, a cleanly disconnected peripheral’s GATT connection is kept warm so reconnecting to a known peer skips BLE service discovery. (#NETW-1976)- Opt-in OpenTelemetry tracing for DQL queries, transactions, and attachment operations, configured through the new
DittoInstrumentation.configure()API. (#SDKS-3219) Enum,Char,UByte,Short,Byte, andUIntvalues can now be individually converted toDittoCborSerializableorDittoJsonSerializable. (#SDKS-3823)DittoTransportConfig.PeerToPeer.MulticastBetaandDittoTransportConfig.PeerToPeer.multicastBetafor configuring the beta reliable UDP multicast transport. The transport is disabled by default, with availability limited to supported platforms during the beta. On Android and iOS, changes requested while sync is active take effect after sync is stopped and successfully started again, when Ditto validates platform prerequisites. (#SDKS-4471)DittoConnectionType.Multicastenum option representing beta reliable UDP multicast connections. Transport availability is limited to supported platforms during the beta. (#SDKS-4471)
DittoStore.observe()andDittoStore.observeWithDiff()now coalesce writes that arrive while a slow collector is busy, delivering a single up-to-date emission rather than a backlog of stale results. (#SDKS-3836)
- The
DittoPresence.connectionRequestHandlersetter no longer leaks the previous handler and its captured user closure on every reassignment. (#22500) - Memory leak in
DittoStore.fetchAttachmentandDittoStore.newAttachmenton repeated calls for the same attachment. (#SDKS-1898) - Memory leak in
DittoStoreObserverwhen the suppliedonClosecallback throws. (#SDKS-1898) - Memory leaks in
DittoStore.observe,DittoStore.collect,DittoStore.registerObserver, andDittoStore.fetchAttachmentwhen a callback races with a closingDittoinstance. (#SDKS-1898) - Memory leak on each access to
DittoConfig.default,DittoTransaction.info,DittoSync.subscriptions,DittoSyncSubscription.queryArgumentsCborData, andDittoSyncSubscription.queryArgumentsJsonString. (#SDKS-1898) - Memory leak in the
DittoDiff-receiving overloads ofDittoStore.observe,DittoStore.collect, andDittoStore.registerObserver. (#SDKS-4018) DittoAuthenticatornow releases itsexpirationHandlerbinding promptly when the parentDittoinstance is closed. (#SPO-651)
- Wi-Fi Aware TCP sync on Android no longer breaks when the shared TCP listener is bound to IPv4 or disabled. (#22612)
- Android BLE central connections with 2M PHY enabled no longer start GATT service discovery while PHY negotiation is still in flight, which could silently leave the connection unusable on devices that are slow to negotiate PHY. (#NETW-1452)
- Wi-Fi Aware peer-to-peer connections between Android 13+ devices no longer fail when each side independently selects a different security configuration even though a mutually supported one is available. (#NETW-900)
NullPointerExceptioninStableBluetoothPlatform.onCharacteristicReadandonCharacteristicChangedon Android 12 and below whenBluetoothGattCharacteristic.getValue()returns null. (#SPO-862)
- The DQL query
argumentsparameter isMap<String, Any?>?(nullable) again across the Kotlin SDK, matching v4. Passnullto indicate no arguments. (#SDKS-3820) Enum,Char,Short,Byte,UByte,UInt,Array<*>, andSet<*>values can now be used as DQL query arguments. Previously these types caused anIllegalArgumentExceptionat runtime. (#SDKS-3823)- APIs using
Map<String, Any?>?arguments now correctly acceptDittoAttachmentandDittoCborSerializablevalues inside the map, matching the documented attachment-insert pattern. (#SDKS-4195)
DittoStoreObserverrace condition where the observer would never close when the event handler threw an exception, caused by the observer reference not being set before the FFI callback fired. (#21923)- Android apps with
isMinifyEnabled = trueno longer crash on Ditto initialization. The published Kotlin AARs now bundle the requiredconsumer-rules.prokeep rules. (#SDKS-2626) Ditto.sync().stop()no longer crashes the app withForegroundServiceDidNotStartInTimeExceptionon Android 14+ when the foreground service is enabled. (#SPO-941)
DittoPeerOs.Tvos. The entry is retained so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)
Flutter-Specific Changes
The Flutter SDK in Ditto 5.1 adds observer backpressure throughStoreObserverV2, registerObserverV2(), and registerObserverWithSignalNext(), including support on Flutter Web. Ditto.observeTransportConditions() and the DittoSyncPermissions utility make transport configuration issues and missing Android permissions easier to diagnose.Repeated Store.execute calls now reuse a long-lived worker, improving throughput for applications that issue many small queries while keeping work off the calling isolate. Fixes to teardown, observer cancellation, presence, authentication, attachments, and memory management improve long-running application behavior.Requirements
- Dart 3.5.4 or later
- Flutter 3.24.5 or later
- Apple framework targets are arm64-only; Intel (
x86_64) support is removed.
Flutter Specific Changelog
Performance:Store.executeno longer incurs per-call startup overhead when dispatching many small queries, restoring throughput comparable to SDK 4.x while keeping the calling isolate unblocked during query execution. (#SDKS-3879)
Store.registerObserverV2()method for registering store observers with automatic signal-next backpressure that integrates with Dart stream pause/resume. (#SDKS-2389)Store.registerObserverWithSignalNext()method for registering store observers with manual signal-next backpressure control. (#SDKS-2389)StoreObserverV2class with explicit signal-next backpressure control and a single-subscriptionchangesstream. (#SDKS-2389)- Flutter Web support for
Store.registerObserverV2()andStore.registerObserverWithSignalNext(). (#SDKS-2429) DittoSyncPermissionsutility class for querying required and missing Android permissions. (#SDKS-3178)Store.experimentalSkipExecuteIsolateOffloadflag (default:false). When set totrue,Store.executeruns on the calling isolate instead of dispatching to a background isolate, improving throughput for apps that issue many small queries in sequence. (#SDKS-3878)Ditto.observeTransportConditions()for surfacing transport health and configuration issues (missing permissions, disabled hardware, unapplied config) reported by the underlying transports. (#SDKS-439)MulticastBetaConfigandPeerToPeer.multicastBetafor configuring the beta reliable UDP multicast transport. The transport is disabled by default and currently supported on Android and iOS. On Android and iOS, changes requested while sync is active take effect after sync is stopped and successfully started again, when Ditto validates platform prerequisites. (#SDKS-4471)ConnectionType.multicastenum option representing beta reliable UDP multicast connections. The transport is currently supported on Android and iOS. (#SDKS-4471)
- The Android Context is now set automatically in
DittoPlugin.onAttachedToEngine(). (#SDKS-3178) Ditto.init()is now optional;Ditto.open()initializes automatically. (#SDKS-3178)
- Crashes when force-closing apps that use a connection request handler. (#SDKS-2673)
- Presence observer callbacks are properly cleaned up when
Ditto.close()is called, preventingSIGABRTcrashes during shutdown. (#SDKS-3134) Ditto.close()now explicitly stops sync before shutdown. (#SDKS-3617)- Auth expiration handler callbacks are properly cleaned up when
Ditto.close()is called, preventingSIGABRTcrashes during shutdown. (#SDKS-3626) - Custom log callbacks are properly cleaned up when
Ditto.close()is called, preventingSIGABRTcrashes during isolate shutdown. (#SDKS-3630) Ditto.close()no longer waits an extra ~500 ms when any presence observer was used. (#SDKS-3762)- Active
StoreObserver,StoreObserverV2, andSyncSubscriptioninstances now report being cancelled after the owningDittois closed:isCancelledreportstrueandcancel()is a no-op, as documented. (#SDKS-3916)
Presence.connectionRequestHandlerno longer leaks memory each time a remote peer requests a connection. (#SDKS-3800)- When
Presence.connectionRequestHandlerthrows or its returnedFuturerejects, the connection is now denied immediately instead of after a ~10-second wait. (#SDKS-3800) Presence.observe()now delivers an immediate first callback with the current presence graph, matching the documented behavior and the other SDKs. (#SDKS-804)
- Memory leaks that caused the SDK’s memory usage to grow over time during normal use of sync subscriptions, presence, query results, and attachments. (#SDKS-3638)
- A
StoreObserverregistered without anonChangecallback now defers matching queries against the store until the first listener attaches toStoreObserver.changes. Observers that are registered but never listened to no longer emit events or run query work. Observers registered with anonChangecallback are unaffected. (#SDKS-3878) StoreObserver.cancel()no longer crashes the app when called while observer callbacks are in flight, which could occur with active sync over large collections. (#SPO-1022)
Authenticator.login()is now offloaded to a background isolate so a slow authentication webhook no longer blocks the UI on VM platforms. (#SDKS-1888)- Android apps with
isMinifyEnabled = trueno longer crash on Ditto initialization. The required Android libraries used by the Flutter plugin now correctly bundle theconsumer-rules.prokeep rules. (#SDKS-2626) - Crash on Flutter Web when reading
Authenticator.developmentProvider. (#SDKS-2699) TransportConfigBuilder.setAllPeerToPeerEnabled(false)no longer leaves AWDL enabled on iOS/macOS or Wi-Fi Aware enabled on Android. (#SDKS-3591)ditto.sync.isActiveno longer reportstrueafterditto.auth.logout(). (#SDKS-649)
- Intel (
x86_64) support from the Flutter SDK’s Apple framework. iOS Simulator and macOS targets are now arm64-only. (#SDKS-4033)
React Native-Specific Changes
The React Native SDK now initializes correctly on iOS with the new architecture in React Native 0.85+ and Expo SDK 56+. Expo configuration packages are optional peer dependencies, andDitto.close() supports clean teardown and reinitialization.The React Native Apple framework is now arm64-only; Intel (x86_64) support is removed.React Native Specific Changelog
Added:"Multicast"option toConnectionType, representing beta reliable UDP multicast connections. The transport is not yet available in the React Native SDK; this option is included for cross-SDK compatibility. (#SDKS-4471)
- React Native SDK initialization no longer crashes on iOS when used under React Native 0.85+ (Expo SDK 56+) with the new architecture enabled. (#SDKS-3832)
Ditto.close()on React Native no longer throws aTypeError, so the SDK can be cleanly torn down and reinitialized. (#SDKS-3971)- The React Native SDK on iOS no longer crashes because of an unhandled
SIGPIPEsignal. (#22006) - Android apps with
isMinifyEnabled = trueno longer crash on Ditto initialization. The required Android libraries used by the React Native SDK now correctly bundle theconsumer-rules.prokeep rules. (#SDKS-2626)
- The
tvOSvalue of thePeerOStype. The value is retained so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)
- Intel (
x86_64) support from the React Native SDK’s Apple framework (theDittoReactNativeIOSpod). iOS Simulator and macOS targets are now arm64-only. (#SDKS-4033)
@expo/config-pluginsandexpo-build-propertiesare now declared as optional peer dependencies of@dittolive/ditto, so missing Expo plugin dependencies surface as a package-install warning instead of a build-time error. (#SDKS-3832)
JavaScript Web-Specific Changes
ThetvOS value of the PeerOS type is deprecated. It remains available so applications can identify peers running older SDK versions on tvOS.JavaScript Web applications also receive the common query, sync, networking, security, and diagnostics improvements described above.JavaScript Web Specific Changelog
Added:"Multicast"option toConnectionType, representing beta reliable UDP multicast connections. The transport is not yet available in the JavaScript SDK; this option is included for cross-SDK compatibility. (#SDKS-4471)
- The
tvOSvalue of thePeerOStype. The value remains available so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)
JavaScript Node.js-Specific Changes
Inspecting aQueryResultItem that contains 64-bit integers with console.log no longer throws a BigInt JSON serialization error on Node.js versions earlier than 16.14.0 or Electron versions earlier than 19.0.0.The tvOS value of the PeerOS type is deprecated. It remains available so applications can identify peers running older SDK versions on tvOS.JavaScript Node.js Specific Changelog
Added:"Multicast"option toConnectionType, representing beta reliable UDP multicast connections. The transport is not yet available in the JavaScript SDK; this option is included for cross-SDK compatibility. (#SDKS-4471)
- Inspecting a
QueryResultItemwith 64-bit integer fields viaconsole.logno longer throwsTypeError: Do not know how to serialize a BigInton Node.js versions earlier than 16.14.0 and Electron versions earlier than 19.0.0. (#SDKS-4163)
- The
tvOSvalue of thePeerOStype. The value remains available so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)
Java-Specific Changes
The Java SDK in Ditto 5.1 improves observer and authentication-handler cleanup:DittoStoreObservernow closes correctly when an event handler throws.- Reassigning the presence connection-request handler no longer retains the previous callback.
- Expiration handlers are released when their parent
Dittoinstance closes.
DittoAuthenticationCallback and DittoAuthenticator.setCallback() are removed. Use DittoAuthenticator.setExpirationHandler() with an ExpirationHandler lambda instead.Java Specific Changelog
Added:DittoConnectionType.MULTICASTenum option representing beta reliable UDP multicast connections. The transport is not yet available in the Java SDK; this option is included for cross-SDK compatibility. (#SDKS-4471)
DittoStoreObserverrace condition where the observer would never close when the event handler threw an exception, caused by the observer reference not being set before the FFI callback fired. (#21923)DittoPresence.setConnectionRequestHandlerno longer leaks the previous handler and its captured user closure on every reassignment. (#22500)DittoAuthenticatornow releases itsexpirationHandlerbinding promptly when the parentDittoinstance is closed. (#SPO-651)
DittoPeerOs.TVOS. The constant is retained so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)
- The
DittoAuthenticationCallbackinterface andDittoAuthenticator.setCallback()method. UseDittoAuthenticator.setExpirationHandler()with anExpirationHandlerlambda instead. (#SDKS-2618)
C#-Specific Changes
The .NET SDK adds anetstandard2.0 target, enabling .NET Framework 4.8 applications to use Ditto.DQL arguments now serialize DateTimeOffset, DateOnly, and TimeOnly values as ISO 8601 strings, and convert decimal values predictably to double-precision numbers.The release also makes transaction completion under concurrent load, presence-handler disposal, and native-library resolution for packages.config projects more reliable.C# Specific Changelog
Added:netstandard2.0target framework support in the .NET SDK, enabling .NET Framework 4.8 applications to use Ditto. (#SDKS-3000)DittoConnectionType.Multicastenum option representing beta reliable UDP multicast connections. The transport is not yet available in the .NET SDK; this option is included for cross-SDK compatibility. (#SDKS-4471)
- A write transaction (
DittoStore.TransactionAsync) could intermittently hang under concurrent load while the transaction was completing or theDittoinstance was being disposed. (#DEVX-918) - Android apps with
isMinifyEnabled = trueno longer crash on Ditto initialization. The required Android libraries used by the .NET MAUI SDK now correctly bundle theconsumer-rules.prokeep rules. (#SDKS-2626) DateTimeOffset,DateOnly, andTimeOnlyvalues passed as DQL query arguments are now serialized to ISO 8601 strings instead of being silently dropped as empty objects. (#SDKS-3538)decimalvalues passed as DQL query arguments are now serialized as double-precision floating-point numbers instead of a CBOR decimal-fraction array. To keep full precision, convert decimal values to strings before insertion. (#SDKS-3538)- The
Ditto.Native.iOSandDitto.Native.MaccatalystNuGet packages no longer bundle the Sentry Cocoa framework. (#SPO-1086) - The
DittoPresence.ConnectionRequestHandlercallback could crash if a connection request arrived during or after disposal. (#SPO-632) - Projects using
packages.confignow correctly resolve the native library, preventingDllNotFoundException. The manual workaround of includingdittoffi.dllis no longer needed. (#SPO-963)
- The
DittoDiff.FromCborObject()method. It will be removed in a future major version. (#SDKS-3139) DittoPeerOS.tvOS. The value is retained so peers running older SDK versions on tvOS can still be identified in the presence graph. (#SDKS-3944)