We’re about to start building recurring events for Roundabout, but before we do, I’d love to tap into the collective wisdom of the atproto community.
Our existing events are stored as community.lexicon.calendar.event records. Those records don’t capture necessary information about event recurrence, so we’ll need to either extend the lexicon or use sidecar records.
The data that we want to store is relatively complex. RFC 5545 is comprehensive on what recurrence rules we might want to support[1], but without wanting to prejudice the conversation, I’d say it’s unlikely we’ll implement RFC 5545’s data model[2].
Historically, the subset of recurrence options we’d support would have been limited by UI/UX concerns, but now we should be able to support them all and have plain text reliably parsed into a complex recursion rule[3].
Our plan is to implement this “soon” and not wait for community consensus around a lexicon. That said, we’d like to implement something that doesn’t suck and is likely to offer us an easy pathway to adopting a future community lexicon.
So, with the above as context / scope for discussion, I have a few questions, and feel free to raise additional issues:
-
Recurrence is normally implemented as “virtual”: recurring events are synthetic instances of a base event. There are a number of pros and cons to this, compared with doing the concrete “create a new record for each recurrence” approach, particularly over atproto.
How could or should an atproto lexicon handle this aspect of recurring events?
-
Does anyone in this community have strong preferences around the data model for storing recursion rules?
-
Does anyone have any recommendations for actual code that implements event recurrence? This is an area I’ve so far avoided in my career, but know that it’s fraught. I would love to use actual reliable code, recommended by people with scars.
I do have a number of my own thoughts here, but want to open with “actual questions, not comments.”
Please tag folks who you think have wisdom to share on this (@ngerakines.me!)
Base frequency: DAILY, WEEKLY, MONTHLY, YEARLY
- Spacing: INTERVAL=n → every n units (e.g. every 2 weeks)
- Limiters:
- COUNT=n → stop after n occurrences
- UNTIL=DATE → stop at a specific time
- Day selection: BYDAY=MO,TU,WE,TH,FR,SA,SU depending on frequency (weekly, monthly, yearly)
- Month / date selection: BYMONTH=1..12, BYMONTHDAY=1..31 or negative (-1 = last day)
- Ordinal selection (the “nth” logic): BYSETPOS=1,2,…,-1
The above, expressed as example patterns:
- Daily / every N days
- Weekly on specific weekdays
- Monthly on a date (15th, last day)
- Monthly on weekday position (1st Friday, last Monday)
- Yearly on a fixed date
- Yearly on a weekday pattern (e.g. 2nd Sunday of May)
- Every four years on the first Tuesday following a Monday in November (Nov. 7, 2028 for those keeping track).
With exceptions, and multiple rulesets allowed (treated as a union). ↩︎
To prejudice the conversation, imho iCal represents a deeply broken approach to the whole question of calendaring and events on the internet, and I think a clean-room atproto-based approach to events could open up some amazing possibilities, and could hopefully supplant iCal as the de-facto event/calendaring standard on the internet. ↩︎
I’m sharing this to disclose the scope of our implementation, not to have a debate about LLMs. For what it’s worth, I could imagine a sufficiently rich deterministic implementation being possible today, at least for one language. ↩︎