<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SyncEvolution - The Missing Link &#187; Add new tag</title>
	<atom:link href="http://www.estamos.de/blog/tag/add-new-tag/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.estamos.de/blog</link>
	<description>About SyncEvolution, writing software and more.</description>
	<lastBuildDate>Thu, 02 Feb 2012 10:12:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1-beta1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Look at Funambol 7.0: The State of the Onion</title>
		<link>http://www.estamos.de/blog/2008/08/12/a-look-at-funambol-70-the-state-of-the-onion/</link>
		<comments>http://www.estamos.de/blog/2008/08/12/a-look-at-funambol-70-the-state-of-the-onion/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:22:57 +0000</pubDate>
		<dc:creator>Patrick Ohly</dc:creator>
				<category><![CDATA[SyncEvolution]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://www.estamos.de/blog/?p=49</guid>
		<description><![CDATA[Funambol has officially released the 7.0 revisions of their server and clients. If we think of the announcement of the 7.0.3 release as the outer marketing layer around the Funambol products, then this post is an attempt to peel away that layer and to take a peek at the implementation layers beneath it&#8230; This is [...]]]></description>
			<content:encoded><![CDATA[<p>Funambol has officially released the 7.0 revisions of their server and clients. If we think of the announcement of the 7.0.3 release as the outer marketing layer around the Funambol products, then this post is an attempt to peel away that layer and to take a peek at the implementation layers beneath it&#8230; This is meant to be useful for users (who need to understand what they can expect to work) and developers (who will find a list of items to work on).</p>
<p>The 7.0.3 release for the first time uses the time zone information provided by clients and therefore promises to solve the &#8220;events shifted by some hours&#8221; problem that users of the Thunderbird and Evolution clients frequently run into. Hauke Pribnow, a Funambol user, also fixed several issues (<a title="Funambol tracker: RRULEs in iCalendars are encoded by Funambol" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=309663&amp;group_id=96&amp;atid=100096">RRULEs in iCalendars</a>, <a title="Funambol tracker: EXDATEs have to be seperated by commas, not by semi-colons" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=309654&amp;group_id=96&amp;atid=100096">EXDATEs have to be separated by commas</a>) in the server&#8217;s iCalendar 2.0 support. Therefore special attention was paid to calendar synchronization.</p>
<p>This report <a title="[Funambol-dev] A Look at Funambol 7.0: The State of the Onion" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=23764">was posted</a> on the Funambol developers mailing list and only published here after the initial comments were favorable. Head over to the list to read up on the discussion of the issues mentioned here, or watch the comments: I&#8217;ll post summaries occasionally.</p>
<h3>Status Summary and Call for Action</h3>
<p>Unfortunately, some issues were already known to affect 7.0.3 calendar support (<a title="Funambol tracker: iCalendar events with a DURATION value are not handled correctly" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=309656&amp;group_id=96&amp;atid=100096">events with a DURATION value are not handled correctly</a>, <a title="Funambol tracker: server sends iCalendar items with TZID and UTC date-time" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310714&amp;group_id=96&amp;atid=100096">server sends iCalendar items with TZID and UTC date-time</a>). The tests explained below revealed further deficiencies (all reported in the Funambol bug tracker and linked to below). Some of these deficiencies (poor support for meeting invitations and complex exceptions from meeting serieses, broken time zone support) also affect other clients, in particular in an international enterprise setup. Overall <em>calendar synchronization still doesn&#8217;t work as well as it has to for Evolution</em>, so better don&#8217;t rely on that combination quite yet. The same applies to tasks, which use the same data format. Contacts and notes work well, although there is room for improvement for contacts.</p>
<p>This recommendation against using calendar sync is admittedly rather harsh, but I prefer not having users syncing their calendars over getting reports of corrupted data or missed meetings. Remember, Funambol&#8217;s server is open source. If you care about calendar synchronization and can do some Java programming, then don&#8217;t expect Funambol to fix these issues all by themselves and start contributing to the project! I don&#8217;t have the time, but perhaps reporting the issues in the bug tracker, describing ways to reproduce the problems and documenting them here will motivate someone to take the necessary next steps.</p>
<p><strong>[Update 2008-08-28]</strong> Funambol has started working on the calendar issues. They are <a title="Funambol Forge: Roadmap" href="https://core.forge.funambol.org/servlets/ProjectProcess?pageID=1633">scheduled</a> for a <a title="[Funambol-dev] Roadmap" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=24381">7.1 update of the server</a> in the first quarter of 2009.</p>
<p><strong>[Update 2008-10-16]</strong> The roadmap was updated and now lists the iCalendar 2.0 changes for release 8.0 in the second half of 2009.</p>
<h3>Funambol Data Model</h3>
<p>Before we get to the details, let&#8217;s give an overview how the Funambol server handles PIM data. All incoming items are converted into a Funambol internal representation of an event, contact, note, or task. When sending to a client, the internal representation is converted back into the format expected by that client. Funambol connectors might decide to do that conversion themselves, but they might also use the Funambol framework. Therefore what is described in this post may or may not apply to them.</p>
<p>The advantage of converting to an internal format is that conversion between different formats only requires one encoder/decoder for each format. The disadvantage is that any property of an item that cannot be represented by the internal Funambol format gets lost during the conversion. Because of that, the server must be as capable as the most feature-rich client that is to be synchronized via the server. Vendor specific extensions of the vCard or iCalendar standards like <code>X-EVOLUTION-MANAGER</code> are not preserved unless the Funambol server knows about them and maps them to some internal field. Other servers store such extensions verbatim and therefore preserve them.</p>
<p>Therefore the main questions are:</p>
<ul>
<li>How capable is the Funambol data model? Extending it can be quite some work and requires special care when installing an update.</li>
<li>How good are the encoders/decoders? Fixing them is easier and might be done in a simple bug fix update.</li>
</ul>
<h3>Setup</h3>
<p>I enabled iCalendar 2.0 in the local installation of Funambol 7.0.3 on Linux like this:</p>
<ul>
<li>run the Funambol Administration Tool</li>
<li>connect to the server</li>
<li>unfold the <code>&lt;localhost&gt;/Modules/foundation/FunambolFoundationConnector/PIM Calendar SyncSource</code></li>
<li>add an &#8220;event2&#8243; sync source for events with type &#8220;iCalendar&#8221;</li>
<li>add a &#8220;task2&#8243; sync source for tasks with type &#8220;iCalendar&#8221;</li>
<li>change the SyncEvolution source property &#8220;URI&#8221; for &#8220;calendar&#8221; resp. &#8220;todo&#8221; accordingly</li>
</ul>
<p>For testing the PIM synchronization, I ran the SyncEvolution 0.8 beta 2 <code>client-test testItems</code> tests. That automates the following steps:</p>
<ul>
<li>import test data into client A</li>
<li>send to server</li>
<li>receive from server into client B</li>
<li>compare the two database dumps with <code>synccompare</code></li>
</ul>
<p>Note that <code>synccompare</code> automatically suppresses some known differences when the server configuration name contains the string <code>funambol</code>. For this analysis the names were chosen so that the comparison doesn&#8217;t suppress any difference. Here&#8217;s how the testing can be reproduced inside SyncEvolution&#8217;s <code>src</code> directory:<br />
<code><br />
</code></p>
<blockquote>
<pre>make client-test
CLIENT_TEST_SERVER=local ./client-test --help
./syncevolution --configure --sync-property username=guest --sync-property password=guest \
                --sync-property syncURL=http://localhost:8080/funambol/ds local_1
./syncevolution --configure --source-property uri=event2 local_1 ical20 file_ical20
./syncevolution --configure --source-property uri=task2 local_1 itodo20 file_itodo20
./syncevolution --configure --sync-property username=guest --sync-property password=guest \
                --sync-property syncURL=http://localhost:8080/funambol/ds local_2
./syncevolution --configure --source-property uri=event2 local_2 ical20 file_ical20
./syncevolution --configure --source-property uri=task2 local_2 itodo20 file_itodo20
CLIENT_TEST_SERVER=local CLIENT_TEST_DELAY=5 CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/test/ \
         ./client-test \
                   Client::Sync::ical20::testItems \
                   Client::Sync::itodo20::testItems \
                   Client::Sync::vcard21::testItems \
                   Client::Sync::text::testItems</pre>
</blockquote>
<p>I used the Evolution test program because I wanted to see how item modifications affected Evolution. If you don&#8217;t have Evolution, then there are two other alternatives that can be used to reproduce most of the testing:</p>
<ol>
<li>SyncEvolution compiles fine without Evolution. The file back end will always be enabled. To test with it, just use <code>Client::Sync::file_ical20::testItems Client::Sync::file_itodo20::testItems Client::Sync::file_vcard21::testItems</code>. The test data for vCard 2.1 will be different from the one used by the Evolution back end, though, because the Evolution back end imports the vCard 3.0 test cases and converts them to vCard 2.1 itself. There are no tests for plain text.</li>
<li>Use the Funambol C++ client library&#8217;s <code>client-test</code>. It is doing the same tests as the file back end in SyncEvolution. Use the latest C++ client library source code, the tests in 7.0.3 <a title="[Funambol-dev] C++ client-test broken" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=23732">don&#8217;t work</a>. Also beware that one has to list the enabled sources via <code>CLIENT_TEST_SOURCES=ical20,itodo20,vcard21</code> explicitly.</li>
</ol>
<p>This testing has one major shortcoming: it doesn&#8217;t check that the server actually maps the items to its internal data model correctly. A dumb server which doesn&#8217;t understand the content of items at all and just bounces the binary blob back to the second client will pass all tests with flying colors. A server which applies the same incorrect mapping both for incoming and outgoing items will also pass.</p>
<p>Therefore this automated testing still has to be combined with additional tests, like checking how the web interface or some other client which uses a different data format display items. I haven&#8217;t done that kind of testing this time around.</p>
<h3>Events/Tasks</h3>
<p>As explained in <a title="[Funambol-dev] timezone support in Capri" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=22341">a discussion</a> on the Funambol developers mailing list, the new time zone support basically works like this:</p>
<ul>
<li>Every time stamp in the server database can be associated with a time zone, identified with a string that references the time zone information built into Java. The time stamp itself is always in UTC.</li>
<li>When receiving an event or task with time zone information, the server maps the time zone to the built-in ones by looking at the content of the time zone definition. This definition always has to be sent together with the item because the standard mandates that. It then converts the time stamps to UTC and stores it together with the internal time zone ID. The original definition sent by the client is dropped. If it wasn&#8217;t possible to map the time zone, then the event is stored with converted UTC time stamps and no time zone ID.</li>
<li>When sending an item, then time stamps are converted back from UTC using the associated time zone ID, if one exists. At least in theory: in practice there is the problem mentioned above that the <a title="Funambol tracker: server sends iCalendar items with TZID and UTC date-time" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310714&amp;group_id=96&amp;atid=100096">conversion back from UTC doesn&#8217;t happen</a>, leading to invalid iCalendar 2.0 times which are in UTC <em>and</em> have a <code>TZID</code>. Evolution (I&#8217;m using 2.12.3, but other versions likely do the same) then treats the times as if they were relative to that time zone (which shifts them in time) and hangs when trying to open such a broken event. That&#8217;s a bug in Evolution, it should tolerate the broken data.</li>
</ul>
<p>Besides that implementation issue, there are also some conceptual problems with the approach:</p>
<ul>
<li>Converting time stamps to UTC without the original time zone drops relevant information. Recurring events are then no longer expanded correctly. It would be better to store the time zone definition received from the original client.</li>
<li>Storing in UTC can shift the event in time even if a time zone ID is stored. Suppose a time stamp is converted to UTC, using the rules of its time zone valid at the time when the event is imported. Later the time zone definition is updated (that happens!). Now the time stamp is converted back from UTC using different rules, which can lead to a result which is different from the original time stamp.</li>
<li>The mapping via the time zone content maps many different time zones to the same ID. For example, &#8220;Europe/Paris&#8221;, &#8220;Europe/Rome&#8221;, &#8220;Europe/Berlin&#8221; all have the same content &#8211; at the moment. The server then uses &#8220;Europe/Berlin&#8221; for all of them. It&#8217;s mostly hypothetical in Western Europe, but in other regions time zone changes might be less coordinated. This can lead to the situation that country A and B are both mapped to country A at some point in time, but then later only country B changes its time zone rules. It&#8217;s events are then not converted back correctly. Funambol agreed to also use the <code>TZID</code> for time zone mapping in those cases where that is possible, but that is not in 7.0.3 yet.</li>
<li>If an old event is sent with a time zone definition that was valid at the time when the event was created, but is no longer up-to-date when the event is imported, the mapping against current internal time zones can lead to incorrect results. This might not matter for one-time events (because the rules are correct at that time) but can be incorrect for recurring events.</li>
</ul>
<p>My blog post about <a title="SyncEvolution blog: Calendar Time Stamps and Time Zones" href="http://www.estamos.de/blog/2008/06/30/calendar-time-stamps-and-time-zones/">storing time stamps</a> explains these issues in more detail.</p>
<p>Here&#8217;s a list of other issues observed during <code>Client::Sync::ical20::testItems</code>:</p>
<ul>
<li>Evolution&#8217;s definition of <a title="Funambol tracker: time zone mapping fails" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310810&amp;group_id=96&amp;atid=100096">&#8220;Europe/Berlin&#8221;</a> (with summer saving time) is mapped to &#8220;Africa/Lagos&#8221; (without summer saving time) which shifts the event.</li>
<li><a title="Funambol tracker: event UID not preserved" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310803&amp;group_id=96&amp;atid=100096">The UID of events are lost</a>. The UID is important for clients. Without it, they cannot properly process meeting updates received via email. Meeting serieses with complex exceptions (different start time/summary/attendees, etc.) depend on the UID and the so called <a title="Funambol tracker: detached recurrence not supported" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310818&amp;group_id=96&amp;atid=100096">RECURRENCE-ID</a> which also gets lost when synchronizing via Funambol.</li>
<li><a title="Funambol tracker: iCalendar 2.0: TRANSP not preserved" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310805&amp;group_id=96&amp;atid=100096">The &#8220;show event as busy&#8221; flag is not preserved</a>. This affects scheduling of meetings when colleagues have access to the free/busy information.</li>
<li><a title="Funambol tracker: iCalendar 2.0: meeting attendees/organizer" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310809&amp;group_id=96&amp;atid=100096">In meetings</a> the list of attendees is lost. The organizer is stored, but only the mail address, not the name.</li>
<li><a title="Funambol tracker: iCalendar 2.0: escaping comma" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310804&amp;group_id=96&amp;atid=100096">In iCalendar 2.0 items sent by the server, commas in text properties are not escaped properly.</a> As a result of that, Evolution splits descriptions or summaries at these incorrectly escaped commas and only displays one of the parts.</li>
<li><a title="Funambol tracker: iCalendar 2.0 all-day events" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310806&amp;group_id=96&amp;atid=100096">All-day events</a> are sent by the server as events starting at midnight and lasting until the last minute before the next day. A special <code>X-FUNAMBOL-ALLDAY</code> tells Funambol clients that this really is an all-day event. The normal iCalendar 2.0 representation of all-days events should be used instead. Evolution doesn&#8217;t know the flag and displays the event as covering the whole day in the day view. Real all-day events are shown at the top of the day view.</li>
<li>Special characters are escaped using quoted-printable, <a title="Funambol tracker: iCalendar 2.0: quoted-printable not a valid encoding" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310807&amp;group_id=96&amp;atid=100096">which is not a valid encoding for iCalendar 2.0</a>. Evolution then displays the escape codes instead of the real text.</li>
<li>In the same example the server also sends <a title="Funambol tracker: iCalendar 2.0: CHARSET=UTF-8 redundant and invalid" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310817&amp;group_id=96&amp;atid=100096">a redundant UTF-8 character set parameter</a>, which Evolution&#8217;s libical complains about by adding a <code>X-LIC-ERROR</code> property to the item.</li>
<li><a title="Funambol tracker: iCalendar 2.0 VALARM lost" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310808&amp;group_id=96&amp;atid=100096">The alarm specification in iCalendar 2.0 items gets lost</a>. All events imported into Evolution then have no alarm set at all.</li>
</ul>
<p>Issues found elsewhere which are not (yet) triggered by the <code>testItems</code> test data:</p>
<ul>
<li><a title="Funambol tracker: iCalendar events with a DURATION value are not handled correctly" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=309656&amp;group_id=96&amp;atid=100096">events with a DURATION value are not handled correctly</a></li>
<li><strong>[Update 2008-08-28]</strong> <a title="Funambol tracker: The server doesn't support week days recurring events" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310951&amp;group_id=96&amp;atid=100096">the server doesn&#8217;t support week days recurring events</a></li>
<li><strong>[Update 2008-10-16]</strong> <a title="Funambol tracker: VCalendarContent-to-CalendarContent conversions throws NumberFormatException if 'X-MICROSOFT-CDO-BUSYSTATUS' field is not numeric" href="http://forge.objectweb.org/tracker/index.php?func=detail&#038;aid=311383&#038;group_id=96&#038;atid=100096">parser error for some events generated by Outlook 2007</a></li>
</ul>
<p>The results for tasks are similar because they also use the iCalendar 2.0 format and similar properties.</p>
<p class="important">Note that iCalendar 2.0 is <a title="[Funambol-dev] A Look at Funambol 7.0: The State of the Onion" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=24360"><strong>not</strong> supported for myFUNAMBOL</a>. When trying to exchange iCalendar 2.0 with myFUNAMBOL, the server will send events as vCalendar 1.0. Evolution partly imports that, but there are character encoding issues which can later on cause errors on the server and then break synchronization completely &#8211; better don&#8217;t try it!</p>
<h3>Contacts</h3>
<p>The standard formats for contacts, vCard 2.1 and its later revision 3.0, are quite old and cannot represent contact properties added later on, like instant messaging information, anniversaries and related persons (spouse, manager, etc.). Funambol uses their own extension for  such properties (e.g., <code>X-FUNAMBOL-SPOUSE</code>) which only works when both client and server are from Funambol. Evolution follows the example set by other software in some cases (<code>X-AIM/ICQ/..., X-MOZILLA-HTML</code>), but also <a title="Wikipedia: vCard Extensions" href="http://en.wikipedia.org/wiki/VCard#VCard_Extensions">adds its own extensions</a> (<code>X-EVOLUTION-SPOUSE</code>). Therefore most of these extended properties cannot be synchronized between Funambol server and Evolution.</p>
<p>This was <a title="[Funambol-dev] non-standard vCard properties, part I" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=1521">discussed with Funambol</a>, leading to <a title="[Funambol-dev] non-standard vCard properties, part II" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=402&amp;dsMessageId=21225">the agreement</a> to change both <a title="Funambol tracker: vcard properties improvements" href="http://forge.objectweb.org/tracker/index.php?func=detail&amp;aid=310316&amp;group_id=96&amp;atid=100096">server</a> and <a title="SyncEvolution tracker: vcard properties improvements" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2045560&amp;group_id=146288&amp;atid=764733">SyncEvolution</a> so that they use the vendor-neutral extensions where it makes sense &#8211; none of these changes are in the current releases, though.</p>
<p>The properties not synchronized during <code>Client::Sync::vcard21::testItems</code> have been known for a while, so this loss of information is normally ignored by <code>synccompare</code> when testing the Funambol server. Here&#8217;s the list of properties not synchronized, for the sake of completeness:</p>
<ul>
<li>second address line</li>
<li><code>X-EVOLUTION-FILEAS</code> (can be specified explicitly by Evolution users in addition to full name, nick name and the name components)</li>
<li>the office (represented as third level in the <code>ORG</code> property)</li>
<li>calendar URI, ordering of emails in the Evolution GUI, instant messaging fields, anniversary, assistant, manager, spouse, blog URL, video URL: all of them rely on <a title="Wikipedia: vCard Extensions" href="http://en.wikipedia.org/wiki/VCard#VCard_Extensions">vCard extensions</a></li>
<li>very long notes are truncated</li>
</ul>
<p><strong>[Update 2008-11-01]</strong> only one email and phone number of each kind is stored (i.e., only one work email).</p>
<h3>Notes</h3>
<p>Using the &#8220;plain/text&#8221; <code>note</code> URI everything worked fine, both with the local installation as well as with the myFUNAMBOL. According to <a title="[Funambol-dev] Problems syncing notes between Outlook and SE K880i" href="https://core.forge.funambol.org/ds/viewMessage.do?dsForumId=405&amp;dsMessageId=23467">a comment</a> on the Funambol users mailing list, the &#8220;plain/text&#8221; sync source only sends the body of a note. This might indicate that the title of a note sent by a client which uses Funambol&#8217;s XML format is not sent to clients using &#8220;plain/text&#8221;. I haven&#8217;t tested this, though.</p>
<p>The usual convention is that the first line of a text is used as a title or summary. One possible solution would be the following rules, which are also applied by SyncEvolution when converting between Evolution&#8217;s summary plus body and plain text: when sending plain text, the summary is inserted before the body if it is different from the first line. When receiving a plain text, the first line is used as summary <em>without</em> removing it from the body. That&#8217;s because it might be an integral part of the text.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.estamos.de/blog/2008/08/12/a-look-at-funambol-70-the-state-of-the-onion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

