This feature requires SDK version 4.12.0+ and an active Ditto Cloud subscription.
Understanding Ditto Cloud Sync
Ditto Cloud servers act as the source of truth in most deployments. Tracking sync status with the cloud is crucial for:- Critical Operations - Verify important data reached the cloud before proceeding
- User UI/UX Feedback - Show sync indicators when local commits haven’t uploaded
- Offline Handling - Know when devices reconnect and sync resumes
- Data Integrity - Ensure passenger manifests, orders, or transactions are safely stored
Quick Start
Check Cloud Connection
Thesystem:data_sync_info
collection can be used to find and track cloud server connections.
To query for the Ditto Server (e.g. Cloud) connections only use the following DQL Query.
DQL
Verify Data Reached Cloud
Track when specific local commits reach the cloud:Real-Time Sync Monitoring
Connection Status Observer
Monitor cloud connection Commits in real-time:Observers on
system:data_sync_info
result in the callback triggering every 500ms
even when the result remains the same. This frequency can be
configured using the live_query_system_collection_refresh_interval
system parameter.Track Pending Cloud Syncs
Track multiple local commits and monitor when they sync to the cloud:Monitor Incoming Cloud Data
Register an observer to track when new data arrives from the cloud by monitoring commits tolast_update_received_time
:
Observers on
system:data_sync_info
result in the callback triggering every 500ms
even when the result remains the same. This frequency can be
configured using the live_query_system_collection_refresh_interval
system parameter.Troubleshooting
Commits not syncing to cloud
Commits not syncing to cloud
- Verify cloud connection status - Use the connection check examples above
- Check subscription configuration - Ensure your sync subscriptions are properly configured
- Ensure device has network connectivity - Test basic internet connectivity
- Verify Ditto Cloud permissions - Check authentication and access permissions
Sync status shows disconnected
Sync status shows disconnected
- Check network connectivity - Verify internet connection is stable
- Verify cloud credentials - Ensure authentication tokens are valid
- Review transport configurations - Check WebSocket and network settings
- Check firewall/proxy settings - Ensure Ditto Cloud endpoints are accessible
High commit IDs but low synced values
High commit IDs but low synced values
- Large backlog of commits to sync - Consider reducing data volume or batch size
- Poor network conditions - Wait for better connectivity or optimize for low bandwidth
- Subscription recently changed - New subscriptions need time to sync historical data
See Also
- Monitoring Sync Status - General sync status concepts
- Managing Subscriptions - Configure what syncs
- Transport Configurations - Network setup
- Authentication - Cloud authentication