-
Notifications
You must be signed in to change notification settings - Fork 0
Dev notes on CalDAV
Table of Contents generated with DocToc
- CalDAV and CardDAV with external clients
- SabreDAV and RedDAV
- Testing
- FAQs
- Usefull stuff for beginners
Warning: This page tries to approach the subject from a beginners point of view. In other words, it was not written or revisited by a main developer of hubzilla.
Content
- CalDAV and CardDAV with external clients
- SabreDAV and RedDAV
- Testing
- FAQs
- Usefull stuff for beginners
##CalDAV and CardDAV with external clients
For CalDAV and CardDAV with external clients we need to map our channels and collections to DAV principals. We need a global DAV tree where also these principals are accessible from the DAV clients. So it could look like:
/dav/ (SabreDAV root tree)
principals/
channels/
collections/
storage/ (this is the entry point for /cloud/, so it would add another URL level)
channel1/
channel2/
calendars/ (CalDAV)
contacts/ (CardDAV)
In my branch there are some drafts of this for principals and ACLs, but not yet finished.
Says Mike: Should probably let Klaus speak for himself, but as far as I'm aware, he was only working on the sabredav upgrade and trying to conceptualise how to fit the dav and permissions namespaces into our environment (and how to work through the authentication changes in sabre3). CalDAV itself is probably a full time effort on its own once we get the infrastructure sorted out. CardDAV isn't even on the drawing board at this stage.
If you want to jump in, probably the best place is to branch and upgrade sabredav and either work through or explain in ways somebody can work through the compatibility issues. As you said, this may be too much for you, but we can't easily move forward without it.
For CalDAV we will probably need an additional field in the event DB for calendar name and integrate this with our events module so you can select which calendar to view. On the sabredav website there's an excellent doco page on lessons learned from previous travellers down this path. I've already put a DB field in place for raw ical data as suggested/recommended in this document, but currently it is not being used. We need to sort out the DAV permissions system - and I don't know if it can be made nomadic.
All these things need doing. Best place to start is to roll up your sleeves and dig in. We've had people willing to test it for a few years. What we're short on is people who aren't afraid to give it a go. If you want to start slowly, I'd suggest that adding calendar names is something that doesn't require a lot of arcane knowledge or skills. The next thing up on the complexity list is making use of the raw data field in the event table and when changes are made to an event, store the updated fields correctly; and when an external file is synced, sync or merge these fields back to our events structure and update this table column. We have code for going back and forth between ical and our event structure already. What we need to do is just update fields of interest so as not to disturb fields which may be specific only to apple or android or microsoft. You could also work on repeating events, which we store and forward but don't yet support.
##SabreDAV and RedDAV
###Current state
Klaus is trying to port SabreDAV 2.1. to SabreDAV 3.0.
SabreDAV should be ported from redmatrix to hubzilla.
Note of Mike
I do know that porting could be hard because some of the most complicated code changes in hubzilla are in the files/photos/dav implementation. The lower layers (Sabre) are mostly the same, but the middleware changed quite a bit.
###Notes on SabreDAV 3.0.
SabreDAV 3.0. has a new stateless authentication backend which is not compatible with how the rest in RedDAV works. But the multiple authentication backend provides some interesting possibilities.
###Notes on RedDAV
Klaus "had some drafts of moving RedDAV out of core into a module. Not sure if that is still an option with the tighter integration of photos and so on."
##Testing
Description on how to test and try things could go here. This could also help to understand the whole stuff.
May be there is a way to automate tests?
##FAQs
###What is the difference between SabreDAV and RedDAV and WebDAV
Hubzilla makes use of WebDAV. How does SabreDAV step in?
The current (bulk) export/import of calendars makes use of SabreDAV. Are the Zot ACLs involved and how?
###What is the stateless authentication backend in SabreDAV
bla bla
##Usefull stuff for beginners
###SchemaSpy
Overview of hubzilla database with Haakons SchemaSpy-Results
###Account-Channel-Relationship
I still haven't figured out how to find out which channels an account owns. e.g. what's the left join path from account table to channel table?
Answer by Michael
account.account_id = channel.channel_account_id