distributed-process
distributed-process copied to clipboard
Can we report when the NC or incoming event handler crashes or blocks?
When the NC thread or handleIncomingEvents crash, the application will probably block without further hints. It would be better if we printed some message in the console to report the problem. This won't help much, though, if the NC simply blocks not really terminating with an exception.
Another related aspect to consider is whether the NC really needs to die if there is an error handling any of the messages.
It's simply a matter of adding log output in exception handler:
https://github.com/haskell-distributed/distributed-process/blob/master/src/Control/Distributed/Process/Node.hs#L254-L260
I think writing to stderr will be fine because there are no other mechanism exists and there is no way to propagate exception, so user could catch it?
According to second question, ideally according to semantics error handling in messages should never happen, and it's a bug in implementation if we have such cases, so it's my be ok to just fail. But for user it's more expected if NC will survive and log error.
Any other thoughts?