User:Mvl/sharing

From MozillaWiki
Jump to: navigation, search

(This page document some ideas. It is here to discuss the ideas. It's not a final design document, or even close to it)

Overview

This idea is inspired by microsoft's Simple Sharing Extensions. Those extensions allow for easy sharing, and are based on rss.

Calendar isn't absed on rss, and adding an rss based provider would be a lot of work. So we can't just implement SSE. Bet the idea behind it is worth a closer look.

It works like this: Two parties both publish their calendar somewhere the other party can read it. The keep a log of what thay changed. A reads the calendar of B, and applies any changes to it's own calendar. The important part is that both have their own file. No mess with trying to lock the file or anything. Simple and safe.

We could try something similar with an ics calendar. I think this could work pretty well. The only problem is that it doesn't scale very well to more users. When there are three users, you need to read the calendars of both the other users. And when there are more users, every users needs to add all the other calendars to its list. This might be solved by some kind of server, but when you need this many users, you are likely better off with caldav.

Technical Implementation

The changelog could be created using x-properties inside the events. The events will also need a version counter.

It would make sense to base the implementation on the ics provider. The problem with that would be to add the custom properties (to indicate changes) to the events: The ics provider manages the uploading of the file. Any wrappers of observers might not be able to add properties to events before the calendar is uploaded (depending on the order in wich the observer and the uploader are called).

A more advanced solution could be to use the storage calendar as backend (for speed). Then, using an observer, whenever something changes a new ics file can be published, including properties that indicate changes.

Problems

The bige problem with this is ofcourse that no other application does this. It's not really interopable.

The other problem is UI. The user will need to set an url, and add url's for every other client that he want to get updates from.

Other Idea

We can copy the changelog idea, and combine that with webdav. The problem with webdav wat that it was hard to detect changes. Using the changelog, it is easy. And webdav removes the need for multiple calendar files, and a clumsy UI. It still doesn't work well with other clients though.