Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Parallel::Runner and Amazon SQS Issue

by runrig (Abbot)
on Sep 13, 2012 at 17:06 UTC ( #993536=note: print w/replies, xml ) Need Help??

in reply to Parallel::Runner and Amazon SQS Issue

Seeing as how this is probably a one-shot, I might just select data in the main loop, and feed it to Amazon in parallel processes. It shouldn't take ALL that long to select 70G of data. The bottleneck, I would think, would be the Amazon request. Something like:
while ( my $records = fetch_next_5000_records_from_sth() ) { $runner->run( ..feed records to Amazon... ); )

Update: And it looks like you really only feed one record at a time to the web service, so it might as well be:

while ( my $record = $sth->fetch() ) { $runner->run(... feed record to service ...); }

Replies are listed 'Best First'.
Re^2: Parallel::Runner and Amazon SQS Issue
by stonecolddevin (Vicar) on Sep 13, 2012 at 18:45 UTC

    Hmmm good point. I've implemented this and unless something explodes, all looks like it's going according to plan. Thanks runrig!

    Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993536]
[thao4]: thao4
[hippo]: Indeed you are.
[thao4]: Hi all, I am new in perl. I need do somthing in perl: exemple: - search a patern "CADRE 1.1 CPU" in one file.txt - incremente +30 lines from the line with the patern found - replace the patern "Model Regle" by "Heath Rule A" in this new line (30 line
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2018-02-21 09:42 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (276 votes). Check out past polls.