powerman has asked for the wisdom of the Perl Monks concerning the following question:

Hmm... after I press "Preview", and then "Create" empty question was created. Probably this is a bug in PM? I will post original question as update below...

Hi!

Is anybody know a way to use epoll(2) or libevent from perl? I don't able to write XS for libevent myself, and I don't like too much to use syscall() to use epoll -- is any perl modules exists for these tasks?

WBR, Alex.

Replies are listed 'Best First'.
Re: epoll or libevent
by perrin (Chancellor) on Feb 10, 2004 at 17:38 UTC
    No. I'm not sure that it would be worth it to use these from perl, since the performance gain over a select() loop might only be noticeable in a C app. Why don't you start with select(), which is readilly available from perl, and see how that works for you?
      Because I need to write server for about 10000 simultaneous connections, while select() support only first 1024 FDs.
        Then you can try Inline::C or SWIG. However, I wonder if you will really be able to handle 10000 connections with a perl-based server without running slowly, since you have to handle them sequentially and either keep all of the state in memory or switch it in and out of disk storage, which would slow things down even more.
Re: epoll or libevent
by Anonymous Monk on Aug 20, 2004 at 15:23 UTC
    Try Event.