Caterpillar

Daily Thought - 2024-04-20

< back to list

I've been talking about logging "undo instructions" into a ring buffer, as Caterpillar code gets executed, so you can always rewind your program to an earlier state. But you have to limit the size of this buffer, and thus the utility of this feature.

I think this can be solved though, by complementing this fine-grained instruction-level approach with application-level events. Then we can take big steps from event to event, and only use the more limited undo instruction buffer to take closer looks in between.

This sounds like a job for Event Sourcing, but that's not an architecture you can just implement in a language runtime. I needs to be supported on an application or framework level. And I haven't fully figured out how that should work.

<< previous thoughtnext thought >>