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

All,

I'm looking to create a custom app server, but I'm not 100% sure which library to use. I'll be starting simple, but I'd like it to be able to handle a heavy load in the future. Any thought on which to use: POE or Net::Server?

My two main concerns are ease of programming, which both look pretty simple, and scalability. While I do fully understand that won't be as fast as writing a server in C, I'd like it to sill perform as fast as possible.

Thanks.

Replies are listed 'Best First'.
Re: POE vs. Net::Server
by dragonchild (Archbishop) on Apr 14, 2008 at 03:24 UTC
    POE doesn't do a server - it does an event handler. There's a server plugin. Net::Server just does server stuff.

    If you're starting from scratch, I'd drink the kool-aid and use POE. It's a bit of an initial climb, but it's worth it. Otherwise, Net::Server.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Not cool, take the blue pill
Re: POE vs. Net::Server
by bingos (Vicar) on Apr 14, 2008 at 09:29 UTC

    Only being slight biased towards POE and having never used Net::Server, I'll just point out some of the benefits of a POE based approach:

    • POE favours a layered approach to coding. You can build up your applications in a modular fashion.
    • The hard work may already have been done for you, there may be a component or a filter on CPAN already.
    • All IO is non-blocking
    • You can utilise different Event loops transparently.
    • POE has some excellent support resources.

    Have fun.

      Thank you to everyone. I didn't realize that the tutorials for POE used external libraries (I.e. filters/components), so I thought the networking was part of the core package. I'll probably try POE since I can use it for more than just a server.