http://qs321.pair.com?node_id=658139

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

Dear Monks,

When searching: 'agents for distributed computation' in CPAN I got back one (irrelevant) hit. Is Perl missing a trick with regard to this programming approach?

Replies are listed 'Best First'.
Re: agents for distributed computation
by ian (Beadle) on Dec 20, 2007 at 16:10 UTC
Re: agents for distributed computation
by jdporter (Paladin) on Dec 20, 2007 at 17:02 UTC

    You tried one search, got one bad result, and gave up? And you expect us to come running to your rescue?
    Does the phrase "broaden your search" mean anything to you?

    When I search for agent, I find Agent and Scooby. Perhaps one of those might be close to what you're wanting.

    A word spoken in Mind will reach its own level, in the objective world, by its own weight
Re: agents for distributed computation
by suaveant (Parson) on Dec 20, 2007 at 16:53 UTC
    You could probably work up something cool up using POE and its IKC (inter kernal communication), that'd give you distributed event driven programming, I do believe.

                    - Ant
                    - Some of my best work - (1 2 3)

Re: agents for distributed computation
by talexb (Chancellor) on Dec 20, 2007 at 18:35 UTC
      Is Perl missing a trick with regard to this programming approach?

    Well, CPAN might be missing a trick, but Perl's alive and well at my company, where I wrote a module called JobQueue that can either run jobs locally (via a fork/wait sub-module called ForkingLayer) or remotely (via calls to a grid engine that we have here, in a sub-module called GridEngine).

    My module's been in Production for 2-3 years and works really well -- I took advantage of Perl's OO structure and set it up so that the application doesn't have to know whether it's running on the grid engine or locally. Jobs get submitted, and eventually they finish. That's all the application has to know.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: agents for distributed computation
by amarquis (Curate) on Dec 20, 2007 at 16:09 UTC

    I love Perl, but there are other tools in the toolbox. I'm not sure if Perl would be my solution to something that is expected to run so slowly I'd need many machines.

    That said, I'm sort of surprised (after an admittedly quick search) that there's nothing on there that lets you use Perl as a glue to manage your distributed project.

    Edit: Glad I admitted it was a lazy and quick search. I should have learned never to bet against something being on CPAN.

Re: agents for distributed computation
by MidLifeXis (Monsignor) on Dec 20, 2007 at 21:18 UTC

    How about MPI?

    --MidLifeXis

Re: agents for distributed computation
by bwelch (Curate) on Dec 21, 2007 at 17:31 UTC
    The term 'agents' is frequently a fuzzy term. Generally, I think of agents as independent workers that communicate with either each other or a 'mother' process. Other sources define them differently.

    I see PBS on CPAN, a Portable Batch System. It's a queuing system and lets one spawn off many 'agents' to work on tasks independently. I've used systems similar to PBS to manage agent systems for bioinformatics applications. In those, thousands of agents are created, work on a piece of data, then either communicate that they've finished and die, or request more work. One application created 17,000 agents on a cluster and completed in around six hours. Note that optimization of granularity is important. Before optimization, the 86,000 agents were created and it took six days to complete.