3 ms·
Thanks for the link, that was a good read. Sounds like the concern is that when an error is raised inside an actor, the error is swallowed by that actor's thre
by chrisdinn 14y ago
Thanks for the link, that was a good read.
Sounds like the concern is that when an error is raised inside an actor, the error is swallowed by that actor's thread. If you were waiting for it to respond you're end up with a mysterious timeout error and no idea where it came from. That's a good issue, one I definitely struggled with.
Internally, we're addressing this problem by building our actors in such a way that they return a Status.Failure when an error is raised, using unit tests to ensure a response is always sent even when an error occurs. Typically, our responder functions are built from a number of Futures composed using the tools provided by Akka. This works well in some cases, when an error is raised early in a function composed from many Futures it gets passed right to the OnError handler to return an appropriate response. In the case where you get a mysterious timeout it can definitely make debugging difficult. Akka's excellent logging has saved us there many times.
The goal was to lean on Akka whenever possible, adding elements to the Smoke DSL only when absolutely necessary. We've been able to make this work in some pretty non-trivial applications. Will that work for everyone? Hard to say. Your mileage may vary.