Balancing Ease and Safety: The Power of Bitemporality in Clojure
The article explores the concept of bitemporality in Clojure and its implications for developers. While bitemporality introduces complexity, it provides a useful mental model to reason about time-oriented problems. The author highlights the common requirements that necessitate bitemporality, such as tracking edit history, managing soft-deletes, and handling time-sensitive decisions. Implementing these requirements individually can clutter the database schema and make retro-fitting difficult. However, the article argues that casting aside bitemporality is a mistake. It introduces XTDB, a bitemporal database that combines the ease and performance of a traditional update-in-place database with the safety net of bitemporality when needed. The article also discusses the atemporal functionality in XTDB for use cases that don't require full bitemporality. Overall, the article emphasizes the importance of balancing ease and safety in database design.