Raw capture โ€” raw/event-sourcing-set-remove-bi-temporal-events.md


url: https://www.planetgeek.ch/2026/07/07/event-sourcing-set-and-remove-based-bi-temporal-events/ title: "Event Sourcing: set-and-remove-based bi-temporal events" author: Urs Enzler date_published: 2026-07-07 date_fetched: 2026-07-18 site: planetgeek.ch series: Event Sourcing (part 12) categories: [".NET", "Event Sourcing", "F#"]


Event Sourcing: set-and-remove-based bi-temporal events

Urs Enzler, July 7, 2026

This is part twelve of Enzler's series on event sourcing. It contrasts two kinds of bi-temporal event streams.

Lifetime (create-update-delete) events

Earlier posts covered the "lifetime" kind, where "a thing is created, updated, and maybe deleted." These use two time axes โ€” effective time (when something takes effect) and application time (when data entered the system). Projection sorts by effective timestamps, with application timestamps used only to resolve ties.

Set-and-remove-based events

A different timeline type where events don't represent a thing's lifetime but rather "a timeline that specifies which data is relevant at any given time." Examples given:

The Override vs. Insert Problem

When an event added later (with a newer application timestamp) has an earlier effective timestamp than an existing event, a choice must be made when projecting:

Enzler notes "both scenarios can be valid," so the system must allow choosing between them.

Deep Dive: Organizational Calendars

The post walks through an example: a unit's calendar can be "added to an organisational unit per an effective date, and it can also be removed per an effective date." A set event is defined as Sets (effective, value) and a remove event as Removes effective. The projection is configured with ProjectionActionConfiguration = SetRemove and OverrideBehavior.Override.

Technical Details

Key Quotes