Subject: RE: Recurrence implementation question

From: "NITSCH,FRANK (HP-Germany,ex1)" <[email-masked]>
Date: Mon, 28 May 2001 14:33:04 +0200

Hi David,

don't ask me where I got this from. Maybe from this mailing list
or it's archive or whereever... ;-)

I read - and it makes sense - that expanding recurrence roules
should take place as soon as a new schedule entry is being made.
I.e. a calendar server would expand recurring events when a user
stores the event. There's an issue to distinguish expanded and not
expanded events now... Could we use a boolean attribute named EXPAND
for this? It exists for the query language and could be useful on
the server side, too. Pre-expanded recurring events could set this
attribute to TRUE while the originally entered events with the
recurrence rule would have this attribute set to FALSE.

Of course it doesn't make much sense to expand it to infinity... ;-)
I would propose the timeframe to be used for "pre-expansion" to be a
configuration item of the serverapplication/component. This way the
calendar administrator would be able to adjust this time frame to the
needs of the actual client applications. If the server received a request
outside of this pre-calculated area it would need to compute it.

This still could take a while if one had hundreds or thousands of
recurring events in the Calendar Store...
Therefore an additional proposal: for each recurring event that is
valid (i.e. the end date of the recurring event is later than the
start date of the requested time frame) create a "helper" event that
starts at the end of the pre-calculated time frame. When the server
would need to calculate expanded events it could safely ignore all
events in the past. It would just take all pre-expanded events and
take care of standard and "helper" recurrence events after the
pre-calculated time frame.

I don't get your 2nd issue. Why wouldn't they be needed?

Just my 2 cent... ;-)   Any feedback?

Best Regards

	Frank
--
====================================================================
Frank Nitsch                           mailto:[email-masked]
--------------------------------------------------------------------
Hewlett-Packard GmbH                 | http://www.hewlett-packard.de
Mailstop ASM-NGP, Building B32/3M17  | HP-Telnet         777-2135
Herrenberger Strasse 110-140         | Phone  (+49) 07031/14-2135
D-71034 Boeblingen                   | Fax    (+49) 07031/14-8253
====================================================================
Geschaeftsfuehrer: Heribert Schmitz (Vorsitzender), Hans-Jochen
Lueckefett, Heiko Meyer, Fritz Schuller, Regine Stachelhaus,
Juergen Banhardt, Vorsitzender des Aufsichtsrates: Joerg Menno Harms
Sitz der Gesellschaft: Boeblingen, Amtsgericht Boeblingen HRB 4081
====================================================================

> -----Original Message-----
> From: David King [mailto:[email-masked]]
> Sent: Friday, 25 May, 2001 20:58
> To: [email-masked]
> Subject: Recurrence implementation question
> 
> 
> I'm trying to think through an implementation of recurrence so I'm
> discussing this at a high level rather than actual code.  
> Repeating events
> are my only concern right now and the datasource doesn't matter.
> 
> Viewing the month of May for a single user of a calendar app. 
>  I need to
> know what events occur during May for this user.  I grab all 
> the user's
> repeating events from the past and the month of May.  For each event,
> generate a recurrence set that includes all the recurrence 
> dates of the
> event from the event's start date to the end of May using the 
> recurrence
> rules.  Return the dates that occur during May from the 
> recurrence set.
> 
> Issue 1:
> After using the calendar for a while, a user might have a 
> large number of
> recurring events in the system.  As a result, it will take 
> longer and longer
> to figure out if a recurring event occurs within a specified 
> time frame.
> 
> Issue 2:
> It's necessary to calculate all the recurrence dates that 
> occur between the
> event's start date and the specified time frame's start date 
> even though
> they are not needed.
> 
> Am I moving in the right direction?  Are the issues I've brought up
> unavoidable when calculating recurrence?  It appears that a 
> beefy machine
> would be needed to run any calendaring app that gets heavily 
> used.  Any tips
> from others on the subject?
> 
> Thanks for _any_ insights you can provide,
> -David King
>

---

From: "David King" <[email-masked]>
Date: Mon, 28 May 2001 10:14:56 -0400

> I don't get your 2nd issue. Why wouldn't they be needed?

An event's first recurrence date happens in January.  I am only viewing May.
Since I won't see the event's recurrence dates that happened in Jan, Feb,
Mar, and Apr, I don't really want to have to calculate them.  However, I
_have_ to calculate them since the only date I have is back in January.

-David