Difference between revisions of "Zimbra Next Generation Modules/Zimbra NG Mobile/SyncStates"

m (1 revision imported: Zimbra NG)
 
Line 1: Line 1:
<div class="col-md-12"><br></div>
+
#REDIRECT [[Zimbra_NG_Modules/Zimbra_NG_Mobile/SyncStates]]
<div class="col-md-12"><br></div>
 
<ol class="breadcrumb">
 
  <li>[[Main Page|Zimbra Wiki]]</li>
 
  <li>[[Zimbra_Next_Generation_Modules]]</li>
 
  <li>[[Zimbra_NG_Mobile]]</li>
 
  <li class="active">Zimbra NG Mobile - SyncStates</li>
 
</ol>
 
__NOTOC__
 
<div class="col-md-12"><br /></div>
 
<div class="col-md-9">
 
    <h2 class="title-header" style="padding-bottom: 9px; border-bottom: 4px solid #0087c3;">Zimbra NG Mobile - SyncStates</h2>
 
    <div class="col-md-12">
 
        <div class="ibox-content">
 
            <div class="post animated fadeInLeft animation-delay-8" style="padding-top:5px">
 
                <div class="panel panel-default">
 
                    <div class="panel-body">
 
                        <h5 class="post-title">Zimbra NG Mobile - SyncStates</h5>
 
                        <div class="row">
 
 
 
== Zimbra NG Mobile and the SyncState ==
 
The SyncState (short for Synchronization Status) is a set of informations kept on the server about the synchronization with a mobile device. Each time a devices establishes a connection with the Zimbra NG Mobile module, the following steps take place:
 
 
 
* 1. The device requests a folderSync operation in order to synchronize the local Folders with the ones on the server.
 
    One SyncKey per local folder is sent (or a single SyncKey set to '0' if this is the first connection between the device and the server) 
 
* 2. The server replies with a list of available folders. 
 
    One SyncKey per folder is sent by the server.
 
* 3. Then, the device requests an itemSync operation in order to synchronize all due items.
 
    The server stores the items synchronized in the SyncState.
 
* 4. After completing the itemSync operation, the device sends a 'ping' command to keep the connection alive.
 
    Step 4 is repeated as long as no changes happen to the synchronized account.
 
 
 
Every time a new item is stored on the mailbox or an old item is modified the server notifies the availability to the device, which closes the active connection (the one kept alive by the ping command) and repeats steps 3. and 4. .
 
 
 
The SyncState is the combination of the SyncKeys saved on step 2 and the itemIds saved on step 3. It's saved by the server per the userId/deviceId unique pair.
 
 
 
=== Sync Request ===
 
The Sync Request is the actual synchronization process, started by either Zimbra NG Mobile or by the client. During a sync request, any change in the mailbox that happened since the last request is synchronized to the device and viceversa.
 
 
 
A sync request is issued when:
 
* The SyncState changes
 
* A sync is forced client-side
 
* The current "ping" expires and a new one is sent by the device (the keepalive duration is defined by the client)
 
 
 
== Managing the SyncStates ==
 
 
 
=== Via the Zimbra Next Generation Modules Administration Zimlet ===
 
 
 
Zimbra NG Mobile provides two options to manage the SyncStates of synchronized mobile devices:
 
* Reset Device: Resets the device's SyncState for a single account, forcing a full re-synchronization the next time the device connects to the server.
 
* Remove Device: Removes all the device's SyncState and history from the server. Useful when a mobile device is not used anymore or is assigned to a different employee in the same company.
 
 
 
Both options can be found in the Zimbra Next Generation Modules Administration Zimlet (On the left menu of the Zimbra Administration Console: Zimbra Next Generation Modules -> Zimbra NG Mobile).
 
 
 
=== Via the Zimbra Next Generation Modules CLI ===
 
==== The doRemoveDevice command ====
 
<pre><nowiki>
 
Syntax:
 
  zxsuite mobile doRemoveDevice {account} {device_id}
 
 
 
PARAMETER LIST
 
 
 
NAME            TYPE           
 
account(M)      Account Name   
 
device_id(M)    String         
 
 
 
(M) == mandatory parameter, (O) == optional parameter
 
 
 
Usage example:
 
 
 
zxsuite mobile doRemoveDevice john@example.com Appl79032X2WA4S
 
Removes John's Appl79032X2WA4S device SyncState
 
</nowiki></pre>
 
 
 
==== The doResetAccount command ====
 
<pre><nowiki>
 
Syntax:
 
  zxsuite mobile doResetAccount {account}
 
 
 
PARAMETER LIST
 
 
 
NAME          TYPE           
 
account(M)    Account Name   
 
 
 
(M) == mandatory parameter, (O) == optional parameter
 
 
 
Usage example:
 
 
 
zxsuite mobile doResetAccount john@example.com
 
Resets all the device states for John's account
 
 
 
</nowiki></pre>
 
 
 
==== The doResetDevice command ====
 
<pre><nowiki>
 
Syntax:
 
  zxsuite mobile doResetDevice {account} [attr1 value1 [attr2 value2...]]
 
 
 
PARAMETER LIST
 
 
 
NAME            TYPE            DEFAULT
 
account(M)      Account Name   
 
device_id(O)    String          all
 
 
 
(M) == mandatory parameter, (O) == optional parameter
 
 
 
Usage example:
 
 
 
zxsuite mobile doResetDevice john@example.com Appl79032X2WA4S
 
Resets John's Appl79032X2WA4S device SyncState
 
 
 
</nowiki></pre>
 
                        </div>
 
                    </div>
 
                    <div class="col-md-9">
 
                        <div class="panel-footer">
 
                            <p><i class="fa fa-clock-o"></i> Aug 25, 2016 - [https://www.zimbra.com/email-server-software/ Know more »]</p>
 
                        </div>
 
                    </div>
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
<div class="col-md-3"><br /></div>
 
<div class="col-md-3">
 
    <div class="panel panel-zimbrared-light-border">
 
        <div class="panel-heading">
 
            <h3 class="panel-title"><i class="fa fa-gear pull-left"></i> Zimbra Next Generation Modules</h3>
 
        </div>
 
        <div class="panel-body">
 
            {{ZNG}}
 
        </div>
 
    </div>
 
</div>
 
<div class="col-md-3">
 
    <div class="panel panel-primary-light-border">
 
        <div class="panel-heading">
 
            <h3 class="panel-title"><i class="fa fa-info-circle pull-left"></i> Zimbra Next Generation Modules Resources</h3>
 
        </div>
 
        <div class="panel-body">
 
            {{ZNGL}}
 
        </div>
 
    </div>
 
</div>
 
<div class="clearfix"></div>
 
<div class="col-md-12"><br></div>
 
{{FH}}
 

Latest revision as of 13:36, 29 November 2017

Jump to: navigation, search