[
https://issues.apache.org/jira/browse/PROTON-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121813#comment-14121813
]
Cliff Jansen commented on PROTON-640:
-------------------------------------
from https://reviews.apache.org/r/24159
This patch follows the QPID AsynchIO.cpp version fairly closely with the
following main differences:
- addition of async connect
- multiple outstanding concurrent writes (a write pipeline)
- non-buffered reads
- graceful close progressing to hard close (much as proposed in QPID-5668)
Careful scrutiny of the selector API change is warranted (constructor).
Thread safety is currently assured only by isolating a paired pn_selector_t and
pn_io_t from other such pairs. If anticipated use cases suggest either that
multiple selectors be used with an io, or with multiple io's, or that a socket
should be movable between selectors during it's lifetime, then additional
locking semantics will be required. These scenarios come for free in Linux
where the OS barrier takes care of concurrency issues. By contrast, the Windows
code implements the selector in user space.
This API change just forces the pairing of the selector with the io. The user
is still expected to free the selector when done. Perhaps this should be
handled by the io when it closes, or some alternative API mechanism should be
used. In any event, if the supported use cases preclude closely linking one
selector with one io, then this is moot.
Performance notes. The use of a write pipeline has a significant effect on
sending performance, especially with a small number of connections. It would
probably be a useful enhancement for the QPID code. On the read side, no async
read buffer is used (relying instead on the OS input buffering system). This is
because pn_recv() copies out the bytes anyway (rather than passing a buffer as
in QPID).
> IO completion port Windows IO for Proton
> ----------------------------------------
>
> Key: PROTON-640
> URL: https://issues.apache.org/jira/browse/PROTON-640
> Project: Qpid Proton
> Issue Type: Improvement
> Components: proton-c
> Affects Versions: 0.7
> Environment: Windows
> Reporter: Cliff Jansen
> Assignee: Cliff Jansen
> Fix For: 0.8
>
>
> Provide a native IO completion port layer similar to the C++ QPID version for
> Proton.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)