Comment by moomin

4 months ago

It's a pity that Clojure is kind of a hermetic space these days, because the concept of bitemporality really deserves much more attention. It's amazing how often you want to know "What was the P&L for March using the data available on Apr 4?" and how uncommon it is to find a database design that supports that kind of query.

'Hermetic' is an interesting word-choice, considering Clojure has a habit/raison detre of attaching to other host languages/ecosystems i.e. Jank (C++), ClojureScript (JS), Basilisp (Python), Phel (PHP), Babashka (general scripting), and of course, Clojure itself on the JVM.

  • Sure. But the other way around?

    Why is there no JS client for datomic (that is not abandoned)?

    • datomic =/= clojure

      Clojure doesn't have much manpower, being a niche language and all, so maybe that's where your impression comes from. It's hardly on purpose, and there's many examples of software that ships with another language as public API.

      Rama is written in clojure but the main api is java

      Klipse is written in cljs but is marketed as a "javascript library"

      Even Datomic maintains a java api

It's not particularly rare in analytical databases/query engines, nearly all of which support AsOf joins these days, including

  * Clickhouse
  * DuckDB
  * BigQuery
  * Snowflake
  * QuestDB

  • AsOf join in those systems solves a rather narrow problem of performance and SQL expressiveness for data with overlapping user-defined timestamps. The bitemporal model solves much broader issues of versioning and consistent reporting whilst also reducing the need for many user-defined timestamp columns.

    In a bitemporal database, every regular looking join over the current state of the world is secretly an AsOf join (across two dimensions of time), without constantly having to think about it when writing queries or extending the schema.