Skip to content

Commit 3423cf1

Browse files
committed
Add an example of the reactive-stream flow-control semantics
In order to ease the reading of people unfamiliar with the reactive-stream flow-control semantics, I inlined an example.
1 parent bc19835 commit 3423cf1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Protocol.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,19 @@ There are multiple flow control mechanics provided by the protocol.
834834

835835
[Reactive Stream](http://www.reactive-streams.org/) semantics for flow control of Streams, Subscriptions, and Channels.
836836

837+
The Requester and the Responder MUST respect the reactive-streams semantics.
838+
839+
e.g. here's an example of a successful stream call with flow-control.
840+
841+
1. RQ -> RS: REQUEST_STREAM (REQUEST_N=3)
842+
1. RS -> RQ: RESPONSE
843+
1. RS -> RQ: RESPONSE
844+
1. RS -> RQ: RESPONSE
845+
1. RS needs to wait for a new REQUEST_N at that point
846+
1. RQ -> RS: REQUEST_N (n=3)
847+
1. RS -> RQ: RESPONSE
848+
1. RS -> RQ: RESPONSE with COMPLETE
849+
837850
#### Lease Semantics
838851

839852
The LEASE semantics are to control the number of indivdiual requests (all types) that a Requester may send in a given period.

0 commit comments

Comments
 (0)