News for hackers. Stuff that matters.
Re:Give me back my monolith (2019) by staticassertion on Tuesday May 10, 2022 @03:54PM (#31331838)
The point is not to handle individual bugs, it is to handle all failures. This is the difference between a "defensive programming" approach and the "let it crash"/ "zen of erlang" approach. Actors are designed such that they have failure isolation, which means they can react to errors in other actors without worrying about their own state. They then have two options based on one of two bug classes - transient and persistent.

Persistent errors are propagated to the supervisor. Transient errors are either retried or propagated.

It doesn't matter if it's a network error, a disk error, a timeout, a crash, a cosmic radiation bit flip - your approach is always one of those two. So adding more failure cases doesn't "matter" in terms of your error handling, although you may want to adopt helpful patterns in the nuances of "retry".

The frequency of errors will obviously increase with a network error (arguably very very little), but the pattern is fundamental to resiliency.

If your network is truly so unreliable that you can not pay that cost, don't do it. I don't think most people are developing on networks that fail for long periods of time frequently.

Re:Give me back my monolith (2019) by kaba0 on Tuesday May 10, 2022 @07:35PM (#31334016)
But now you are talking squarely about Erlang actors, not microservices in general. The runtime gives you all the needed guarantees here.
Re:Give me back my monolith (2019) by staticassertion on Wednesday May 11, 2022 @07:59AM (#31338616)
I talk about services and actors interchangeably because there's no interesting differences between them.
Re:Give me back my monolith (2019) by kaba0 on Wednesday May 11, 2022 @05:02PM (#31345717)
Other than automatic handling of network exceptions, safe failiures and the shitton of other features Erlang runtimes have?
Re:Give me back my monolith (2019) by staticassertion on Thursday May 12, 2022 @04:12PM (#31359619)
I'm not sure what you're talking about. What automatic handling of network exceptions? What safe failures? BEAM has lots of great features, no question, but they have very little to do with the implementation of actors - BEAM primarily provides names and linking as useful primitives.