idnits 2.17.1 draft-mrose-bxxp-tcpmapping-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 13, 2000) is 8680 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Normative reference to a draft: ref. '1' ** Obsolete normative reference: RFC 793 (ref. '2') (Obsoleted by RFC 9293) Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M.T. Rose 3 Internet-Draft Invisible Worlds, Inc. 4 Expires: January 11, 2001 July 13, 2000 6 Mapping the BXXP Framework onto TCP 7 draft-mrose-bxxp-tcpmapping-01 9 Status of this Memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that 16 other groups may also distribute working documents as 17 Internet-Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six 20 months and may be updated, replaced, or obsoleted by other documents 21 at any time. It is inappropriate to use Internet-Drafts as reference 22 material or to cite them other than as "work in progress." 24 The list of current Internet-Drafts can be accessed at 25 http://www.ietf.org/ietf/1id-abstracts.txt. 27 The list of Internet-Draft Shadow Directories can be accessed at 28 http://www.ietf.org/shadow.html. 30 This Internet-Draft will expire on January 11, 2001. 32 Copyright Notice 34 Copyright (C) The Internet Society (2000). All Rights Reserved. 36 Abstract 38 This memo describes how a BXXP session is mapped onto a single TCP 39 connection. 41 Table of Contents 43 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 44 2. Session Management . . . . . . . . . . . . . . . . . . . . . 4 45 3. Data Exchange . . . . . . . . . . . . . . . . . . . . . . . 5 46 3.1 Flow Control . . . . . . . . . . . . . . . . . . . . . . . . 6 47 3.1.1 Channel Creation . . . . . . . . . . . . . . . . . . . . . . 6 48 3.1.2 Sending REQ or RSP Messages . . . . . . . . . . . . . . . . 7 49 3.1.3 Processing SEQ Frames . . . . . . . . . . . . . . . . . . . 8 50 3.1.4 Use of Flow Control . . . . . . . . . . . . . . . . . . . . 9 51 References . . . . . . . . . . . . . . . . . . . . . . . . . 10 52 Author's Address . . . . . . . . . . . . . . . . . . . . . . 10 53 A. Changes from draft-mrose-bxxp-tcpmapping-00 . . . . . . . . 11 54 B. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12 55 Full Copyright Statement . . . . . . . . . . . . . . . . . . 13 57 1. Introduction 59 This memo describes how a BXXP[1] session is mapped onto a single 60 TCP[2] connection. Refer to Section 2.5 of [1] for an explanation of 61 the mapping requirements. 63 2. Session Management 65 The mapping of BXXP session management onto the TCP service is 66 straight-forward. 68 A BXXP session is established when a TCP connection is established 69 between two BXXP peers: 71 o the BXXP peer that issues a passive OPEN call is termed the 72 listener; and, 74 o the BXXP peer that issues an active OPEN call is termed the 75 initiator. 77 A BXXP session is released when either peer issues the CLOSE call, 78 and the TCP connection is subsequently closed. 80 A BXXP session is terminated when either peer issues the ABORT call, 81 and the TCP connection is subsequently aborted. 83 3. Data Exchange 85 The mapping of BXXP data exchange onto the TCP service is less 86 straight-forward. 88 Messages are reliably sent and received using the SEND and RECEIVE 89 calls. (This also provides ordered delivery of messages on the same 90 channel.) 92 Although TCP imposes flow control on a per-connection basis, if 93 multiple channels are simultaneously in use on a BXXP session, BXXP 94 must provide a mechanism to avoid starvation and deadlock. To 95 achieve this, BXXP re-introduces mechanisms used by the TCP: 96 sequence numbers and window-based flow control -- each channel has a 97 sliding window that indicates the number of payload octets that a 98 peer may transmit before receiving further permission. 100 3.1 Flow Control 102 Recall from Section 2.2.1.2 of [1] that every payload octet sent in 103 each direction on a channel has an associated sequence number. 104 Numbering of payload octets within a frame is such that the first 105 payload octet is the lowest numbered, and the following payload 106 octets are numbered consecutively. 108 The actual sequence number space is finite, though very large, 109 ranging from 0..4294967295 (2**32 - 1). Since the space is finite, 110 all arithmetic dealing with sequence numbers is performed modulo 111 2**32. This unsigned arithmetic preserves the relationship of 112 sequence numbers as they cycle from 2**32 - 1 to 0 again. 114 3.1.1 Channel Creation 116 When a channel is created, the sequence number associated with the 117 first payload octet of the first frame is 0, and the initial window 118 size for that channel is 4096 octets. After channel creation, a BXXP 119 peer may update the window size by sending a "SEQ" frame (Section 120 3.1.3). 122 If a BXXP peer is requested to create a channel and it is unable to 123 allocate at least 4096 octets for that channel, it must decline 124 creation of the channel, as specified in Section 2.3.1.3 of [1]. 125 Similarly, during establishment of the BXXP session, if the BXXP 126 peer acting in the listening role is unable to allocate at least 127 4096 octets for channel 0, then it must return a negative response, 128 as specified in Section 2.4 of [1]. instead of a greeting. 130 3.1.2 Sending REQ or RSP Messages 132 Before a message is sent, the sending BXXP peer must ensure that the 133 size of the payload is within the window advertised by the receiving 134 BXXP peer. If not, it has three choices: 136 o if the window would allow for at least one payload octet to be 137 sent, the BXXP peer may segment the message and start by sending 138 a smaller frame (up to the size of the remaining window); 140 o the BXXP peer may delay sending the message until the window 141 becomes larger; or, 143 o the BXXP peer may signal to its application that it is unable to 144 send the message, allowing the application to try again at a 145 later time (or perhaps signaling its application when a larger 146 window is available.) 148 The choice is implementation-dependent, although it is recommended 149 that the application using BXXP be given a mechanism for influencing 150 the decision. 152 3.1.3 Processing SEQ Frames 154 As an application accepts responsibility for incoming frames, its 155 BXXP peer should send "SEQ" frames to advertise a new window. 157 The ABNF for a "SEQ" frame is: 159 seq = "SEQ" SP channel SP ackno SP window CR LF 161 ackno = seqno 163 window = size 165 ; channel, seqno, and size are defined in Section 2.2.1 of [1]. 167 The "SEQ" frame has three parameters: 169 o a channel number; 171 o an acknowledgement number, that indicates the value of the next 172 sequence number that the sender is expecting to receive on this 173 channel; and, 175 o a window size, that indicates the number of payload octets 176 beginning with the one indicated by the acknowledgement number 177 that the sender is expecting to receive on this channel. 179 A single space character (decimal code 32, " ") separates each 180 component. The "SEQ" frame is terminated with a CRLF pair. 182 When a "SEQ" frame is received, if any of the channel number, 183 acknowledgement number, or window size cannot be determined or is 184 invalid, then the BXXP session is terminated without generating a 185 response, and it is recommended that a diagnostic entry be logged. 187 3.1.4 Use of Flow Control 189 The key to successful use of flow control within BXXP is to balance 190 performance and fairness: 192 o large messages should be segmented into multiple frames (e.g., 193 the ideal BXXP segment size should be no larger than TCP's 194 negotiated maximum segment size minus some small constant); 196 o frames for different channels with traffic ready to send should 197 be sent in a round-robin fashion; and, 199 o each time a "REQ" or "RSP" message is received, a "SEQ" frame 200 should be sent whenever the window size is at least one half of 201 the available buffer space (if the transport service presents 202 multiple messages to a BXXP peer simultaneously, then a single 203 consolidating "SEQ" frame may be sent). 205 In order to avoid pathological interactions with the transport 206 service, it is important that a BXXP peer advertise windows based on 207 available buffer space, to allow data to be read from the transport 208 service as soon as available. Further, "SEQ" frames for a channel 209 should have higher priority than "REQ" or "RSP" messages for that 210 channel. 212 Finally, implementations may wish to provide queue management 213 facilities to the application using BXXP, e.g., channel priorities, 214 (relative) buffer allocations, and so on. In particular, 215 implementations should not allow a given channel to monopolize the 216 underlying transport window (e.g., slow readers should get small 217 windows). 219 References 221 [1] Rose, M.T., "The Blocks eXtensible eXchange Protocol 222 Framework", draft-mrose-bxxp-framework-01 (work in progress), 223 July 2000. 225 [2] Postel, J., "Transmission Control Protocol", RFC 793, STD 7, 226 Sep 1981. 228 Author's Address 230 Marshall T. Rose 231 Invisible Worlds, Inc. 232 1179 North McDowell Boulevard 233 Petaluma, CA 94954-6559 234 US 236 Phone: +1 707 789 3700 237 EMail: mrose@invisible.net 238 URI: http://invisible.net/ 240 Appendix A. Changes from draft-mrose-bxxp-tcpmapping-00 242 o The IPR notice is changed to be in full compliance of Section 10 243 of RFC 2026. 245 o SEQ messages are now (correcty) called SEQ frames. 247 o In Section 3.1.4, the explanation of when to send a SEQ frame is 248 clarified. 250 o In Section 3.1.4, the illustration of queue management facilities 251 is expanded. 253 Appendix B. Acknowledgements 255 Dave Crocker provided helpful suggestions on the nature of flow 256 control in the mapping. 258 Full Copyright Statement 260 Copyright (C) The Internet Society (2000). All Rights Reserved. 262 This document and translations of it may be copied and furnished to 263 others, and derivative works that comment on or otherwise explain it 264 or assist in its implementation may be prepared, copied, published 265 and distributed, in whole or in part, without restriction of any 266 kind, provided that the above copyright notice and this paragraph 267 are included on all such copies and derivative works. However, this 268 document itself may not be modified in any way, such as by removing 269 the copyright notice or references to the Internet Society or other 270 Internet organizations, except as needed for the purpose of 271 developing Internet standards in which case the procedures for 272 copyrights defined in the Internet Standards process must be 273 followed, or as required to translate it into languages other than 274 English. 276 The limited permissions granted above are perpetual and will not be 277 revoked by the Internet Society or its successors or assigns. 279 This document and the information contained herein is provided on an 280 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 281 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 282 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 283 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 284 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 286 Acknowledgement 288 Funding for the RFC editor function is currently provided by the 289 Internet Society.