On 4/7/09 7:52 AM, Peter Saint-Andre wrote:
> On 4/7/09 12:03 AM, Fabio Forno wrote:
>> On Tue, Apr 7, 2009 at 3:05 AM, Peter Saint-Andre <stpe...@stpeter.im> wrote:
>>
>>>> S: <t xmlns='urn:xmpp:sm:1' max="n"/>
>>>>
>>>> It isn't perfect but it can work for most of the cases.
>>> Agreed. But what is the purpose of max="n" here?
>> It could be used to adjust the number of maximun number of outstanding
>> packets (When throttling it makes sense to reduce it)
> 
> Ah, I think that needs to be a 'stanzas' attribute. The 'max' attribute
> specifies the longest allowable time period for session resumption and
> the 'stanzas' attribute indicates the server's preferred maximum number
> of received stanzas between acks.
> 
> So:
> 
> <t xmlns='urn:xmpp:sm:1' stanzas="n"/>

We've concluded that the server can use <t stanzas='n'/> to inform the
client that it is throttled and to adjust the number of stanzas between
acks. While writing up a throttling scenario for the spec, I have
realized that the order of events might be something like this (let's
assume that the early messages are fairly large):

C: <enable/>
S: <enabled stanzas='10'/>
C: <message/>
C: <message/>
C: <message/>
C: <message/>
C: <message/>
C: <message/>
[throttling kicks in]
S: <t stanzas='3'/>
[client adjusts its expectations and requests an ack]
C: <r/>
[client still throttled, server ignores <r/>]
[30 seconds go by]
S: <t/>
C: <message/>
[30 seconds go by]
S: <t/>
C: <message/>
[backlog starts to ease, server adjusts 'stanzas' value???]
S: <t stanzas='5'/>
C: <message/>
C: <message/>
[server has handled the first 10 messages so it finally replies to <r/>]
S: <a h='10'/>

But how can the server inform the client that the 'stanzas' value has
gone back to 10? Perhaps we need to add the 'stanzas' attribute to the
<a/> element, too.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to