Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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]
NodeReaper recites The Raven over the P.A. again

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2018-04-23 04:24 GMT
Find Nodes?
    Voting Booth?