[caldeveloper-l] How to avoid time conflict or overlap for CalDAV?

Bron Gondwana brong at fastmailteam.com
Wed Nov 15 20:26:01 PST 2017


Hah, yep!  I was thinking about exactly the same thing for my JMAP-
proxy work :)
Interestingly, JMAP-calendars does solve this, with a single state
string across all calendars for the user:
http://jmap.io/spec-calendars.html

So you can easily have an ifInState on your setCalendarEvents call.

I do still think that the client is the right place to do conflict
checks, since it will have the best idea of what it wants to do.
Actually, another nice thing about setCalendarEvents is that you can
also make multiple changes, like creating a new event and
deleting/changing conflicting one if you want to override, and it will
be atomically applied to the server.
Bron.


On Wed, 15 Nov 2017, at 19:09, Helge Heß wrote:
> Hi Thomas,
> 
> the functionality Kim is asking for a very common one for business
> calendaring systems (not have the same person booked twice etc). So it> would indeed by nice to be able to tell the server to guarantee the
> availability check for the client (so that you wouldn’t be able to
> schedule a meeting if there is an attendee conflict).
> 
> I think in the CalDAV world there are two parts to this:
> 
> a) First the client is supposed to perform a freebusy query to check
>   whether a user is available. And then show a conflict warning or
>   whatever seems appropriate.
> 
> This is how many systems, including btw Exchange work. Siri also does> this kind of conflict detection (“hey, you already have an
> event at the> time, shall I still create the conflicting one, master?”)
> 
> b) But in a reasonable system you actually need to guarantee that
>   the information isn’t outdated at PUT time. I.e. that no second
>   client has scheduled the same attendee/resource.
> 
> I think in CalDAV you can accomplish that by testing the sync-token or> the ctag using an `If` header on the PUT. I.e. let the PUT only
> succeed> if the whole underlying collection didn’t change. And if it did
> (the PUT> will fail with a conflict), redo the freebusy, then try again.
> 
> I don’t think that there is a reliable way to do this in CalDAV cross> collections (calendars), that is, if the availability of a resource
> changed because it got booked in a different calendar, the
> targeted sync> collection won’t usually change its sync tag and the PUT would run
> through.
> The bad thing about CalDAV is that PUTs are not idempotent.
> Otherwise you> could do the PUT, recheck whether it still has no conflicts, and if so> drop it after the fact.
> 
> hh
> 
>> On Nov 15, 2017, at 10:13 AM, Thomas Schäfer
>> <thomas.schaefer at 1und1.de> wrote:>> 
>> Hi,
>> 
>> There are no stupid questions.
>> 
>> The CalDAV Server will not have a conflict, as it is totally ok to
>> have multiple events at the same time.>> 
>> Let me try to explain this with an example:
>> 
>> Your Birthday might be the next week on Thursday, 23rd. So, there
>> might be an all-day event in your calendar.>> In the US, next Thursday is Thanksgiving (bank holiday) as well. This
>> might also end up as an all-day event in your calendar. Both are
>> interesting to you and need to be there. They happen at the same
>> time, but don’t necessarily imply a conflict.>> 
>> That is from calendaring view point true for all events. Only you can
>> determine, if events really conflict with each other and decide what
>> to do. Availability information only help people trying to schedule
>> events with you, that there are conflicting and not conflicting
>> timeslots in your calendar, but this does not mean, that non-
>> conflicting timeslots in your calendar are also good for you. Maybe
>> you do not have all your obligations in one calendar (office vs.
>> family) or others.>> 
>> CalDAV server don’t answer that questions to you and store all
>> events in your calendar and you as a person have to decide what to
>> make out of it.>> 
>> Does this help you?
>> Thomas
>> 
>> From: caldeveloper-l <caldeveloper-l-bounces at lists.calconnect.org> on
>> behalf of Won-Sik Kim <tgi01054 at gmail.com>>> Date: Tuesday, 14. November 2017 at 16:08
>> To: "caldeveloper-l at lists.calconnect.org" <caldeveloper-
>> l at lists.calconnect.org>>> Subject: [caldeveloper-l] How to avoid time conflict or overlap for
>> CalDAV?>> 
>> Hello.
>> 
>> I read RFC 4791 for CalDAV.
>> So I have question for time conflict or overlap between two event
>> in same>> calendar.
>> 
>> Let me explain by instance. I made an event PM1 ~ PM6 in
>> calendar. And>> then I try to made another event PM2~7 in same calendar. It is time
>> conflict or overlap.
>> 
>> How does CalDav server resolve this conflict? Does server make error>> response when second event make?
>> 
>> Thanks for reading.
>> 
>> P.S. I am beginer for CalDAV. So my question may be stupid. Also my
>> primary language is not English. Please understand two points.
>> _________________________________________________
>> caldeveloper-l mailing list
>> caldeveloper-l at lists.calconnect.org
>> http://lists.calconnect.org/listinfo.cgi/caldeveloper-l-calconnect.org> 
> _________________________________________________
> caldeveloper-l mailing list
> caldeveloper-l at lists.calconnect.org
> http://lists.calconnect.org/listinfo.cgi/caldeveloper-l-calconnect.org
--
  Bron Gondwana, CEO, FastMail Pty Ltd
  brong at fastmailteam.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.calconnect.org/pipermail/caldeveloper-l-calconnect.org/attachments/20171116/c3e169f2/attachment.html>


More information about the caldeveloper-l mailing list