Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Parallel::Runner and Amazon SQS Issue

by runrig (Abbot)
on Sep 13, 2012 at 17:06 UTC ( [id://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 (Parson) 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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://993536]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found