Re: Handling an API with a throttle?

2013-04-14 Thread DAVID HODGKINSON
That looks very plausible.

The unpaid version of the API I'm calling is 2/second and 5000/day. 

Doing a backoff of a request fails isn't really the end of the world
until we get funded :)


On 14 Apr 2013, at 00:21, Pierre M piema...@gmail.com wrote:

 I found this: https://metacpan.org/module/Schedule::AdaptiveThrottler
 
 If you use it, please feedback: i might use it in the future.
 
 On 13 April 2013 23:05, DAVID HODGKINSON daveh...@gmail.com wrote:
 Opposite direction, making calls to an external API...
 
 
 On 13 Apr 2013, at 22:57, Schmoo schmoos...@gmail.com wrote:
 
 Do you mean something like these?
 
 https://metacpan.org/module/App::Cerberus#App::Cerberus::Plugin::Throttle
 https://metacpan.org/module/Plack::Middleware::Throttle
 https://metacpan.org/module/IO::Lambda::Throttle
 
 Gaz
 
 On 13 April 2013 22:32, Dave Hodgkinson da...@hodgkinson.org wrote:
 
 Any nice tricks for this? Calling this from a web app, although
 I don't have to.
 
 I'm assuming the right answer is some form queue with a daemon
 plucking requests off.
 
 Any other useful suggestions?
 
 
 



Handling an API with a throttle?

2013-04-13 Thread Dave Hodgkinson

Any nice tricks for this? Calling this from a web app, although
I don't have to.

I'm assuming the right answer is some form queue with a daemon
plucking requests off.

Any other useful suggestions?




Re: Handling an API with a throttle?

2013-04-13 Thread Schmoo
Do you mean something like these?

https://metacpan.org/module/App::Cerberus#App::Cerberus::Plugin::Throttle
https://metacpan.org/module/Plack::Middleware::Throttle
https://metacpan.org/module/IO::Lambda::Throttle

Gaz

On 13 April 2013 22:32, Dave Hodgkinson da...@hodgkinson.org wrote:

 Any nice tricks for this? Calling this from a web app, although
 I don't have to.

 I'm assuming the right answer is some form queue with a daemon
 plucking requests off.

 Any other useful suggestions?




Re: Handling an API with a throttle?

2013-04-13 Thread DAVID HODGKINSON
Opposite direction, making calls to an external API...


On 13 Apr 2013, at 22:57, Schmoo schmoos...@gmail.com wrote:

 Do you mean something like these?
 
 https://metacpan.org/module/App::Cerberus#App::Cerberus::Plugin::Throttle
 https://metacpan.org/module/Plack::Middleware::Throttle
 https://metacpan.org/module/IO::Lambda::Throttle
 
 Gaz
 
 On 13 April 2013 22:32, Dave Hodgkinson da...@hodgkinson.org wrote:
 
 Any nice tricks for this? Calling this from a web app, although
 I don't have to.
 
 I'm assuming the right answer is some form queue with a daemon
 plucking requests off.
 
 Any other useful suggestions?
 
 



Re: Handling an API with a throttle?

2013-04-13 Thread Pierre M
I found this: https://metacpan.org/module/Schedule::AdaptiveThrottler

If you use it, please feedback: i might use it in the future.

On 13 April 2013 23:05, DAVID HODGKINSON daveh...@gmail.com wrote:
 Opposite direction, making calls to an external API...


 On 13 Apr 2013, at 22:57, Schmoo schmoos...@gmail.com wrote:

 Do you mean something like these?

 https://metacpan.org/module/App::Cerberus#App::Cerberus::Plugin::Throttle
 https://metacpan.org/module/Plack::Middleware::Throttle
 https://metacpan.org/module/IO::Lambda::Throttle

 Gaz

 On 13 April 2013 22:32, Dave Hodgkinson da...@hodgkinson.org wrote:

 Any nice tricks for this? Calling this from a web app, although
 I don't have to.

 I'm assuming the right answer is some form queue with a daemon
 plucking requests off.

 Any other useful suggestions?