Synchronization
In Dart, the AtClient is stored within the AtClientManager. Once an atSign has been onboarded, you will be able to access the AtClientManager for its associated atSign.
AtClientManager
AtClientManager is a singleton model. When AtClientManager.getInstance()
is called, it will get the AtClientManager instance for the last onboarded atSign.
If you need simultaneous access to multiple atClients, you need to create a new isolate for each additional atClient, and onboard its atSign within the isolate.
An example of this pattern can be found in at_daemon_server.
SyncService
SyncService syncs the client app and remote secondary server’s changes:
If the client app’s changes are ahead, it pushes the changes to the remote secondary.
If the remote secondary is ahead, it pulls the changes to the client app.
You can retrieve the SyncService from the AtClientManager like so:
Performing Syncs
To simply issue a sync, call the .sync
function:
Last updated