Hi,
On Sat, Mar 31, 2012 at 8:24 PM, Girish Venkatachalam
<[email protected]> wrote:
>
> 3) event based I/O loop handling
>
> You should read the paper by Ousterhout, the author of Tcl about why
> threading is a bad idea and event loops are better.
>
This is something that is easy to get wrong. I still see a lot
of people argue that multi-threaded is the way to go. But event based
approaches are a lot better. Also, I guess beyond a limit,
multi-threaded approach doesn't scale.
>
> You could also use poll(2). Nowadays I just use poll.It is better than select.
>
> You also have many methods to monitor file I/O. FreeBSD uses kqueue(2) and
> Linux has inotify and friends.
>
> All UNICes have event(3) library which is a generic library for
> network and file I/O
> using the event loop model.
>
In GNU/Linux, we now have epoll(7). Epoll is an event based I/O
notification based library. scales better normally, but can be a
little tricky if we are not used to event loops/event based
programming. Thanks
--
Thank you
Balachandran Sivakumar
Arise Awake and stop not till the goal is reached.
- Swami Vivekananda
Mail: [email protected]
Blog: http://benignbala.wordpress.com/
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc