You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2016/03/22 15:09:20 UTC

Review Request 45161: PROTON-1161 - c++: better interface to connection_engine.

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

Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Bugs: PROTON-1161
    https://issues.apache.org/jira/browse/PROTON-1161


Repository: qpid-proton-git


Description
-------

More flexible connection_engine interface to support reactor and proactor patterns.
Provides direct access to proton buffers for minimal copies in either case.

connection_engine is now completely IO and thread neutral, it simply handles:

    bytes-in -> events as handler function calls -> bytes-out

Moved connection_engine and related classes into the proton::io namespace.

Cleaned up engine implementation, improved the unit tests.


Diffs
-----

  examples/cpp/engine/broker.cpp f5e9205723ed305ce0e5b778fcfb7e0b7942eb2a 
  examples/cpp/engine/client.cpp a010d0ff87c4b3777932f6e6442a61f9a1a71b43 
  examples/cpp/engine/direct_recv.cpp 3579310392b9c9030a42c21f67d440af817ede25 
  examples/cpp/engine/direct_send.cpp e3c632d236bc44cd62a5f80129c1634f4ccb0335 
  examples/cpp/engine/helloworld.cpp 43c4a03f90acb284e1cd361cd7d44f8923de2bc4 
  examples/cpp/engine/server.cpp 92ee0449cad0f141eab72238666decc5e3bb362f 
  examples/cpp/engine/simple_recv.cpp 1d07a969f1da096159b947ffccb5b30674a1abed 
  examples/cpp/engine/simple_send.cpp 5bb0142ac1ae414f259e26b1fe5ab1d3d54957f3 
  examples/cpp/example_test.py 6cfc632c2d5dc93764ff3ca5e360eb6cc22c40c4 
  proton-c/bindings/cpp/CMakeLists.txt ebd38c1e959b4cfe85e92bbfc98da6d8dc3c1f75 
  proton-c/bindings/cpp/include/proton/connection.hpp da7f806c745e2c52c4d2677fea669105d8c703ce 
  proton-c/bindings/cpp/include/proton/connection_engine.hpp 0b1a947a6092d68ae6d229a2dc01883c14cc8795 
  proton-c/bindings/cpp/include/proton/connection_options.hpp 71e12f1136c5e90eb5cf4c2c7be971487199f7e5 
  proton-c/bindings/cpp/include/proton/handler.hpp 3bc0023d4347accf3036afc3d5cb6bbb432123d0 
  proton-c/bindings/cpp/include/proton/io.hpp 9c63edb8a1b11b286c66d81ff2beed87406f4123 
  proton-c/bindings/cpp/include/proton/io/connection_engine.hpp PRE-CREATION 
  proton-c/bindings/cpp/include/proton/transport.hpp 9e32ac508a6c711b912aaadcb7bea5923e6b47e1 
  proton-c/bindings/cpp/src/connection_engine.cpp be9efebfd24793cd29ba955d023e8c62f54dab69 
  proton-c/bindings/cpp/src/contexts.hpp b4fcdba385317a5b6ac3b2a33ffd08336f67b1a4 
  proton-c/bindings/cpp/src/engine_test.cpp a10842a1fe663a35536a753fec1b82de391e8f40 
  proton-c/bindings/cpp/src/io/connection_engine.cpp PRE-CREATION 
  proton-c/bindings/cpp/src/posix/io.cpp be9db444562a379a500c8d86f5ad908a89aad424 
  proton-c/bindings/cpp/src/test_bits.hpp 38cd7a8a61afcb096d69c259707a845b1236855f 
  proton-c/bindings/cpp/src/value_test.cpp fe7c0899724d1fef601c587dd6d4d83ac6c867e3 
  proton-c/bindings/cpp/src/windows/io.cpp 52f5fc0a6aa690e3a52dbe58069c2699ba0925bd 

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


Testing
-------

ctest on linux. Windows support coming before commit.


Thanks,

Alan Conway


Re: Review Request 45161: PROTON-1161 - c++: better interface to connection_engine.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45161/
-----------------------------------------------------------

(Updated March 22, 2016, 6:30 p.m.)


Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Changes
-------

Working on windows.


Bugs: PROTON-1161
    https://issues.apache.org/jira/browse/PROTON-1161


Repository: qpid-proton-git


Description
-------

More flexible connection_engine interface to support reactor and proactor patterns.
Provides direct access to proton buffers for minimal copies in either case.

connection_engine is now completely IO and thread neutral, it simply handles:

    bytes-in -> events as handler function calls -> bytes-out

Moved connection_engine and related classes into the proton::io namespace.

Cleaned up engine implementation, improved the unit tests.


Diffs (updated)
-----

  examples/cpp/engine/broker.cpp f5e9205723ed305ce0e5b778fcfb7e0b7942eb2a 
  examples/cpp/engine/client.cpp a010d0ff87c4b3777932f6e6442a61f9a1a71b43 
  examples/cpp/engine/direct_recv.cpp 3579310392b9c9030a42c21f67d440af817ede25 
  examples/cpp/engine/direct_send.cpp e3c632d236bc44cd62a5f80129c1634f4ccb0335 
  examples/cpp/engine/helloworld.cpp 43c4a03f90acb284e1cd361cd7d44f8923de2bc4 
  examples/cpp/engine/server.cpp 92ee0449cad0f141eab72238666decc5e3bb362f 
  examples/cpp/engine/simple_recv.cpp 1d07a969f1da096159b947ffccb5b30674a1abed 
  examples/cpp/engine/simple_send.cpp 5bb0142ac1ae414f259e26b1fe5ab1d3d54957f3 
  examples/cpp/example_test.py 6cfc632c2d5dc93764ff3ca5e360eb6cc22c40c4 
  proton-c/bindings/cpp/CMakeLists.txt 26a7c9451b1a5398f5cc8ec8d25024a5dc6a9c54 
  proton-c/bindings/cpp/docs/mainpage.md f20d9573f2b8d566383ff0729915b6b2732e42ff 
  proton-c/bindings/cpp/docs/tutorial.dox dcfbe057d1f2a0c9a6df840d2e4bb193d33c4b87 
  proton-c/bindings/cpp/include/proton/connection.hpp da7f806c745e2c52c4d2677fea669105d8c703ce 
  proton-c/bindings/cpp/include/proton/connection_engine.hpp 0b1a947a6092d68ae6d229a2dc01883c14cc8795 
  proton-c/bindings/cpp/include/proton/connection_options.hpp 1a22b73b3092c98f40687ab6aba83b63cf379cf0 
  proton-c/bindings/cpp/include/proton/handler.hpp 6ea11d46c5ee6602eda790e0bf2c4261dd2ababe 
  proton-c/bindings/cpp/include/proton/io.hpp 9c63edb8a1b11b286c66d81ff2beed87406f4123 
  proton-c/bindings/cpp/include/proton/io/connection_engine.hpp PRE-CREATION 
  proton-c/bindings/cpp/include/proton/transport.hpp 9e32ac508a6c711b912aaadcb7bea5923e6b47e1 
  proton-c/bindings/cpp/src/connection_engine.cpp be9efebfd24793cd29ba955d023e8c62f54dab69 
  proton-c/bindings/cpp/src/contexts.hpp 03271a12f5f1d59fb361255d74f775ed8dfda92d 
  proton-c/bindings/cpp/src/engine_test.cpp a10842a1fe663a35536a753fec1b82de391e8f40 
  proton-c/bindings/cpp/src/io/connection_engine.cpp PRE-CREATION 
  proton-c/bindings/cpp/src/posix/io.cpp be9db444562a379a500c8d86f5ad908a89aad424 
  proton-c/bindings/cpp/src/scalar_test.cpp b5955d567d61bb34ff69912ff550aa5d70ea1c70 
  proton-c/bindings/cpp/src/test_bits.hpp 38cd7a8a61afcb096d69c259707a845b1236855f 
  proton-c/bindings/cpp/src/value_test.cpp d636ffa6a96db6fb2ad0082da51e8e4b3c8141f7 
  proton-c/bindings/cpp/src/windows/io.cpp 52f5fc0a6aa690e3a52dbe58069c2699ba0925bd 

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


Testing
-------

ctest on linux. Windows support coming before commit.


Thanks,

Alan Conway


Re: Review Request 45161: PROTON-1161 - c++: better interface to connection_engine.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45161/
-----------------------------------------------------------

(Updated March 22, 2016, 3:27 p.m.)


Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Changes
-------

Fix error handling.


Bugs: PROTON-1161
    https://issues.apache.org/jira/browse/PROTON-1161


Repository: qpid-proton-git


Description
-------

More flexible connection_engine interface to support reactor and proactor patterns.
Provides direct access to proton buffers for minimal copies in either case.

connection_engine is now completely IO and thread neutral, it simply handles:

    bytes-in -> events as handler function calls -> bytes-out

Moved connection_engine and related classes into the proton::io namespace.

Cleaned up engine implementation, improved the unit tests.


Diffs (updated)
-----

  examples/cpp/engine/broker.cpp f5e9205723ed305ce0e5b778fcfb7e0b7942eb2a 
  examples/cpp/engine/client.cpp a010d0ff87c4b3777932f6e6442a61f9a1a71b43 
  examples/cpp/engine/direct_recv.cpp 3579310392b9c9030a42c21f67d440af817ede25 
  examples/cpp/engine/direct_send.cpp e3c632d236bc44cd62a5f80129c1634f4ccb0335 
  examples/cpp/engine/helloworld.cpp 43c4a03f90acb284e1cd361cd7d44f8923de2bc4 
  examples/cpp/engine/server.cpp 92ee0449cad0f141eab72238666decc5e3bb362f 
  examples/cpp/engine/simple_recv.cpp 1d07a969f1da096159b947ffccb5b30674a1abed 
  examples/cpp/engine/simple_send.cpp 5bb0142ac1ae414f259e26b1fe5ab1d3d54957f3 
  examples/cpp/example_test.py 6cfc632c2d5dc93764ff3ca5e360eb6cc22c40c4 
  proton-c/bindings/cpp/CMakeLists.txt ebd38c1e959b4cfe85e92bbfc98da6d8dc3c1f75 
  proton-c/bindings/cpp/docs/mainpage.md f20d9573f2b8d566383ff0729915b6b2732e42ff 
  proton-c/bindings/cpp/docs/tutorial.dox dcfbe057d1f2a0c9a6df840d2e4bb193d33c4b87 
  proton-c/bindings/cpp/include/proton/connection.hpp da7f806c745e2c52c4d2677fea669105d8c703ce 
  proton-c/bindings/cpp/include/proton/connection_engine.hpp 0b1a947a6092d68ae6d229a2dc01883c14cc8795 
  proton-c/bindings/cpp/include/proton/connection_options.hpp 71e12f1136c5e90eb5cf4c2c7be971487199f7e5 
  proton-c/bindings/cpp/include/proton/handler.hpp 3bc0023d4347accf3036afc3d5cb6bbb432123d0 
  proton-c/bindings/cpp/include/proton/io.hpp 9c63edb8a1b11b286c66d81ff2beed87406f4123 
  proton-c/bindings/cpp/include/proton/io/connection_engine.hpp PRE-CREATION 
  proton-c/bindings/cpp/include/proton/transport.hpp 9e32ac508a6c711b912aaadcb7bea5923e6b47e1 
  proton-c/bindings/cpp/src/connection_engine.cpp be9efebfd24793cd29ba955d023e8c62f54dab69 
  proton-c/bindings/cpp/src/contexts.hpp b4fcdba385317a5b6ac3b2a33ffd08336f67b1a4 
  proton-c/bindings/cpp/src/engine_test.cpp a10842a1fe663a35536a753fec1b82de391e8f40 
  proton-c/bindings/cpp/src/io/connection_engine.cpp PRE-CREATION 
  proton-c/bindings/cpp/src/posix/io.cpp be9db444562a379a500c8d86f5ad908a89aad424 
  proton-c/bindings/cpp/src/scalar_test.cpp b5955d567d61bb34ff69912ff550aa5d70ea1c70 
  proton-c/bindings/cpp/src/test_bits.hpp 38cd7a8a61afcb096d69c259707a845b1236855f 
  proton-c/bindings/cpp/src/value_test.cpp fe7c0899724d1fef601c587dd6d4d83ac6c867e3 
  proton-c/bindings/cpp/src/windows/io.cpp 52f5fc0a6aa690e3a52dbe58069c2699ba0925bd 

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


Testing
-------

ctest on linux. Windows support coming before commit.


Thanks,

Alan Conway


Re: Review Request 45161: PROTON-1161 - c++: better interface to connection_engine.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45161/
-----------------------------------------------------------

(Updated March 22, 2016, 3:12 p.m.)


Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Changes
-------

Simplified end-of-life handling and fixed up example code.


Bugs: PROTON-1161
    https://issues.apache.org/jira/browse/PROTON-1161


Repository: qpid-proton-git


Description
-------

More flexible connection_engine interface to support reactor and proactor patterns.
Provides direct access to proton buffers for minimal copies in either case.

connection_engine is now completely IO and thread neutral, it simply handles:

    bytes-in -> events as handler function calls -> bytes-out

Moved connection_engine and related classes into the proton::io namespace.

Cleaned up engine implementation, improved the unit tests.


Diffs (updated)
-----

  examples/cpp/engine/broker.cpp f5e9205723ed305ce0e5b778fcfb7e0b7942eb2a 
  examples/cpp/engine/client.cpp a010d0ff87c4b3777932f6e6442a61f9a1a71b43 
  examples/cpp/engine/direct_recv.cpp 3579310392b9c9030a42c21f67d440af817ede25 
  examples/cpp/engine/direct_send.cpp e3c632d236bc44cd62a5f80129c1634f4ccb0335 
  examples/cpp/engine/helloworld.cpp 43c4a03f90acb284e1cd361cd7d44f8923de2bc4 
  examples/cpp/engine/server.cpp 92ee0449cad0f141eab72238666decc5e3bb362f 
  examples/cpp/engine/simple_recv.cpp 1d07a969f1da096159b947ffccb5b30674a1abed 
  examples/cpp/engine/simple_send.cpp 5bb0142ac1ae414f259e26b1fe5ab1d3d54957f3 
  examples/cpp/example_test.py 6cfc632c2d5dc93764ff3ca5e360eb6cc22c40c4 
  proton-c/bindings/cpp/CMakeLists.txt ebd38c1e959b4cfe85e92bbfc98da6d8dc3c1f75 
  proton-c/bindings/cpp/docs/mainpage.md f20d9573f2b8d566383ff0729915b6b2732e42ff 
  proton-c/bindings/cpp/docs/tutorial.dox dcfbe057d1f2a0c9a6df840d2e4bb193d33c4b87 
  proton-c/bindings/cpp/include/proton/connection.hpp da7f806c745e2c52c4d2677fea669105d8c703ce 
  proton-c/bindings/cpp/include/proton/connection_engine.hpp 0b1a947a6092d68ae6d229a2dc01883c14cc8795 
  proton-c/bindings/cpp/include/proton/connection_options.hpp 71e12f1136c5e90eb5cf4c2c7be971487199f7e5 
  proton-c/bindings/cpp/include/proton/handler.hpp 3bc0023d4347accf3036afc3d5cb6bbb432123d0 
  proton-c/bindings/cpp/include/proton/io.hpp 9c63edb8a1b11b286c66d81ff2beed87406f4123 
  proton-c/bindings/cpp/include/proton/io/connection_engine.hpp PRE-CREATION 
  proton-c/bindings/cpp/include/proton/transport.hpp 9e32ac508a6c711b912aaadcb7bea5923e6b47e1 
  proton-c/bindings/cpp/src/connection_engine.cpp be9efebfd24793cd29ba955d023e8c62f54dab69 
  proton-c/bindings/cpp/src/contexts.hpp b4fcdba385317a5b6ac3b2a33ffd08336f67b1a4 
  proton-c/bindings/cpp/src/engine_test.cpp a10842a1fe663a35536a753fec1b82de391e8f40 
  proton-c/bindings/cpp/src/io/connection_engine.cpp PRE-CREATION 
  proton-c/bindings/cpp/src/posix/io.cpp be9db444562a379a500c8d86f5ad908a89aad424 
  proton-c/bindings/cpp/src/scalar_test.cpp b5955d567d61bb34ff69912ff550aa5d70ea1c70 
  proton-c/bindings/cpp/src/test_bits.hpp 38cd7a8a61afcb096d69c259707a845b1236855f 
  proton-c/bindings/cpp/src/value_test.cpp fe7c0899724d1fef601c587dd6d4d83ac6c867e3 
  proton-c/bindings/cpp/src/windows/io.cpp 52f5fc0a6aa690e3a52dbe58069c2699ba0925bd 

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


Testing
-------

ctest on linux. Windows support coming before commit.


Thanks,

Alan Conway