[dev] Publishing calendar from Sunbird

Roel Gloudemans roel at gloudemans.info
Sun Mar 13 04:18:09 PST 2005


We can download the Kronolith calendars from Horde to Sunbird now, but 
publishing is not there yet. I'm willing to to some work on it, but 
need some confirmation that I'm doing the right thing.

The publishing of the calendars has to be implemented very carefully, 
or else you could end up with a completely trashed calendar, because 
when you hit the wrong button in e.g. sunbird you'll end up sending all 
your data and thus dublicating all your appointments

In my opinion it should be implemented in the following way:

vCal/iCal has support for the UID attribute. When you subscribe sunbird 
to a kronolith calendar, the UID is exported to Sunbird and sunbird 
actually stores it. It is also sent back when publishing the calendar 
to Horde. Subscribing/publishing can be handled through the existing 
import/export methods.

First step should be to add an 'overwrite' option to the import 
methods. If a UID from an imported event already exists within the 
database; that event will be overwritten (this should be fairly easy to 
implement; the overwrite option should also be offered as a 
choice/preference for manual imports). This would all depend on the 
handling of the UID attribute by the various clients. Does anyone have 
experience with this?

If you now manually import you Sunbird calendar, existing items will be 
changed appropriately and new items will be added. However, items 
deleted in Sunbird will not dissappear. The deletion of items is a 
tricky thing to handle. I'm not really sure we should even try to solve 
it with such a loosly coupled connection.

When the import driver is fixed we can add another method to the 
kronolith api for usage with the rest rpc driver (and probably adapt 
ics.php). Another method for remotely updating the calendar is dumping 
all data from the current agenda and completely replacing it with the 
import. This will also tke care of item deletion, but I think this 
method is too dangerous. A faulty connection can lead to an empty 
agenda....

So in short
1) Is the UID attribute "stable enough" across clients
2) Is using the existing import/export routines the best way to approach this
3) What should be do with item deletion
4) Can we use this scheme also for Nag?

Cheers,
Roel.



More information about the dev mailing list