Calendars and recurring events

Jacob Smullyan smulloni at bracknell.smullyan.org
Mon Jan 28 23:24:25 CET 2002


On Mon, 28 Jan 2002 14:39:55 +0000, Dave Swegen 
   <dswegen at software.plasmon.com> wrote:
>The one thing I think I forgot to mention is that this is going to be
>for a web app. Makes a bit of difference to the requirements, as there
>might be multiple people editing and viewing calendars.
>
>Eventually I hope to make it a proper multiuser calendar, with events
>bound to permissions (owner, groups and world).
>
>It looks like a combination of pre-calculation (adding events to the
>current/next month at creation time, as these are probably the most
>commonly viewed items) and an iterator which returns next event + places
>them into a cache is probably the way to go.
>
>Btw, would it be best to store all this data (the event list + the cache
>list) in db (using anydb, I guess), or by using pickle?

Given the concurrency issues and the complexity which may arise from
dealing with permissions, my inclination would be to use a good ole
relational database.  So uncool, it's cool.

As for how to deal with repeated events, perhaps it would help if the
repetition of an event was marked with forward and backward boundaries
(for infinite repetition, use your favorite placeholder for infinity).
That way you don't need to check events that can't possibly recur
during whatever period you are interested in.  Since most recurring
events will recur at least once a month, and you'll usually be dealing
with a month at a time, this should be reasonably efficient,
especially if the wheat is separated from the chaff in the database,
and not in Python.

j


-- 
Jacob Smullyan | smulloni at smullyan.org
http://www.smullyan.org/smulloni/



More information about the Python-list mailing list