[erlang-questions] Poll: How do you handle spurious messages?

Loïc Hoguin essen@REDACTED
Wed Aug 6 19:43:31 CEST 2014


I do not think "making it easy for anyone with access to mess up your 
system when inspecting" is a matter of taste? If I have to fear breaking 
everything every time I'm trying to look for data to fix a bug, I'll 
just pack my things and leave, I don't want that kind of stress.

You're also making your system less stable if you run misbehaving third 
party code. And by third party, I include OTP's code. For example a 
while back the ssl application sent a harmless message to the accepting 
process under certain conditions, do you really want to crash in cases 
like this?

"Let it crash" is great, but it's not the solution to everything.

On 08/06/2014 06:48 PM, Florian Waas wrote:
> Matter of taste. If you like designs where unidentified messages
> circulate in your system and endless debugging sessions for race
> conditions, missed messaged, deadlocks etc. is your thing, ignoring
> messages is cool.
>
> If you're not good at this type of debugging or simple don't have the
> time for it consider tightening your design and eliminate any kind of
> slack from the system, then crash for anything that breaks the contract.
>
> -fl.
>
>
>
> On Wed, Aug 6, 2014 at 9:07 AM, Loïc Hoguin <essen@REDACTED
> <mailto:essen@REDACTED>> wrote:
>
>     On 08/06/2014 04:55 PM, Peer Stritzinger wrote:
>
>         1. log the messages
>
>
>     For the few processes that can receive more than
>     calls/casts/monitors/exits I want to know what's being dropped in
>     case it's something important.
>
>
>         3. Ignore them without trace?
>
>
>     For everything else, which is the majority of the processes.
>
>     *Never* crash. Because if you do, then you can easily mess up your
>     system through the shell (like using sys:get_state on a normal
>     process, kaboom).
>
>     --
>     Loïc Hoguin
>     http://ninenines.eu
>
>     _________________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/__listinfo/erlang-questions
>     <http://erlang.org/mailman/listinfo/erlang-questions>
>
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list