GitHub user ChugR opened a pull request:

    https://github.com/apache/qpid-dispatch/pull/173

    DISPATCH-760: Message annotation handling improvements

    This PR replaces existing annotation handling with a more efficient 
version. It is fully compatible with 0.8.x.
    It contains the same stuff as 
[pr171](https://github.com/apache/qpid-dispatch/pull/171) with the addition of 
five commits (b321fa2..50637b7) to clean up and satisfy review comments
    
    A comparison with 0.8.x has run on a single laptop. A sender sends a short 
message with a varying number of 10-byte user annotations to an ingress router 
A. Router A sends the messages to egress router B. A single client is attached 
to router B. This comparison is not rigorous and at the 
50-annotation-per-message level the producer started to be the limiting factor. 
    
    Messages per second. Number of annotations, Nanno, vs router code version, 
0.8.x or new.
    
    | Nanno |   0.8.x   |  new |
    |----------|-----------|--------|
    | 0         |    26500 | 32000 |
    | 1         |   24000  | 31200 |
    | 5         |    18000 | 30100 |
    | 10       |    14200 | 28500 |
    | 20       |    8200   | 24400 |
    | 50       |    3500   | 11300 |
    
    This PR performance numbers are down a little bit from the last PR. This PR 
does a little extra work to prevent router annotations from being spoofed by 
user annotations.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ChugR/qpid-dispatch crolke-DISPATCH-760-3

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-dispatch/pull/173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #173
    
----
commit 1c3b0dd6f2e64718242c3da152ae56312ab2d365
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-06-30T15:04:17Z

    DISPATCH-760: accessor for connection status: interrouter vs user

commit 6e8b56e5b5b7b2a5ea1e65b34c2f93c885bbb599
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-06-30T15:46:43Z

    DISPATCH-760: add opaque compose map item insertion functions

commit cf2c76a924de2a487a92d294b2f2de39506a30ee
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-06-30T15:56:08Z

    DISPATCH-760: promote pointer_t to public qd_iterator_pointer_t

commit 7f650d8f9f3106942201b0b6ddc7eb4fe434a9a9
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-06-30T16:30:35Z

    DISPATCH-760: Add prefix search functions that use iterator pointers

commit b67b2013fd6c666c80119704821b22c8ee431257
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-06-30T20:57:17Z

    DISPATCH-760: Add new annotation parser

commit 21014c6e9f8dd2ea05551f341487a9d486c074cd
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-01T19:01:56Z

    DISPATCH-760: Message handling uses new scheme

commit 3b05873fcd0f04fda3682e42b024be0ff60babca
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-01T19:51:00Z

    DISPATCH-760: compare key names using strcmp not iter_equal

commit 95a05563a71cba7a46ce5f462a89e4f6b0e610d7
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-03T15:23:39Z

    DISPATCH-760: Get self tests going
    
    Get rid of is_interrouter flag in favor of existing strip_annotations flags.
    Pass strip_annotations_in through message to parse function.

commit cd7d5128ea9ece90ce1236ad027f5c4f448656df
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-03T16:05:36Z

    DISPATCH-760: Fix inbound annotation stripping

commit b321fa26579470107fbeadc3815488155db273fd
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-05T21:45:06Z

    DISPATCH-760: don't re-strip inbound annotations

commit 40cb7c1ef8811b1a948f9233cd99e128d3089c15
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-06T11:03:16Z

    DISPATCH-760: improve annotation V0 logic

commit 425c898f623b973d30e98e1e971c70faff944da0
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-06T13:03:41Z

    DISPATCH-760: Prevent user anno's from being considered in routing logic
    
    Always provide four routing annotations by padding if necessary.

commit 9672b71912f50a18df0ce392e8775077336b5553
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-06T17:16:03Z

    DISPATCH-760: remove strip flag
    
    The flag is only set false and is not needed.

commit 50637b770400e106bfb1c2e2ad7c57f8f8b2321e
Author: Chuck Rolke <cro...@redhat.com>
Date:   2017-07-06T20:14:35Z

    DISPATCH-760: Change magic numbers into formal constants
    
    Router message annotation uses some of map keys and will at most
    use QD_MA_N_KEYS annotation entries.
    
    The longest key strlen is QD_MA_MAX_KEY_LEN bytes.
    
    Router message annotation keys are at the end of the annotation
    section. Code uses a sliding window to avoid searching each key
    for the router prefix that indicates a router annotation. The
    size of the sliding filter is QD_MA_FILTER_LEN map entries.
    
    When QD_MA_FILTER_LEN is larger than QD_MA_N_KEYS then the extra
    space may hold a future router version's new keys and successfully
    strip them from the input stream.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to