Adium

.Mac Syncing Support

Overview

Mac OS X 10.4 Tiger provides a robust, extensible framework that enables applications to synchronize specified data between computers. The framework and architecture are called Sync Services, and is integrated with .mac to provide computer-to-computer syncing. Adium users should have the ability to sync common preferences such as accounts and other settings with only a click, and this branch project aims to meet this need.

The relevant branch is /branches/adium_syncing.

The related Trac ticket is #403.

Schemas

Sync clients provide schemas that define the custom layout of their data to standardize the format of the data for the sync engine. The first schema defined for Adium is AIGeneralSchema, which is located in: (Project Root) -> SyncSchemas -> AIGeneralSchema in the branch's repository. The schema defines the following items for syncing: accounts and preferences from each of the preference pane categories (excluding Status and Events, which will likely have their own separate schemas or schema extensions.)

Key Decisions

- Status and Events were purposefully left out in the initial implementation as they have more complex entities and relationships.
- Logs will not be supported by .mac syncing directly because their relatively unchanging, one-way movement, large size, and high count make them unwieldy and unneeded in a field-differencing engine. A forum thread discussed this very issue and alternatives to still facilitate a form of log syncing between machines.
- ASH, discussed below, will not linked against the full Adium framework, only a couple key classes that need to be rewritten.

Proposed Architecture/Workflow

The principal agent in syncing for Adium is going to be the AdiumSyncHelper (ASH), a faceless application stored within the application bundle that will be the registered handler for sync requests. When a sync is initiated, ASH will launch and then use a distributed notification to inform Adium (if running) that it should show a dialog and lock down synced values. ASH will then log in to the appropriate Adium user profile and pull corresponding preferences. The sync then proceeds with push/pull/mingle, writes back any preferences as needed, and the client is alerted accordingly by another distributed notification when completed. ASH then quits after any cleanup.