Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread William Ahern
On Fri, Apr 18, 2008 at 10:36:53PM +0200, Cezary Rzewuski wrote: > Thank you for Your suggestions. I've just finished the implementation. > I used the approach of libevent as HTTP server and threads working > on downloaded content (they are performing some statistical computation on > downloaded ja

Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread William Ahern
On Sat, Apr 19, 2008 at 02:49:20AM +0200, Springande Ulv wrote: > > On 19. april. 2008, at 01.57, William Ahern wrote: > >In some sense--like code complexity--using both an event-oriented > >design > >*and* threads is the worst of both worlds. Your processing logic is > >turned > >inside-out (

Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread Springande Ulv
On 19. april. 2008, at 01.57, William Ahern wrote: In some sense--like code complexity--using both an event-oriented design *and* threads is the worst of both worlds. Your processing logic is turned inside-out (state machines, etc, can be confusing to some people), plus you have mutexes and

Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread William Ahern
On Sat, Apr 19, 2008 at 12:23:16AM +0200, Springande Ulv wrote: > > On 18. april. 2008, at 22.36, Cezary Rzewuski wrote: > >>our best bet is to use a single thread using > >>libevent, or go totally multi-threaded without libevent. In 90% of > >>the > >>circumstances one of those options (though

Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread Springande Ulv
On 18. april. 2008, at 22.36, Cezary Rzewuski wrote: our best bet is to use a single thread using libevent, or go totally multi-threaded without libevent. In 90% of the circumstances one of those options (though not both) Why not both?! Using both threads _and_ libevent is not only possible

Re: [Libevent-users] http: libevent vs many threads

2008-04-18 Thread Cezary Rzewuski
Thank you for Your suggestions. I've just finished the implementation. I used the approach of libevent as HTTP server and threads working on downloaded content (they are performing some statistical computation on downloaded javascripts). It looks to work efficiently. It's probably not the right g

Re: [Libevent-users] http: libevent vs many threads

2008-04-02 Thread William Ahern
On Wed, Apr 02, 2008 at 10:15:59PM +0200, Cezary Rzewuski wrote: > Hi, > I'd like to ask if sending http requests with libevent is carried out in > separate thread or is the library > single-threaded? I want to use the library in a program which will visit > many URL and download > it's content.

Re: [Libevent-users] http: libevent vs many threads

2008-04-02 Thread Robert Iakobashvili
Hi Cezary, On Wed, Apr 2, 2008 at 11:15 PM, Cezary Rzewuski <[EMAIL PROTECTED]> wrote: > Hi, > I'd like to ask if sending http requests with libevent is carried out in > separate thread or is the library > single-threaded? I want to use the library in a program which will visit > many URL and dow