Michael Winser suggested that I should think about taking the same approach that citydesk uses. They do two things differently than Radio:
- They use a CRC instead of a byte for byte comparison. Apparently they use this instead of filetimes altogether. I could compute the CRC (or do the comparison with the file on disk too, I guess) by wrapping the stream that the transform is writing to and doing the CRC/comparison on the fly
- They also post a list of files and CRCs as an xml file on the server. This makes it easier to synchronize files across machines
I definitely want to enable the cross machine case, and file times do seem a little fragile to me. This is something I'll have to think about a little more.
Two way synchronization is really hard though? What happens if the same file changes on both the client and the server? How do you handle deleting a file? (Do you care about deleting a file?)
Another problem comes up when you have multi-party authoring and syncing and that is with respect to item numbers. Right now I have an item number count that I store in a config file and update every time I create a new entry (it is currently at 49). ChrisAn solves this problem with a good old fashion GUID (I have a bunch cheap if you need them ;) I might be able to switch over without killing my RSS feed and perma links if I just treat the item ID as a string.