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

Guilherme Andrade g@REDACTED
Wed Aug 6 17:07:15 CEST 2014


Hello Peer,

It's pretty much a strictness question, as well as depending on the
nature of the process; with ephemeral, short-lived processes in an
environment that has many of such, unexpected messages are more likely
to arrive simply because there's more PID recycling going around.

For the most part is harmless; depending on how much do you expect a
process to receive those messages, you might choose different logging
levels according to the rareness of the event. They might be good for
diagnostic purposes -- not as much as diagnosing issues on the
*receiver* but mainly issues on the *sender* - "why is it sending
messages to the wrong process, and why? And what could be the consequences?"

Cheers,


On 06/08/14 15:55, Peer Stritzinger wrote:
> I'm interested in how you deal with spurious messages to your servers
> i.e.
>
>
>   receive
>          ... your important messages here ...
>         Any ->    ???           % we don't want crud to acrete in the
> mailbox
>   end
>
> Or in gen_server speak:  what goes into your catchall
>
>   handle_info(_Info, State) ->  ???
>
>
> Do you:
>
> 1. log the messages
>
>    1a.) as info
>    1b.) as warning
>    1c.) as error
>
> 2. count them e.g. with folsom or similar -> then what do you do with
> the counts?
>
> 3. Ignore them without trace?
>
> 4. Crash the server (gasp)?
>
> Did I forget something?
>
> Cheers,
> -- Peer
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-- 
Guilherme

https://www.gandrade.net/
PGP: 0x35CB8191 / 1968 5252 3901 B40F ED8A  D67A 9330 79B1 35CB 8191


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140806/ba66420c/attachment.bin>


More information about the erlang-questions mailing list