Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2DD891187F for ; Fri, 6 Jun 2014 13:17:39 +0000 (UTC) Received: (qmail 69377 invoked by uid 500); 6 Jun 2014 13:17:39 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 69331 invoked by uid 500); 6 Jun 2014 13:17:39 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 69321 invoked by uid 99); 6 Jun 2014 13:17:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 13:17:38 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prvs=8234d4f342=rhs@alum.mit.edu designates 18.7.68.20 as permitted sender) Received: from [18.7.68.20] (HELO alum-mailsec-scanner-8.mit.edu) (18.7.68.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 13:17:33 +0000 X-AuditID: 12074414-f79f86d000000b9f-42-5391bf54b88f Received: from outgoing-alum.mit.edu (OUTGOING-ALUM.MIT.EDU [18.7.68.33]) by alum-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id D2.30.02975.45FB1935; Fri, 6 Jun 2014 09:17:08 -0400 (EDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) (authenticated bits=0) (User authenticated as rhs@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.13.8/8.12.4) with ESMTP id s56DH7RC010170 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 6 Jun 2014 09:17:08 -0400 Received: by mail-pb0-f53.google.com with SMTP id md12so2474968pbc.12 for ; Fri, 06 Jun 2014 06:17:07 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.68.201.68 with SMTP id jy4mr773697pbc.64.1402060627503; Fri, 06 Jun 2014 06:17:07 -0700 (PDT) Received: by 10.70.130.101 with HTTP; Fri, 6 Jun 2014 06:17:07 -0700 (PDT) In-Reply-To: <5390BDF4.4000300@redhat.com> References: <5390BDF4.4000300@redhat.com> Date: Fri, 6 Jun 2014 09:17:07 -0400 Message-ID: Subject: Re: The waiting game [client sends 0 outgoing size] From: Rafael Schloming To: "users@qpid.apache.org" Content-Type: multipart/alternative; boundary=047d7b15a983a7f03004fb2aadcb X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBKsWRmVeSWpSXmKPExsUixO6iqBuyf2Kwwdu/NhZnV/xndGD0mHrn AVsAYxS3TVJiSVlwZnqevl0Cd8a2hoVsBXcVK7a13GZuYHwl3cXIySEhYCJxpPEME4QtJnHh 3nq2LkYuDiGBy4wSb1bNZ4dw7jBJdCxbwAzhTGSUuNjymAWkhVdAUOLkzCcsEO2FEvfPnAOz hQS8JL7t7GEFsTkFtCSmvbwBFY+UmHpzEtBUDg4WARWJhz+qIcYESDya/o4RxBYWsJHo+tgA dhGbgKbEtssb2UBsEQFjidbFr8FGMgONP/38LtMERoFZSK6YhSQ1C2gDs4C6xPp5QhBhNYnb 266yQ9jaEssWvmZewMi6ilEuMac0Vzc3MTOnODVZtzg5MS8vtUjXQi83s0QvNaV0EyMkjEV2 MB45KXeIUYCDUYmHN6B/QrAQa2JZcWXuIUZJDiYlUV7d3RODhfiS8lMqMxKLM+KLSnNSiw8x SnAwK4nwsjUD5XhTEiurUovyYVLSHCxK4rzfFqv7CQmkJ5akZqemFqQWwWRlODiUJHhv7AVq FCxKTU+tSMvMKUFIM3FwggznkhIpTs1LSS1KLC3JiAdFdnwxMLZBUjxAe7+AtPMWFyTmAkUh Wk8xGnPM+3+0jYnj16LTbUxCLHn5ealS4rwM+4BKBUBKM0rz4BbBEtgrRnGgv4V5+UGqeIDJ D27eK6BVTECrfmWCrSpJREhJNTDqaVfxHDh68/unXXmbmZfwBx7OqTZ8d861wHVLUHZ0iMXq 3+EXmTmWFEe+2TRpatL1qXUznRs2HqhxzpiTzX179ypevlylvUs3Hngf4j9jx2QLtT15ijce x87/Fb+1Ve9380mPnVuCv3GXl7vN2X0gJuy3WoOH/PUSuZa7zqu8vj6bd2/pAR4tJZbijERD Leai4kQAwOxjDDsDAAA= X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15a983a7f03004fb2aadcb Content-Type: text/plain; charset=UTF-8 On Thu, Jun 5, 2014 at 2:59 PM, Ted Ross wrote: > Tom, > > I'm not sure I understand why the server sets the incoming window the > same as the client's outgoing window. Shouldn't the server set the > incoming window to some value large enough to prevent pipeline-stalling > and small enough to prevent incoming frames from consuming too much memory? > > If your objective is to manage a very large number of clients and you > don't want to provide incoming capacity until there are messages to be > sent, I think pn_session_t would need to add something like "set_offer" > so the sender can indicate that there are bytes/frames to send. > I don't think additional API would be necessary here. The session's outgoing window should be computable based on the state of it's various links, e.g. if messages are being offered on one or more links, we should be able to factor that in when we compute the outgoing session window. Regardless, I don't think using the "available" protocol field in the way you describe will work in general since it is an optional field. As a server you need to use a strategy that will work even if available is never set. The point of the available field is to provide extra information to distribute credit more optimally, but you can't rely on it as an absolute signal. For example as a server that has more clients than available credit, you can revoke credit from idle clients and give it instead to blocked clients. You can use the information from the available field in order to pick a blocked client that will definitely be able to use the credit, but if none of your clients supply that information, you will still need to ensure that all clients eventually have an opportunity to send. --Rafael --047d7b15a983a7f03004fb2aadcb--