Forum OpenACS Q&A: Response to Status of the Calendar module?

Collapse
Posted by Ben Adida on
Sondre,

I have not changed the data model recently, although I did add
calendar item types a few weeks ago. Mostly this has been a
thorough Tcl and SQL query cleanup. That said, the data model
could use some overhauling. I believe there are still
performance issues. I'm thinking that most of them can be
addressed by using correct indexes, but I will have to get back to
you on that with a full diagnostic in the near future.

In general, the calendar package's data model is a great
example of massive overdesign on one end, and massive
underdesign on the other. To create a calendar event, you have
to have two records that represent timespan, an activity record,
an acs_event record, and a calendar_item record. Then you
need a recurrence record if you want recurrence. So if you're
doing 5-way joins on every select, there are clear optimization
routes. Meanwhile, calendar_item *extends* acs_event instead
of simply mapping an acs_event to a calendar. This means you
can no longer extend the event type to make your calendar more
useful (Don hit this problem in working on the events module for
dotLRN).

So there are issues. I think in the short term, these issues will
be addressed with carefully built queries and judiciously chosen
indexes. In the medium term, a full rewrite of the data model is in
order. As soon as I recover from the pain of redoing the Tcl, I'll
take a look at the data model.