Here is how I use the world-state approach

David Nolen invented the world-state approach. This library:

shows how I work with this approach. I hope someone finds it useful. We use the library for our SaaS to understand bugs that happen in production.

1 Like

I really enjoy using state maps for my code, and it’s nice to see them growing in popularity in the Clojure world. I wouldn’t say David Nolen invented them though; they have been around for a long time in embedded software, where they help to bring order to the otherwise chaotic domain of real-world physics!

The question of logging exceptions that you provide an answer to with your library is a very interesting one. Using structured data for the entirety of the application’s state is very valuable in debugging, but exception handling has a performance penalty. When one is pushing the limits of devices’ capabilities, eventually one must do as much testing in advance as one can justify, turn off error handling and hope for the best! Luckily, the demands of most web applications are far less than the capacity of available hardware to run them on, in my experience, so such extreme measures aren’t necessitated frequently.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.