• Home
Name Date Size #Lines LOC

..--

attachments/03-May-2024-1,5121,102

events/03-May-2024-386278

public/03-May-2024-11,4386,714

test/03-May-2024-844640

DEPSD03-May-2024322 1817

READMED03-May-20242 KiB3330

base_node.ccD03-May-202410.4 KiB314242

base_transaction.ccD03-May-20241 KiB3622

change_record.ccD03-May-20241.8 KiB6852

change_reorder_buffer.ccD03-May-20247.3 KiB218136

change_reorder_buffer.hD03-May-20243.2 KiB9237

debug_info_event_listener.ccD03-May-202410 KiB270224

debug_info_event_listener.hD03-May-20244.6 KiB12479

debug_info_event_listener_unittest.ccD03-May-20242.3 KiB6249

delete_journal.ccD03-May-20242.2 KiB5944

http_bridge.ccD03-May-202414.8 KiB406301

http_bridge_network_resources.ccD03-May-20241.1 KiB3020

http_bridge_unittest.ccD03-May-202419.2 KiB521366

internal_components_factory_impl.ccD03-May-20242.5 KiB7355

js_mutation_event_observer.ccD03-May-20243.4 KiB11289

js_mutation_event_observer.hD03-May-20242.1 KiB7245

js_mutation_event_observer_unittest.ccD03-May-20243.7 KiB11987

js_sync_encryption_handler_observer.ccD03-May-20244 KiB128108

js_sync_encryption_handler_observer.hD03-May-20242.1 KiB6545

js_sync_encryption_handler_observer_unittest.ccD03-May-20246.1 KiB174136

js_sync_manager_observer.ccD03-May-20243 KiB9774

js_sync_manager_observer.hD03-May-20242 KiB6141

js_sync_manager_observer_unittest.ccD03-May-20243.7 KiB12395

protocol_event_buffer.ccD03-May-20241 KiB3825

protocol_event_buffer.hD03-May-20241.1 KiB4321

protocol_event_buffer_unittest.ccD03-May-20242.4 KiB7855

read_node.ccD03-May-20243.9 KiB11593

read_transaction.ccD03-May-20241.5 KiB5135

sync_backup_manager.ccD03-May-20245.3 KiB155121

sync_backup_manager.hD03-May-20243.1 KiB8451

sync_backup_manager_unittest.ccD03-May-20245.6 KiB161127

sync_core.ccD03-May-20241.2 KiB3822

sync_core.hD03-May-20242.2 KiB6529

sync_core_proxy.ccD03-May-2024335 145

sync_core_proxy_impl.ccD03-May-20241.6 KiB4835

sync_core_proxy_impl.hD03-May-20242.1 KiB6130

sync_core_proxy_impl_unittest.ccD03-May-20242.9 KiB9467

sync_encryption_handler_impl.ccD03-May-202467.8 KiB1,6481,204

sync_encryption_handler_impl.hD03-May-202414 KiB316149

sync_encryption_handler_impl_unittest.ccD03-May-202496 KiB2,2831,857

sync_manager_factory.ccD03-May-20241 KiB3625

sync_manager_impl.ccD03-May-202440.5 KiB1,152901

sync_manager_impl.hD03-May-202415.3 KiB374230

sync_manager_impl_unittest.ccD03-May-2024120.7 KiB3,1422,475

sync_rollback_manager.ccD03-May-20244.8 KiB141113

sync_rollback_manager.hD03-May-20242.2 KiB6542

sync_rollback_manager_base.ccD03-May-202410.4 KiB335268

sync_rollback_manager_base.hD03-May-20245.6 KiB146107

sync_rollback_manager_base_unittest.ccD03-May-20243.8 KiB9981

sync_rollback_manager_unittest.ccD03-May-20249.2 KiB266208

syncapi_internal.ccD03-May-20243.7 KiB10878

syncapi_internal.hD03-May-20241.3 KiB4123

syncapi_server_connection_manager.ccD03-May-20243.5 KiB10580

syncapi_server_connection_manager.hD03-May-20242.8 KiB8046

syncapi_server_connection_manager_unittest.ccD03-May-20244.3 KiB135106

user_share.ccD03-May-2024356 166

write_node.ccD03-May-202418.2 KiB514349

write_transaction.ccD03-May-20243.8 KiB9870

README

1This file defines the "sync API", an interface to the syncer
2backend that exposes (1) the core functionality of maintaining a consistent
3local snapshot of a hierarchical object set; (2) a means to transactionally
4access and modify those objects; (3) a means to control client/server
5synchronization tasks, namely: pushing local object modifications to a
6server, pulling nonlocal object modifications from a server to this client,
7and resolving conflicts that may arise between the two; and (4) an
8abstraction of some external functionality that is to be provided by the
9host environment.
10
11This interface is used as the entry point into the syncer backend
12when the backend is compiled as a library and embedded in another
13application.  A goal for this interface layer is to depend on very few
14external types, so that an application can use the sync backend
15without introducing a dependency on specific types.  A non-goal is to
16have binary compatibility across versions or compilers; this allows the
17interface to use C++ classes.  An application wishing to use the sync API
18should ideally compile the syncer backend and this API as part of the
19application's own build, to avoid e.g. mismatches in calling convention,
20structure padding, or name mangling that could arise if there were a
21compiler mismatch.
22
23The schema of the objects in the sync domain is based on the model, which
24is essentially a hierarchy of items and folders similar to a filesystem,
25but with a few important differences.  The sync API contains fields
26such as URL to easily allow the embedding application to store web
27browser bookmarks.  Also, the sync API allows duplicate titles in a parent.
28Consequently, it does not support looking up an object by title
29and parent, since such a lookup is not uniquely determined.  Lastly,
30unlike a filesystem model, objects in the Sync API model have a strict
31ordering within a parent; the position is manipulable by callers, and
32children of a node can be enumerated in the order of their position.
33