

A Gazillion-user Comet Server With libevent, Part 0  - alecco
http://aleccolocco.blogspot.com/2008/10/gazillion-user-comet-server-with.html

======
davidw
Ok, but part of what makes Erlang so interesting for this kind of stuff is
that you can do long running tasks in the event handlers without locking up
the system. Erlang will take care of scheduling it, so that other requests can
keep coming in and getting handled, and processing power is divided up between
the different Erlang 'processes'. Writing simple select/poll/event/whatever
servers in C is obviously going to kick ass in terms of speed, but things
become more problematic when you need to start doing some real processing.

~~~
alecco
We'll see... ;)

~~~
davidw
Obviously, anything is _possible_ with C. Erlang is written in C, after all.
You can break up processing into small steps that don't bog things down, and
even formalize how you do so. But the difference is that in Erlang, that's
taken care of for you.

(BTW, not that any of this takes away from your nice article - I voted it up
because it's the kind of thing I'd like to see more of!)

------
henning
libevent has wrappers to languages like perl, so this should be doable in a
language that isn't brutally low-level. right?

~~~
jgalvez
Well, yes, but memory footprint will be higher and speed will decrease
slightly. You will also want to leave all the protocol handling (HTTP etc) in
C to prevent further slowing down.

------
jgalvez
Hey alecco, nice blog! I've been playing with a bit of libevent goodness
myself, your code will be very helpful ;)

~~~
alecco
Thanks!

------
bprater
Great article, keep the series coming!

