From e1d963b2d35dac0e0332a8654befdb327dc0094c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 6 Jan 2017 18:26:28 -0800 Subject: Initial swag at pipeline (PUSH/PULL). PUSH attempts to do a round-robin based distribution. However, I noticed that there is a bug in REQ, because REQ sockets will continue to pull down work until the first one no longer has room. This can in theory lead to scheduliung imbalances when the load is very light. (Under heavy load, the backpressure dominates.) Also, I note that mangos suffers the same problem. It does not make any attempt to deliver work equally, basically each pipe winds up pulling messages until its own buffers are full. This is bad. We can borrow the logic here for both REQ and mangos. None of this is tested yet. --- src/core/protocol.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/protocol.c') diff --git a/src/core/protocol.c b/src/core/protocol.c index 5f23bf63..8cd1048f 100644 --- a/src/core/protocol.c +++ b/src/core/protocol.c @@ -21,6 +21,8 @@ extern nni_proto nni_rep_proto; extern nni_proto nni_req_proto; extern nni_proto nni_pub_proto; extern nni_proto nni_sub_proto; +extern nni_proto nni_push_proto; +extern nni_proto nni_pull_proto; static nni_proto *protocols[] = { &nni_pair_proto, @@ -28,6 +30,8 @@ static nni_proto *protocols[] = { &nni_req_proto, &nni_pub_proto, &nni_sub_proto, + &nni_push_proto, + &nni_pull_proto, NULL }; -- cgit v1.2.3-70-g09d2