[Bro-Dev] Rethinking Broker's blocking API

Robin Sommer robin at icir.org
Tue Jan 10 08:46:27 PST 2017

On Tue, Jan 10, 2017 at 08:28 -0800, you wrote:

> If we provided operator bool() for statuses, then it would be true for
> peer_added, peer_removed_, peer_recovered, and false for all others.
> This selection seems arguable to me, which is why I'm inclined to let
> users probe for specific instances themselves.

I see the challenge but I think we need some way to differentiate
serious errors from expected updates, otherwise we're back at writing
switch statements that need to comprehensively list all cases. One can
always post-filter if, e.g., one does consider status X not an error
even though it's flagged as such. Instead of a binary error yes/no,
what about levels along these lines: (1) Error: *we* did something
seriously wrong; (2) Warning: something's seems off, including
problems with peers; and (3) Info: just an update on activity. It's
not clear-cut of course but it would still be good to have some
default classification for cases that one doesn't handle directly (and
if it's only for then logging as error/warning/info). One could then
also compare the level directly with the status object: "if ( status
== ERROR ) ..."


Robin Sommer * ICSI/LBNL * robin at icir.org * www.icir.org/robin

More information about the bro-dev mailing list