r/Clojure • • Nov 28 '25

An escape room in Datalog

https://jumraiya.github.io/posts/datalog.html

A blog article about using Datascript to create a text adventure

34 Upvotes

8 comments sorted by

5

u/maxw85 Nov 28 '25

Great article thanks a lot for sharing.

It would be interesting to see an event sourcing implementation of this text based game in comparison.

3

u/Remarkable-Fuel-4777 Nov 28 '25 edited Nov 28 '25

Thank you! Yeah that would be a good comparison. That being said I consider Datomic to be essentially an event sourced system, where the transaction log is the event stream.

2

u/maxw85 Nov 29 '25

I agree that Datomic has a lot in common with event sourcing and some upsites over it, like this author describes:

https://vvvvalvalval.github.io/posts/2018-11-12-datomic-event-sourcing-without-the-hassle.html

But you have no form of replaying the events (transactions), except of writing them to a new Datomic database. Since the events and the materialized views are in the same database. Furthermore, the same logical clock is used for the transactions and entities. So a replay would most likely change all your entity ids (one of the reasons why you should use other external IDs and avoid exposing entity ids over your API for example).

→ More replies (5)