upvote
With actor systems with no shared memory and explicit state implementing time traveling debug support is rather straightforward and gives you a record of all state transitions not just a call stack. This is vastly more useful.

The drawback is that one can have stack trace in prod but no time-traveling debugging. But then a typical workaround is to log explicitly state transitions. Depending on how it is done it can be sufficiently ergonomic and still gives more information than stack traces.

reply
I was actually thinking about doing time-travel debugging as the next article in the series. I worked on the microsoft time travel debugger, and it's almost funny how easy of a problem it becomes when you have no shared state and a narrow kernel interface. But on the flip side, the biggest reason debuggers are ever useful are the exact sort of bugs that aren't likely in a system like this.
reply
I also had this experience with Akka. For people who were able to build up a good mental model of what was what, it wasn't so bad, but still not as efficient as with a standard model. And of course, not all people are capable of having a sufficient mental picture and were totally lost.

I liked it, but my takeaway was that the negatives outweighed the positives, especially when factoring in not everyone was capable of dealing with it. I'm sure there are use cases where that calculus changes, but not the ones I had.

reply
I’ve never worked with Akka but I’ve always found GenServers on the BEAM pretty easy to debug. You outline all of your state transitions and you can usually see why something is going wrong.
reply
What do you mean by "outline all of your state transitions"? How do you outline them? Where? Is that something you do in the code? In the documentation? In your debugging setup?
reply
In your call handlers you handle messages e.g.

def handle_cast({:increment, by}, state), do: {:noreply, state + by}

Obviously you can be as loos or rigorous as you want and go all the way up to implementing a finite state machine with aggressive guards.

You can use observer to see what's happening with various processes/actors.

reply
It's a state machine, how was it hard to debug? Was it the actual distributed (Akka Cluster) bits or just the system in general?
reply
How would you gather a consistent snapshot of the states each actor maintains to debug it? Unlike a more traditional execution model, there's no direct means of pausing the world to inspect what's going on. It can get shockingly complex.
reply