streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (STREAMS-87) TwitterTimelineProvider needs to allow for backoff
Date Mon, 19 May 2014 21:37:41 GMT


ASF GitHub Bot commented on STREAMS-87:

Github user smashew commented on a diff in the pull request:
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/
    @@ -116,10 +116,8 @@ protected void captureTimeline(long currentId) {
                 int keepTrying = 0;
                 // keep trying to load, give it 5 attempts.
    -            //while (keepTrying < 10)
    -            while (keepTrying < 1)
    +            while (keepTrying < 5)
    --- End diff --
    I mean, it could be user specified, but it is typically better to assume that a 'service'
could have an issue on first attempt. There are a lot of reasons, legitimately that it would
fail, including the service being unavailable, too many questions being asked by the user,
etc. 5 is a pretty good default to let the backoff do it's job and wait for the service to
become available again. 
    Personally, I'm not a fan of 'magic numbers' either, but, something > 1 is really necessary
to be fault tolerant...

> TwitterTimelineProvider needs to allow for backoff
> --------------------------------------------------
>                 Key: STREAMS-87
>                 URL:
>             Project: Streams
>          Issue Type: Bug
>            Reporter: Robert Douglas
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> At the moment, the captureTwitterTimeline function in TwitterTimelineProvider only tries
one attempt at fetching a user's timeline. In the event of an exception being thrown, we simply
drop the data we were trying to collect. We should instead attempt 5 times in order to allow
enough time for Twitter's backoff

This message was sent by Atlassian JIRA

View raw message