Skip to content

Commit 7e98505

Browse files
committed
update connection establishment for clarity.
1 parent afc6aec commit 7e98505

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

DesignPrinciples.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Need to handle:
2323

2424
Prefer stateless, but statefulness is an optimization.
2525

26+
Prefer false start semantics to reduce round-trip time.
27+
2628
Subscription assumes idempotent redundent delivery!
2729

2830
We are assumming polyglot libraries, we target:

Protocol.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Introduction
22

3+
Key words used by this document conform to the meanings in [RFC 2119](https://tools.ietf.org/html/rfc2119).
4+
35
## Terminology
46

57
* __Frame__: A frame of data containing 1 or more headers chained together that contain data, control,
@@ -239,15 +241,41 @@ the Type, Extension Type, and Header Length fields.
239241

240242
## Connection Establishment
241243

242-
Immediately upon successful connection, the client should send a frame containing a single Setup header with
243-
Stream ID of 0. The client may send requests immediately if it so desires.
244+
__NOTE__: The semantics are similar to [TLS False Start](https://tools.ietf.org/html/draft-bmoeller-tls-falsestart-00).
245+
246+
Immediately upon successful connection, the client MUST send a frame containing a single SETUP header with
247+
Stream ID of 0. The client-side Requester may send requests immediately if it so desires without waiting for
248+
a response from the server.
244249

245-
If the server accepts the contents of the Setup header, it does nothing special.
250+
If the server accepts the contents of the SETUP header, it does nothing special. The server-side Requester may send requests immediately
251+
upon receiving a SETUP header that it accepts.
246252

247-
If the server does NOT accept the contents of the Setup header, the server MUST send back an ERROR on Stream ID 0
253+
If the server does NOT accept the contents of the SETUP header, the server MUST send back an ERROR on Stream ID 0
248254
and then close the connection.
249255

250-
__NOTE__: The semantics are similar to [TLS False Start](https://tools.ietf.org/html/draft-bmoeller-tls-falsestart-00).
256+
A client assumes a SETUP is accepted if it receives a response to a request or if it sees a REQUEST type.
257+
258+
A client assumes a SETUP is rejected if it receives an ERROR with stream ID 0.
259+
260+
### Negotiation
261+
262+
The assumption is that the client will be dictating to the server what it desires to do. The server will decide to support
263+
that SETUP (accept it) or not (reject it).
264+
265+
### Sequences
266+
267+
1. Client-side Request, Server-side __accepts__ SETUP
268+
* Client connects & sends SETUP & sends REQUEST
269+
* Server accepts SETUP, handles REQUEST, sends back normal sequence based on REQUEST type
270+
1. Client-side Request, Server-side __rejects__ SETUP
271+
* Client connects & sends SETUP & sends REQUEST
272+
* Server rejects SETUP, sends back ERROR stream ID 0, closes connection
273+
1. Server-side Request, Server-side __accepts__ SETUP
274+
* Client connects & sends SETUP
275+
* Server accepts SETUP, sends back REQUEST type
276+
1. Server-side Request, Server-side __rejects__ SETUP
277+
* Client connects & sends SETUP
278+
* Server rejects SETUP, sends back ERROR stream ID 0, closes connection
251279

252280
## Fragmentation And Reassembly
253281

@@ -293,6 +321,8 @@ Upon reception, the stream is terminated by the Responder.
293321

294322
Upon being sent, the stream is terminated by the Requester.
295323

324+
REQUEST_FNF are assumed to be best effort and MAY not be processed due to: (1) SETUP rejection, (2) mis-formatting, (3) etc.
325+
296326
### Request Stream
297327

298328
1. RQ -> RS: REQUEST_STREAM
@@ -378,3 +408,5 @@ Upon sending a ERROR, the stream is terminated on the Responder.
378408
1. Protocol instance
379409
* Requester instance
380410
* Responder instance
411+
1. Exlicit METADATA header needed?
412+
* need metadata semantics

0 commit comments

Comments
 (0)