> -----Original Message-----
> From: [email protected] [mailto:jenkinsci-
> [email protected]] On Behalf Of Jesse Glick
> Sent: Friday, July 26, 2013 5:06 PM
> To: [email protected]
> Subject: Re: progressiveHtml url/doProgressText() only shows a line at a time
>
> On Fri, Jul 26, 2013 at 6:00 PM, Haszlakiewicz, Eric
> <[email protected]> wrote:
> > I'm trying to come up with a situation where it shouldn't return all the
> available data, but I'm having trouble thinking of one.
>
> I think just that in the normal case, when text is appended to the log one
> line
> at a time, we do not want to show a half-printed line just because of a race
> condition. Perhaps LargeText could detect that, say, more than one second
> has elapsed since the last character (which is not a newline) was recorded,
> and in this case go ahead and send the partial line.
>
hmm... I don't think you'd want to inject an extra one second delay into every
request.
Perhaps the flow could go a bit like this, so the client doesn't send more than
one request without getting any trailing bytes:
(C=client, S=server, line numbers and byte counts are arbitrary)
C:request:/progressiveHtml
S: get lines 1-5, bytes:100
C: wait 5 seconds
C: request:/progressiveHtml, start=100
S: get lines 6-7, omit part of line 8, bytes:+30 more bytes up to end of line
7, flag to indicate partial response
C: wait 5 seconds
C: request:/progressiveHtml, start=130, partialLine=yes
S: get line 8-10, omit part of line 11,
ignore partialLine option since there's at least one newline,
bytes:+40 more to end of line 10,
flag to indicate partial response
C:wait 5 seconds
C: request:/progressiveHtml, start=170, partialLine=yes
S: get rest of line 11, include all bytes
bytes:+2 more
flag to indicate partial response (b/c no newline)
C:wait 5 seconds
C: request:/progressiveHtml, start=172, partialLine=yes
S: get rest of line 11, line 12, end of data is a newline so partialLine=no,
bytes:+20 more
C: wait 5 seconds
C: request:/progressiveHtml, start=192, partialLine=no
Eric
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.