Previous notes
Parting notes on sharing from Stuart
Repository versioning: items become dirty in the repository when the item's order has changed in the repository. In the WebDAV view of the world that's not part of the item, it's part of the Item Collection. So we don't think it's really dirty.
John made a change so that inclusions, exclusions, results cache are all attributes on an Item Collection. Now the Item Collection becomes dirty...
A shared Item Collection works differently than a local Item Collection. A local Item Collection is stored as a query, but it's shared as a list of inclusions. These are actually rather inconsistent... the person who downloads this collection has an inclusion-based collection. There will be problems when the sharee adds something to the collection which the rule on the sharer's Item Collection doesn't think should be there. Also Item Collections are cumbersome to work with.
One possibility to deal with this is that a shared collection might become static, unless it's read-only.
Clouds make this worse. The person downloading content does a lot of round-trips to find out what's in the cloud and downloading them and following links until completed. A client that has made changes locally needs to do two passes: the 1st pass downloads changes from the server, the 2nd pass looks through for anything that was dirty in the clouds (but wasn't downloaded in the 1st pass) and uploads those items.
To do merging, we'll need to precompute what's changed locally, There's a "mapHistory" method that tells you what changed in the repository and Stuart's code really calls that a lot -- once per item. The right way to do this would be to save a version number (checkpoint) for the repository when a synch pass is done, and then refer to that checkpoint to see what's changed between the checkpoint and the current thing. Then go through that list and pull out everything that's shared.
TODO: Need to make a note somewhere about how a WebDAV server used for sharing really needs to have some functionality for property sharing.
Stuart's thought about storing a cloud as a single resource to reduce synch effort.
Apparently we already have a number of "backends" for the repository. One is database, one is XML files. You can have one or the other. This is overdesign.
--
LisaDusseault - 11 Oct 2004