diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-06 18:26:28 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-06 18:26:28 -0800 |
| commit | e1d963b2d35dac0e0332a8654befdb327dc0094c (patch) | |
| tree | dee3d4cdd0fd56e203723413542ddf0d737e74b6 /src/core/protocol.c | |
| parent | f0cf0d11a0ec35fb6c0b65351d5a8bb311dc091d (diff) | |
| download | nng-e1d963b2d35dac0e0332a8654befdb327dc0094c.tar.gz nng-e1d963b2d35dac0e0332a8654befdb327dc0094c.tar.bz2 nng-e1d963b2d35dac0e0332a8654befdb327dc0094c.zip | |
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.
Diffstat (limited to 'src/core/protocol.c')
| -rw-r--r-- | src/core/protocol.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 }; |
