You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Cliff Jansen (Created) (JIRA)" <ji...@apache.org> on 2011/11/02 08:49:32 UTC

[jira] [Created] (QPID-3571) A generic Posix poller implementation

A generic Posix poller implementation
-------------------------------------

                 Key: QPID-3571
                 URL: https://issues.apache.org/jira/browse/QPID-3571
             Project: Qpid
          Issue Type: Improvement
          Components: C++ Broker, C++ Client
    Affects Versions: Future
         Environment: Platforms that support the posix definition of the poll() call.
            Reporter: Cliff Jansen
            Assignee: Cliff Jansen


An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179828#comment-13179828 ] 

jiraposter@reviews.apache.org commented on QPID-3571:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3386/
-----------------------------------------------------------

Review request for qpid, Andrew Stitcher, Ted Ross, and Steve Huston.


Summary
-------

Portable qpid::sys::Poller implementation for Posix systems.

Modelled as closely as possible to the EpollPoller implementation.


This addresses bug QPID-3571.
    https://issues.apache.org/jira/browse/QPID-3571


Diffs
-----

  /svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixPoller.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/3386/diff


Testing
-------

linux

solaris (x86, sparc, gcc, native sunstudio compilers)


Thanks,

Cliff


                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "Steve Huston (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178083#comment-13178083 ] 

Steve Huston commented on QPID-3571:
------------------------------------

What's happening with this effort? It's been a while since the last comment/review - is this ready to check in, Cliff?
                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3571) A generic Posix poller implementation

Posted by "Cliff Jansen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cliff Jansen updated QPID-3571:
-------------------------------

    Attachment: QPID-3571-1.patch

This code satisfies "make check" on Linux.

It also compiles with gcc 4.4.5 on Solaris 5.10.  It runs, but not very stably yet.

CMake updates will follow.  For now, I just copy the code over top of the EpollPoller or ECFPoller code on Linux or Solaris.
                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "Steve Huston (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144487#comment-13144487 ] 

Steve Huston commented on QPID-3571:
------------------------------------

Looks good in general. There are a number of mentions of "epoll" which could be changed to reflect the demux mechanism in use. Also, some comments to explain better what's going on would be good.

Would also be worth a post on review board - may attract better feedback.
                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180047#comment-13180047 ] 

jiraposter@reviews.apache.org commented on QPID-3571:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3386/#review4192
-----------------------------------------------------------


Nit... there are a few trailing spaces, noted by red in the review diff.

There's a qpid/sys/PipeHandle.h that you may be able to use in the SignalPipe class, though there may not be too much benefit to that.

In EventStream::next, does the wait on serializer decrease the timeout? If not, the wait may end up longer than the caller requested.

Other than that, it's good!

- Steve


On 2012-01-04 20:12:57, Cliff Jansen wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3386/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-04 20:12:57)
bq.  
bq.  
bq.  Review request for qpid, Andrew Stitcher, Ted Ross, and Steve Huston.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Portable qpid::sys::Poller implementation for Posix systems.
bq.  
bq.  Modelled as closely as possible to the EpollPoller implementation.
bq.  
bq.  
bq.  This addresses bug QPID-3571.
bq.      https://issues.apache.org/jira/browse/QPID-3571
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixPoller.cpp PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3386/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  linux
bq.  
bq.  solaris (x86, sparc, gcc, native sunstudio compilers)
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.


                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194150#comment-13194150 ] 

jiraposter@reviews.apache.org commented on QPID-3571:
-----------------------------------------------------



bq.  On 2012-01-05 00:41:30, Steve Huston wrote:
bq.  > Nit... there are a few trailing spaces, noted by red in the review diff.
bq.  > 
bq.  > There's a qpid/sys/PipeHandle.h that you may be able to use in the SignalPipe class, though there may not be too much benefit to that.
bq.  > 
bq.  > In EventStream::next, does the wait on serializer decrease the timeout? If not, the wait may end up longer than the caller requested.
bq.  > 
bq.  > Other than that, it's good!

Steve, thanks very much for your time reviewing this code... several times!

I will fix the spaces :-)

The timeout (qpid::sys::Duration) is converted to an absolute time (targetTimeout) prior to entering the loop.  The targetTimeout does not need further adjusting from within the loop.

The pre-existing PipeHandle class exposes read and write calls on the pipe whereas the poller's SignalPipe hides them (in order to minimize them).  The remaining overlap between them is very small, so I don't think there is much to be gained by trying to re-jig either one.


- Cliff


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3386/#review4192
-----------------------------------------------------------


On 2012-01-04 20:12:57, Cliff Jansen wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3386/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-04 20:12:57)
bq.  
bq.  
bq.  Review request for qpid, Andrew Stitcher, Ted Ross, and Steve Huston.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Portable qpid::sys::Poller implementation for Posix systems.
bq.  
bq.  Modelled as closely as possible to the EpollPoller implementation.
bq.  
bq.  
bq.  This addresses bug QPID-3571.
bq.      https://issues.apache.org/jira/browse/QPID-3571
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixPoller.cpp PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3386/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  linux
bq.  
bq.  solaris (x86, sparc, gcc, native sunstudio compilers)
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cliff
bq.  
bq.


                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "Martin Benes (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143021#comment-13143021 ] 

Martin Benes commented on QPID-3571:
------------------------------------

Succesfully tested with a client test programs on sparc solaris 10. It sends and receives all the messages, however dumps core file just before the end of the program (no matter, how many messages are processed). Probably some resource release problem?

I was unable to test it in a broker because of some unrelated link problems. Will try to find the problem.
                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3571) A generic Posix poller implementation

Posted by "Martin Benes (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150623#comment-13150623 ] 

Martin Benes commented on QPID-3571:
------------------------------------

Somehow i am unable to get the code to crash anymore on sparc/x86 solaris 5.10. Linux build seems also alright. Perhaps my previous builds were somehow differently damaged.
So the patch seems to be working correctly.
                
> A generic Posix poller implementation
> -------------------------------------
>
>                 Key: QPID-3571
>                 URL: https://issues.apache.org/jira/browse/QPID-3571
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: Future
>         Environment: Platforms that support the posix definition of the poll() call.
>            Reporter: Cliff Jansen
>            Assignee: Cliff Jansen
>         Attachments: QPID-3571-1.patch
>
>
> An implementation of qpid::sys::Poller that is portable to any OS that supports poll() (as defined in the posix specification for sockets and pipes) is useful for future porting work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org