1 May 2011 10:39
Re: Incrementally consuming the eventlog
Johan Tibell <johan.tibell <at> gmail.com>
2011-05-01 08:39:43 GMT
2011-05-01 08:39:43 GMT
On Thu, Apr 28, 2011 at 11:53 PM, Donnie Jones <donnie <at> darthik.com> wrote: > Anyway, from your description, I don't understand how a listener would > consume the eventlog incrementally? I simply meant that I want to be able to register listeners for events instead of having to parse the eventlog file after the fact. > I do think it would be useful to register listeners for events. I do > not think the invocation of a callback would be too much overhead, > rather the action the callback performs could be a very significant > overhead, such as sending eventlog data over a network connection. > But, if you are willing to accept the performance loss from the > callback's action to gain the event data then it seems worthwhile to > me. A typical use of the callback would be to update some internal data structure of the program itself, thereby making the program self-monitoring. I've been toying with introducing log levels to the eventlog command line API so the consumer of the event log can specify the number of events it would like to receive. We could do something similar for the API e.g. registerEventListener (schedEvents .|. ioManagerEvents) (\ e -> ...) Johan
> How about invoking the callback once every time the event buffer is
> full?
That's much more realistic. Still, do we need the generality of pushing
the event buffers through the Haskell code? For some reason it makes me
slightly nervous. How about just setting which output FD the event
buffers get written to.
RSS Feed