1 May 2011 22:51
Re: Incrementally consuming the eventlog
Duncan Coutts <duncan.coutts <at> googlemail.com>
2011-05-01 20:51:13 GMT
2011-05-01 20:51:13 GMT
On Thu, 2011-04-28 at 23:31 +0200, Johan Tibell wrote: > The RTS would invoke listeners every time a new event is written. This > design has many benefits: > > - We don't need to introduce the serialization, deserialization, and > I/O overhead of first writing the eventlog to file and then parsing it > again. The events are basically generated in serialised form (via C code that writes them directly into the event buffer). They never exist as Haskell data structures, or even C structures. > - Programs could monitor themselves and provide debug output (e.g. via > some UI component). > - Users could write code that redirects the output elsewhere e.g. to a > socket for remote monitoring. > > Would invoking a callback on each event add too big of an overhead? Yes, by orders of magnitude. In fact it's impossible because the act of invoking the callback would generate more events...(Continue reading)> 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.
> 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