Hi!

On Fri, Nov 09, 2007 at 12:11:28AM +0100, Marc Lehmann wrote:
>On Fri, Nov 09, 2007 at 12:09:10AM +0100, Hannah Schroeter <[EMAIL PROTECTED]> 
>wrote:
>> >close() can block. *boom tsst*.

>> On sockets, IIRC only with non-standard settings of the SO_LINGER
>> option.

>well, scanning a directory and writing files would also be blocking (ok,
>there is aio_write, but no aio_open etc.).

And then, aio_* isn't very portable, de facto.

>poing being, the above cannot be done with libevent alone, making the whole
>assignment not very well-thought out.

>my initial reaction was "well, it cannot be 'blazingly fast' when it has to
>work like this" :)

*nods* Communication through the file system only sucks. (Event
notification for directory changes is highly non-portable, so the
remaining portable means is polling.)

I see less problems with the writing away of the data sucked from the
web servers, as most Unix like systems write stuff asynchronously, so
the open(..., O_CREAT...), write() and close() calls won't be too slow.

And if they should be slower than the network interfaces, combine
things with I/O worker {threads,processes}. BTDT (main program using
event multiplexing on network + socketpairs to I/O helper processes).

Kind regards,

Hannah.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to