Warning /!\ Ubuntu Touch is no longer maintained as a core product by Canonical. However, the Ubports community are continuing development.

Ubuntu Touch

Install
Get started here!

Get involved!
• Bugs
• Translate

• FAQ
• Release Notes

Core apps
Libertine
Cross Compile

• Devices
• Porting Guide
• Container Architecture

• Build from source
• Deploying

• Screencast
• Testing
• Specs

Get help ... and get in touch

System Contacts

Key Requirements

The following have been identified as key requirements and components that are needed in the Ubuntu Touch Contacts infrastructure:

Centralized Contacts Service

Contact Aggregation

Contact Exchange

Use cases

Data Sources

Define the list of supported sources for contacts, and what release they are required for:

Analysis of existing components

EDS

Evolution Data Server (EDS) is used in the current Ubuntu Touch solution for contacts, but has some issues as described below. However it has been improved significantly in version 3.8 to address some of it’s memory and performance limitations. This makes it a lot more compelling for us to continue to use as part of the Ubuntu Touch solution as it has many inherent advantages:

Some of the negatives are:

serialization between client and server was slow

Akonadi

Akonadi is the PIM server used by KDE. We looked into this and inquired with people who have used it extensively in the past. The consensus was that it is overly complicated for what we want to do, as it’s more of a generic server with capabilities for mail, contacts, calendaring and synchronization. There were reports of instability as well. Also, the client libraries for accessing the server are tied to KDE and qt4.x libraries and would have to be modified significantly for us to use in our environment.

Solutions

Current Implementation

Telephony App->QContacts->QtFolks->Folks->EDS

The current implementation only meets some of the key requirements set out above. It is documented for reference and is not expected to be used as-is going forward.

All contacts information is stored in EDS and accessed through Folks. Online contacts are merged automatically by Folks based on contact details.

Pros

All libraries already exists (avoid recreate the wheel); Some of the libraries are well maintained by community with bug fixes, new features every day and large use by other programs;

Cons

Proposed Implementation

The proposed solution is as pictured in the following diagram:

Contacts Architecture Revised.png

Contacts Service

The Contacts Service is the main daemon that exposes a dbus api to clients. This api will support all the of key requirements listed in the requirements sections (query, crud, paginated results. In addition, it will provide access to both a single address book or a“unified” address book spanning multiple content provider backends. The api to be exposed by the service needs to be defined. We should look at the UbuntuForAndroid api, as it was a dbus api that supported async queries and paginated result sets. In addition we should look at the api defined by Patrick Ohnly as part of the syncevolution/ivi project defined here.

Aggregator

This is a thin layer that sits above EDS and is responsible for aggregating contacts from EDS. The aggregator is necessary to support the unified address book requirement. It is done on the server side to prevent each client from having to individually manage address books.

The aggregator will interact with EDS via the Direct Read Access that was introduced in EDS 3.8 (see blog post here) to save on any dbus interaction at this level.

The current implementation used in ubuntu-touch for the aggregator is Folks.

EDS

EDS will be used as the main data server, but it’s api’s will not be exposed directly by the Contacts Service. We will use version > 3.8 to gain the benefits of the performance enhancements that were done there.

Plugins/Contacts Provider

EDS utilizes a plugin architecture to provide access to different backend data sources. We’ll leverage this architecture to provide access to a variety of data sources/backends, such as a local data store backed by sqlite, a u1db based backend to support eventual sync with Ubuntu One, Google Contacts backend, etc.

It’s envisioned that any third-party application that wants to expose it’s contacts to the system could use this mechanism and provide a plugin/backend for EDS

Client Access

Qt/QML Applications

These applications can leverage the work done in QtMobility by using the QContactManager class to interact with the ContactsService. This will be accomplished by writing a QContactManagerEngine (plugin) that uses the ContactsService as it’s backend, which will abstract away the details of the ContactsService and provide access directly through the standard QContact* classes. This plugin will be set as the default provider for the Ubuntu Touch platform.

Other Clients

Other clients in the system, such as scopes and system level components can access the contact service directly through it’s dbus api’s, using the appropriate language bindings.

Additional Ideas

Touch/Specs/ContactsService (last edited 2013-08-20 23:01:45 by pool-173-48-208-136)