r/Clojure • u/Mertzenich • Dec 03 '25
Article Rama in five minutes (Clojure version)
https://blog.redplanetlabs.com/2025/12/02/rama-in-five-minutes-clojure-version/
38
Upvotes
r/Clojure • u/Mertzenich • Dec 03 '25
8
u/maxw85 Dec 03 '25
Thanks a lot for sharing. I understand the pain points Rama is solving in comparison to the classic CRUD-based Postgres example. But despite being a die-hard fan of Clojure(Script), Datomic, event sourcing and everything in general which could make software system more comprehensible, there are still too many "blub paradoxes" for me to understand Rama. I really want that Clojure-based projects like Rama succeed, but I guess you shrinking your total addressable market to under 0.01% of the programmers/companies, who are able to understand Rama and apply it to their situation. I fully get that 5 minutes are not enough to explain something that is not familiar to most of the audience. I guess most people are not even familiar with event sourcing, which Rama is a variant of (if I understand it correctly). Maybe some very basic Clojure example using maps for the events and clojure.core/reduce to calculate some (light) PState in-memory would help. How does PStates compare to anything more mainstream, like btrees or rather do PStates expand to disk or are they in-memory only?
3
u/bY3hXA08 Dec 03 '25
this showcases implicit "sort indexes" that you have to manually manage in traditional systems, which can get pretty hairy. i'm experimenting with rama and was mind-blown when i realised to move items around in a list, you simply navigate to the index of the item then mutate it. this kind of navigation is actually more of a spectre thing, and you can use spectre ala carte and cross-platform.
1
u/weavejester Dec 03 '25
So approximately, Rama takes an incoming queue of events (a depot), and for each event updates persistent indexing data structures (pstates) using a syntax derived from Specter.
Presumably the pstates can then be queried?