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

Hi, I came across the terminology Gearman::Server in order to handle parallel processing.
Just like to know the pros and cons between Gearman::Server vs POE implementation in perl .
where to use and what ?
Raja

Replies are listed 'Best First'.
Re: Gearman::Server vs POE
by rcaputo (Chaplain) on Aug 28, 2013 at 12:35 UTC

    I know POE much better than I know Gearman::Server, so I'm looking at Gearman::Server's documentation to answer this question.

    Gearman::Server describes itself as an RPC dispatcher. Workers connect to it and register the jobs they can do. Clients connect to it and request work to be done. The Server routes work requests to the services that can handle them, and sends responses back. Unless I'm wrong, it's a basic message queue server.

    POE is a general library for writing client/server programs, among other things. It's been used to write message queues, like POE-Component-MessageQueue. You could create something closer to Gearman::Server with it, maybe using something like POE-Component-IKC to handle service registration and request routing. But POE isn't a solution to that singular problem, like Gearman::Server is.

    If all you need is Gearman, then it makes a lot of sense to go with that.

    But if your requirements vary from Gearman, or you expect them to in the near future, then your time might be better spent by looking for a more suitable alternative. Message queuing, RPC dispatching, and load balancing are problems with a lot of existing solutions. Writing your own should be a last resort, but POE can help if you need to.

Re: Gearman::Server vs POE
by runrig (Abbot) on Aug 28, 2013 at 15:08 UTC

    Gearman and POE are different things. Gearman is a distributed job queue, POE is a framework for event-based programming. Sure, they can get some of the same sorts of things done, but what specifically do you want to do?

    Gearman::Server vs POE implementation in perl

    There's a POE::Component::Gearman::Client library. Are you referring to that?

    In Gearman vs X discussions, I usually hear Gearman vs. some message queue, not Gearman vs POE.

    Anyway, if you are going to use Gearman, I'd look at Gearman::XS. Unless you want to use Gearman within POE, then I'd probably look at that library I just mentioned.