Changes between Initial Version and Version 1 of SyncOverview


Ignore:
Timestamp:
05/01/08 15:47:33 (8 years ago)
Author:
dstillman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SyncOverview

    v1 v1  
     1{{{ 
     2#!html 
     3 
     4<h2>Sync Process</h2> 
     5<ol> 
     6<li style="margin-bottom: 1em;">Zotero client sends a /login request to the server with a username 
     7and password and, upon successful authentication, gets back a session 
     8key. Z client uses this session key in all subsequent requests until a) 
     9Firefox is restarted, b) the key expires due to inactivity, or c) the 
     10client logs out with a /logout request.</li> 
     11<li style="margin-bottom: 1em;">Zotero sends a /lock request to the server to get an exclusive 
     12session lock, which prevents other clients from syncing at the same 
     13time. This may be adjusted in the future to allow other clients that 
     14haven't made local changes to pull updated data, but for now they'll 
     15just get an error.<br> 
     16</li> 
     17<li style="margin-bottom: 1em;">Zotero finds all objects (items, creators, collections, etc.) that have been added, changed, or deleted since the last time it synced. (The ids of deleted objects are saved by a Zotero.Notifier observer at delete time.)<br> 
     18</li> 
     19<li style="margin-bottom: 1em;">Zotero sends an /updated request with the server timestamp of the 
     20last successful sync. Z server sends back XML of all data updated on 
     21the server since that timestamp. The XML is validated on the server 
     22using RELAX-NG before it's sent to the client.</li> 
     23<li style="margin-bottom: 1em;"> 
     24<p>Zotero processes the updated object data from the server and compares it to local data:</p> 
     25<p></p> 
     26<ol style="list-style-type: lower-alpha;"> 
     27<li style="margin-top: 1em; margin-bottom: 1em;">If an object has changed only remotely, it is saved/updated/deleted locally.</li> 
     28<li style="margin-bottom: 1em;">If an object has the same primary id (a small integer) as a local 
     29object but a different secondary key (a unique string generated at 
     30object creation time), it is a different object, so the primary id of 
     31the local version is changed to an available id.</li> 
     32<li style="margin-bottom: 1em;">If an object has been modified both locally and remotely, Zotero 
     33displays a conflict resolution window allowing you to choose between 
     34either version and make manual edits to the merged version.</li> 
     35</ol> 
     36</li> 
     37<li style="margin-bottom: 1em;">Zotero converts updated objects into XML and POSTs to /upload. The 
     38uploaded XML is validated on the server using RELAX-NG, and the server 
     39saves the new data, overwriting existing data.</li> 
     40<li style="margin-bottom: 1em;">Zotero sends an /unlock request to the server, freeing other clients to sync.</li> 
     41</ol> 
     42<h2>Additional Details</h2> 
     43<ul> 
     44<li>All data is transferred using HTTPS.</li> 
     45<li>Data is gzipped in both directions to reduce bandwidth and improve sync time.</li> 
     46</ul> 
     47 
     48}}}