Subject: CAP Searching Proposal

From: "Frank Dawson" <[email-masked]>
Date: Mon, 8 Feb 1999 16:36:49 -0500

Folks:

Doug Royer and I have been working since the last IETF meeting on a proposal
for a "search" mechanism for CAP. Our approach was to build on the existing
market acceptance of SQL functionality and map this to the existing
iCalendar syntax. It was actually pretty simple. We think it is much less
work than adopting an altogether new search methodology. Let the list know
what you think.

Hopefully, this will get some discussion at the interim CAP meeting this
week. (HINT TO DAVID MADEO: Can you make some copies of this note for
tomorrow's meeting :-} )

- - Frank Dawson

Network Working Group          Frank Dawson, Lotus
Internet-Draft          Doug Royer, Sun
<cap search proposal-00.txt>
Expires six months after:       December 9, 1998

                           CAP Search Proposal

Status of this Memo

   This document is an Internet-Draft.  Internet-Drafts are working
   documents of the Internet Engineering Task Force (IETF), its areas,
   andits working groups. Note that other groups may also distribute
   working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six
   months.  Internet-Drafts may be updated, replaced, or made obsolete
   by other documents at any time.  It is not appropriate to use
   Internet-Drafts as reference material or to cite them other than as a
   "working draft" or "work in progress".

   To view the entire list of current Internet-Drafts, please check the
   "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
   Directories on ftp.is.co.za (Africa), ftp.nordu.net (Northern
   Europe), ftp.nis.garr.it (Southern Europe), munnari.oz.au (Pacific
   Rim), ftp.ietf.org (US East Coast), or ftp.isi.edu (US West Coast).

   Distribution of this document is unlimited.

   Copyright (C) The Internet Society 1998. All Rights Reserved.

Abstract

   This memo specifies a proposal for a simple searching and filtering
   mechanism for the Internet Calendaring and Scheduling Access Protocol
   (CAP). The proposal maps the SQL statement components into the
   iCalendar format.

   The search command is specified with the QUERY method. The request
   method makes use of a new component, called VQUERY, that contains the
   search filter. The component consists of a set of new properties:
   SCOPE, MAXRESULTS, MAXRESULTSSIZE, QUERY and QUERYNAME, that define
   the search filter.

   The results of the search are returned in a RESULTS method containing
   an iCalendar object consisting of those calendar properties, calendar
   components and component properties selected in the search filter.

1.      Introduction

   One of the main subcomponents in an access protocol, such as the
   Calendar Access Protocol (CAP), is the method for searching and
   filtering entities within a remote store. This memo specifies a
   proposal for a mechanism for searching remote CAP-based calendar
   stores.

   This proposal does not intend to create a new Internet search and
   filtering protocol. Instead, this proposal is based on a very
   pragmatic view of the current searching and filtering technology
   available to implementors today. Many potential CAP implementors are
   already familiar with the searching and filtering methods available
   within the Standardize Query Language (SQL) defined by[SQL]. This
   standard is very ubiquitous within the current Information Technology
   arena. Many more recent attempts to define searching protocols
   leverage the functionality available in SQL. This memo is merely an
   attempt to map the searching, filtering and sorting statements of SQL
   onto the standard iCalendar format defined by [RFC 2445].

   In mapping SQL onto the iCalendar format, several extended iCalendar
   methods and components are defined by this memo. The search function
   is specified with the new iCalendar QUERY method. The QUERY method
   makes use of a new component, called VQUERY, that contains the search
   filter. The component consists of a set of new properties: SCOPE,
   MAXRESULTS, MAXRESULTSSIZE, QUERY and QUERYNAME, that define the
   search filter.

   The results of the search are returned in a new RESULTS method
   consisting of those calendar properties, calendar components and
   component properties matching those selected in the search filter.

   This proposal involves defining only one new method, five new search
   related properties and a new search value type. This proposal offers
   the most minimal effort necessary to provide a search, filter and
   sorting mechanism for CAP. An important advantage of this proposal is
   that it is based on a technology that is pervasive across different
   computer platforms and environments. The search functionality in
   [SQL] is well-defined and understood.

1.1     Approach

   Map SQL statements and semantics onto the iCalendar syntax. Create a
   new VQUERY component that is a container for the search filter
   properties. Search filter properties include a new QUERY property.
   The QUERY property value MUST be a valid QUERY value type. This new
   value type is defined to be a "name=value" value type grammar,
   similar in syntax to the format already in use for the iCalendar
   RECUR value type. Each "name" is the name of a valid SQL statement
   component (e.g., SELECT, WHERE, etc.). Each "value" is valid string
   associated with one of these SQL statement components.

1.2     Search operation summary

   An iCalendar search can be performed after an authenticated CAP
   connection has been established with a CAP calendar server and one or
   more calendars have been selected. The search operation is initiated
   by pushing an iCalendar object with the QUERY method and VQUERY
   calendar component to the selected calendar(s). The search results
   are returned in standard calendar component (i.e., the existing
   VEVENT, VTODO, etc. calendar components are used to contain the
   search results). The method in the iCalendar object containing the
   search results is RESULTS to distinguish it from the existing REPLY
   method.

1.3     Grammar For Search Mechanism

   SEARCH  = "BEGIN:VQUERY" CRLF
                          [scope] [maxresults] [maxsize] querycomp
                  "END:VQUERY" CRLF

   scope   = "SCOPE:" comp-name ("," comp-name)*

   comp-name       = "VEVENT" / "VTODO" / "VJOURNAL" / "VTIMEZONE"
                   / "VALARM" / "VFREEBUSY" / iana-name / x-name

   maxresults      = integer

   maxsize = integer

   querycomp       = (query) / (queryname query) / queryname

   queryname       = "QUERYNAME:" text

   query   = "QUERY:" queryrule

   queryrule       = select where orderby ...

   select  = <any valid SQL string that goes into a SELECT clause>

   where   = <any valid SQL string that goes into a WHERE clause>

   orderby = <any valid SQL string that goes into a ORDERBY
                  clause>

2.      Examples

   Here are is an example of a search request:

   BEGIN:VCALENDAR
   VERSION:2.0
   METHOD:QUERY
   BEGIN:VQUERY
   SCOPE:VEVENT,VTODO
   MAXRESULTS:10
   QUERY:SELECT=UID,SUMMARY,CATEGORIES;WHERE="(DTSTART EQ TODAY) AND
    (((ATTENDEE EQ fdawson) AND ((PARTSTAT EQ REQ-PARTICIPANT) OR
    (PARTSTAT EQ OPT-PARTICIPANT)) OR (DELEGATED-TO EQ fdawson))";
    ORDERBY=CATEGORIES ASCENDING,SUMMARY ASCENDING,UID
   END:VQUERY
   END:VCALENDAR

   Here are is an example of the results of the search request:

   BEGIN:VCALENDAR
   VERSION:2.0
   METHOD:RESULTS
   BEGIN:VEVENT
   CATEGORIES:APPOINTMENT
   SUMMARY:Customer Briefing on XYZ Project
   UID:[email-masked]
   END:VEVENT
   BEGIN:VEVENT
   CATEGORIES:APPOINTMENT
   SUMMARY:Deparatment Meeting
   UID:[email-masked]
   END:VEVENT
   BEGIN:VTODO
   CATEGORIES:XYZ Project
   SUMMARY:Draft PRD for XYZ deliverable "ZEBRA"
   UID:[email-masked]
   END:VTODO
   END:VCALENDAR

   Here are is an example of a search request for the alarm component
   for event components that have an alarm that will trigger from 8:30
   AM to 12:00 PM today, assuming EST being UTC-offset of -05:00

   BEGIN:VCALENDAR
   VERSION:2.0
   METHOD:QUERY
   BEGIN:VQUERY
   SCOPE:VEVENT
   QUERYNAME:"Morning Work Alarms"
   QUERY:SELECT=UID,SUMMARY,VALARM;WHERE="((TRIGGER EQ TODAY) AND
    (TRIGGER GE "T133000") AND (TRIGGER LE "T170000"));
    ORDERBY=UID,SUMMARY,VALARM ASCENDING
   END:VQUERY
   END:VCALENDAR

   Here are is an example of the results of the search request.

   NOTE: The first and second VEVENT that was found by the query had
   alarms that repeated for a total of three triggers. The CS returns
   trigger values in UTC time. Also CS returns the three-time repeating
   alarm as three separately triggered, single occurrence alarm
   components:

   BEGIN:VCALENDAR
   VERSION:2.0
   METHOD:RESULTS
   BEGIN:VEVENT
   UID:[email-masked]
   SUMMARY:Customer Briefing on XYZ Project
   BEGIN:VALARM
   TRIGGER:19981209T133000Z
   ACTION:DISPLAY
   DESCRIPTION:Customer Briefing on XYZ Project
   END:VALARM
   BEGIN:VALARM
   TRIGGER:19981209T133500Z
   ACTION:DISPLAY
   DESCRIPTION:Customer Briefing on XYZ Project
   END:VALARM
   BEGIN:VALARM
   TRIGGER:19981209T134000Z
   ACTION:DISPLAY
   DESCRIPTION:Customer Briefing on XYZ Project
   END:VALARM
   END:VEVENT
   BEGIN:VEVENT
   SUMMARY:Department Meeting
   UID:[email-masked]
   BEGIN:VALARM
   TRIGGER:19981209T125500Z
   ACTION:DISPLAY
   DESCRIPTION:Department Meeting
   END:VALARM
   END:VEVENT
   BEGIN:VEVENT
   SUMMARY:Lunch Appointment
   UID:[email-masked]
   BEGIN:VALARM
   TRIGGER:19981209T165000Z
   ACTION:DISPLAY
   DESCRIPTION:Lunch Appointment
   END:VALARM
   BEGIN:VALARM
   TRIGGER:19981209T165500Z
   ACTION:DISPLAY
   DESCRIPTION:Lunch Appointment
   END:VALARM
   BEGIN:VALARM
   TRIGGER:19981209T170000Z
   ACTION:DISPLAY
   DESCRIPTION:Lunch Appointment
   END:VALARM
   END:VEVENT
   END:VCALENDAR

3.      Acknowledgments

   The following have participated in the drafting and discussion of
   this memo:

   Andre Courtemanche, Steve Mansour

4.      Security Considerations

   Security issues are not discussed in detail in this memo.

   In general, a CAP-based calendar user agent (CUA) MAY issue any valid
   search request, as defined by this memo. However, the results of a
   particular search request is dependent on the correlation of the
   search request with the existing data in the selected calendar and
   the calendar access rights granted or denied to the authenticated
   calendar user by the calendar owner.

   The security mechanism for CAP is not address by this memo.

5.      Bibliography

   [SQL] TBD reference to the current SQL standard

   [RFC 2445] F. Dawson and D. Stenerson, "Internet Calendaring and
   Scheduling Core Object Specification (iCalendar)", RFC 2445,
   ftp://ftp.isi.edu/in-notes/rfc2445.txt, November 1998.

6.      Author's Address

   The following address information is provided in a vCard v3.0,
   Electronic Business Card, format.

   BEGIN:VCARD
   VERSION:3.0
   FN:Frank Dawson
   N:Dawson;Frank
   ORG:Lotus Development Corporation
   ADR;TYPE=WORK,POSTAL,PARCEL:;;6544 Battleford Drive;Raleigh
    ;NC;27613-3502;USA
   TEL;TYPE=PREF,WORK,MSG:+1-617-693-8728
   TEL;TYPE=WORK;MSG:+1-919-676-9515
   EMAIL;TYPE=PREF;INTERNET:[email-masked]
   EMAIL;TYPE=INTERNET:[email-masked]
   URL:http://www.lotus.com
   END:VCARD

   BEGIN:VCARD
   VERSION:3.0
   FN:Doug Royer
   N:Royer;Doug
   ORG:Sun Microsystems
   ADR;TYPE=WORK,POSTAL,PARCEL:MS MPK17-105;;901 San Antonio Road;
    Palo Alto;CA;94303-4900
   TEL;TYPE=WORK,VOICE:650-786-7599
   TEL;TYPE=FAX:650-786-7994
   EMAIL;TYPE=INTERNET:[email-masked]
   END:VCARD

7.      Full Copyright Statement

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implmentation may be prepared, copied, published and
   distributed, in whole or in part, without restriction of any kind,
   provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process MUST be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

---

From: John Stracke <[email-masked]>
Date: Fri, 26 Feb 1999 03:07:29 +0000

Frank Dawson wrote:

> iCalendar syntax.

It just occurred to me that an alternative would be to define a mapping of the
calendar information into the namespace of a Web server, and then search it
with DASL (an HTTP-based protocol being developed for searching the contents of
a server).  The mapping would have the nice side effect that any calendar entry
would be available to downlevel browsers via GET, which makes for a convenient
migration path for implementors--just write a plugin/helper app that
understands iCal, and you can get events into your calendar.  It's not
particularly full-featured, but it's a useful start.

--
/=============================================================\
|John Stracke    | My opinions are my own | S/MIME & HTML OK  |
[email-masked]|============================================|
|Chief Scientist | NT's lack of reliability is only surpassed |
|eCal, Inc.      |  by its lack of scalability. -- John Kirch |
\=============================================================/