Well, I can answer myself.
CalDAV
CalDAV is a protocol on top of WebDAV which is an extension of the HTTP protocol. CalDAV is described in RFC 4791. It uses iCalendar as data format. There are a lot of implementations.
About conflicts CalDAV uses the 409 Conflicts
status code (HTTP 1.1). The client has to deal with this error code, as far as I know, iCal (the Mac client) just reverts local changes.
Then, it's quite easy to define rules in the server to know what to do if there are conflicts, if you cannot solve one of them, then we just need to send a 409
status code.
As a standard, CalDAV is dedicated to manage calendar data, and there are a lot of clients.
Unfortunately, Android doesn't provide any native solution to use this protocol, actually it doesn't provide anything else than Exchange ActiveSync (used by Google). But there are tons of CalDAV clients on the Android Market.
iOS has a native support of CalDAV.
SyncML
Synchronization Mrkup Language is a platform-independent synchronization language to manage data, created by major companies like Nokia, IBM, … It's an open standard. It uses HTTP as transport and XML to describe information. There a various server implementations, Funambol is a well-know for instance.
SyncML describes seven synchronizations:
- Two-way Sync: both server and client shares information about changes, but the client is the first which send changes;
- Slow sync: the client sends all its data. The server determines a delta between its data and client's data, then the server sends this delta. It's often used on the first synchronization;
- One-way sync, client only: the client sends changes to the server;
- Refresh sync from client: the client sends all its data, the server sends all its data;
- One-way sync, server only: the server sends changes to the client;
- Refresh sync from server: the server sends all its data, the client replaces its data by server's data;
- Server alerted sync: the server asks the client to start a given synchronization.
SyncML handles conflits on the server with a set of predefined rules like Updates mades on the Client always win
, Updates mades on the Client always win
, …
SyncML is dedicated to synchronize data but neither iOS nor Android support it. Nokia or Samsung smartphones seem to support this protocol, as well as Windows Phone 6.
So?
Microsoft Exchange ActiveSync is the best choice to support almost all smartphones, and heavy clients too. But, it's not an open standard, and it's commercial, and I didn't describe it for these reasons, just remember it.
About mobile Operating Systems:
- Android doesn't support anything else than ActiveSync, but some good CalDAV clients exist;
- iOS supports CalDAV but doesn't support SyncML, and as far as I know, there is no SyncML client for calendar data (Funambol provides a client for contacts);
- Windows Phone 7 doesn't support anything else than ActiveSync;
- RIM (BlackBerry) doesn't seem to support CalDAV but there are SyncML clients;
- I'm not sure about other OS (like Bada, …).
In France, iOS represents 60% of the mobile market, and Android has 30%.
The best solution (at least for me), is to start by implementing a CalDAV server with a set of custom rules to handle conflicts, and then to implement a SyncML server to cover the rest of the market.