Query the system:data_sync_info collection for sync information
DQL_STRICT_MODE=false
Read more about STRICT MODE and upcoming v5 behaviorsystem:data_sync_info
collection provides real-time information about synchronization status between your device and other peers in the Ditto mesh network.
system:data_sync_info
represents one peer connection:
_id
- Unique peer identifieris_ditto_server
- true
for cloud servers, false
for other devicessync_session_status
- "Connected"
, "Not Connected"
, or "Disabled"
synced_up_to_local_commit_id
- Latest commit ID synced to this peerlast_update_received_time
- Unix timestamp of last data receivedCOLLECTION system:data_sync_info (documents MAP)
Read more about STRICT MODE and upcoming v5 behaviorsystem: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.registerObserver
to monitor sync status changes in real-time:
synced_up_to_local_commit_id
to see if a peer has received your change.
API/Feature | Index Support |
---|---|
execute SDK API | ✅ Supported |
registerObserver SDK API | ✅ Supported |
registerSubscription SDK API | ❌ Not Supported |
Big Peer HTTP API | ❌ Not Supported |
SDKs with in-memory storage (e.g. web browser) | ❌ Not Supported |