Caldav on a Mobile Device
Total Page:16
File Type:pdf, Size:1020Kb
Master Thesis CalDAV on a Mobile Device Martin Hellaeus April 4, 2007 Department of Computer Science Lund Institute of Technology Supervisor: Lennart Ohlsson Abstract There are today many solutions for exchanging calendar information. How- ever, there is no open standard for this yet. This has resulted in many different solutions that are not able to fully communicate and exchange cal- endar data. A proposal to solve this is CalDAV that is intended to be a standard protocol for transport of calendar data over HTTP. This thesis presents the calendaring situation of today and, if and what CalDAV can improve. Another topic that is dealt with is if CalDAV is suited also for mobile devices. During the work an application has been developed. It is a calendar client that uses the CalDAV protocol to connect to servers and fetch calendar data from it. The application is intended for use in a mobile device. Contents 1 Introduction 3 1.1 Previous work . 4 1.2 Objectives . 5 1.3 Approach . 7 1.4 Note . 8 2 Calendaring solutions 9 2.1 Mobile solutions . 11 3 CalDAV 12 3.1 WebDAV . 15 3.2 iCalendar . 17 3.3 The CalDAV Protocol . 17 3.3.1 Authentication . 21 3.3.2 Scheduling Extensions to CalDAV . 22 4 Interoperability 24 4.1 Clients . 25 4.2 Servers . 27 5 Design of a Demo client 30 5.1 Environment . 30 5.2 Requirements . 31 5.3 Design . 31 5.4 Result . 33 6 Summary 36 A Requirements 41 1 B Protocol examples 43 B.1 CalDAV request example . 43 B.2 CalDAV response example . 44 B.3 iCalendar example . 45 2 Chapter 1 Introduction Many activities on Internet today involve use of a standard e.g., e-mail has standards for sending and receiving e-mails (SMTP and POP3 / IMAP). You never have to consider the recipients platform when you send an e- mail. Another example is web pages; you are at least most often able to view any page regardless of what software you use. The pages are coded in a standard way (HTML). This means that it doesn’t matter if you are using a PC or a Mac, Linux or Mac OS X, there are web browsers for most platforms, they all can use HTTP, and thus it is possible to retrieve files from a certain web server even if you change computer. It might seem obvious today that all computer users may access your web page from anywhere. This works because there are standards for these activities and they are used. However, in the field of online calendaring and calendar sharing this is not the case. Instead of standard protocols, there exist several proprietary protocols. A proprietary protocol is owned by a company and if others want to use it they must pay a fee to the company owning the protocol. This makes it hard for new companies to enter the market of calendaring applications since, even if a user wants to change and use a new application, all of his / hers contacts need to change too. Therefore, the work with a new protocol called CalDAV is interesting and important. The CalDAV protocol defines the communication between a calendar server and a calendar client. It attempts to solve the problems with the proprietary protocols using an open protocol. If many software companies adopt the standard many of the problems will be solved. The field of online calendaring and calendar sharing has recently gained more and more attention. Among other things, the work with the CalDAV protocol has contributed to this interest. Calendaring on mobile devices uses often some sort of synchronization to make the calendar up to date. This will transfer the calendar events from 3 your desktop computer to e.g. you mobile phone making it possible to bring your calendar everywhere. A widely used protocol for data synchronization to mobile devices is the SyncML protocol. However, with synchronization, changes that are made between the synchronizations will not be showed until the device is synchronized again. Thus, new events may overlap when synchronization is done. With faster network and CPUs in mobile devices, it might be possible to download data directly from Internet and then always get the most up to date version of a calendar. If you have your calendar online, it suddenly becomes possible to make others see your calendar. A term for this is ”calendar sharing” and it is important within companies today. However, it is becoming more common among other users too. Calendar sharing is a great tool e.g. to efficiently make meeting invitations. Without calendar sharing, a meeting invitation can take long time and mean much work. As it will involve mailing all participants with a suggested time and then wait for answers. Then probably some participants will prefer a different time and that will result in another round of e-mails. With calendar sharing, the meeting coordinator could easy see all participants’ calendars. This will make him able to find out when they all are available and then send an invitation with a time that will suite all of the participants. The calendar program could even find the first time when all participants are available automatically making it very easy for the organizer of a meeting. As long as all the participants of the meeting is from a single company sharing the same calendar system this works well today. There are several products on the market today for these situations. But, a problem occurs when the participants of a meeting come from different companies, because they probably do not share calendar system and the systems will probably not be able to communicate. Thus, the meeting must be booked using the old method with e-mail or via phone. However, calendar sharing can also be just sharing e.g. a family sharing the same calendar. In that case, all family members will have full access to the calendar and must be able to edit it. This adds more demands on a calendar sharing protocol but it is an important feature and needs to be considered during development of a calendar sharing protocol. 1.1 Previous work One might wonder why a protocol for calendar interoperability has not been defined earlier. IETF, the Internet Engineers Task Force, started a work- ing group already 1996 to form a protocol for online calendar access and scheduling. They found it surprisingly hard to make an efficient protocol 4 that had all desired functions without being to complex. The working group divided its work into three main tasks. These were to create a format to save meeting information, a protocol for sending calendar information via e-mail and a protocol for calendar access and scheduling. The first two tasks were relatively successful since their work has resulted in protocols that are used in implementations, iCalendar and iMip. iCalendar is based on the earlier work of the vCalendar specification and describes how an event should be represented for interoperability [3]. iMip specifies how to send iCalendar events in an e-mail [4]. The last task resulted in Calendar Access Protocol, CAP, which is a protocol that applications can use to access remote calendar servers. But it never got finished and in 2004 after four years of work the working group stopped further work with CAP. Lacking a standard, implementers had to find a way around the calendar- sharing problem. One interesting solution was Apple’s iCal, released in 2002, where the client uploaded iCalendar formatted events to a WebDAV server. WebDAV has features for editing recources on the web, see section 3.1. With this technique, it was then possible to share the calendar to all clients that could read the iCalendar format. Even if this was a great step forward, WebDAV was not designed with calendaring in mind and thus it lacks some important features like searching for events in a specific time range. This approach, using existing standards, proved to be quite successful and showed that this might be a way to solve the problem with calendar sharing. [2] 1.2 Objectives In this master thesis, I will investigate the potential of the protocol CalDAV. Focus will be on the CalDAV protocol in a mobile environment. • Does the CalDAV protocol have the features and support to become a commonly used protocol? To gain adoption it is important that all desired features are included without making the protocol too compli- cated. Necessary features might be time range search and scheduling. A part of the work will be to find which other features are demanded from calendar users. Will CalDAV have all features for common use cases? It might be hard to judge whether all major features are present in the standard but with deeper knowledge of CalDAV and the cal- endaring situation, one can at least make a qualified guess and point out areas where CalDAV can improve today’s calendaring situation or where it lacks features. Even if the protocol features are great, the protocol needs to be implemented in calendar applications that 5 is commonly used and maintained. The extent of implementation by software vendors depends on the amount of work needed to imple- ment it i.e. complexity, and on what is gained from implementation i.e. features and improved user experience. The situation of CalDAV adoption in applications today might be quite easy to grasp but more interesting is what is being developed and if the interest of adopting the standard is growing. And of course this might be a bit trickier to answer. • Is it possible to use the CalDAV protocol on a mobile platform to con- nect to CalDAV servers and view online calendars? To really become a universal and widely used calendaring protocol it must work also on mobile devices.