You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by aconway <ac...@redhat.com> on 2015/11/03 00:23:26 UTC

c++: engine API and example of integrating with select()

I have added an "engine" class to the C++ binding to simplify
integration with external IO. Interested in feedback.

 https://issues.apache.org/jira/browse/PROTON-1036

There is an example select-based broker using the new API. I split the
broker code into a common part shared by all the example brokers, in
particular note the queue and handler logic are identical for the
container- and engine- based brokers.

https://github.com/apache/qpid-proton/blob/master/examples/cpp/broker.h
pp

The select-specific broker: 

https://github.com/apache/qpid-proton/blob/master/examples/cpp/select_b
roker.cpp


>From the docs:

`proton::engine` provides fewer facilities that `proton::container` but
makes fewer (no) assumptions about application threading and IO. It may
be easier to integrate with an existing IO framework, for multi
-threaded applications or for non-socket IO. See the \ref
select_broker.cpp example. The main application and AMQP logic is
implemented the same way using the engine or the container.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: c++: engine API and example of integrating with select()

Posted by aconway <ac...@redhat.com>.
On Mon, 2015-11-09 at 18:20 -0500, Justin Ross wrote:
> I think this looks good.
> 
> I've seen the anonymous sender handling pop up enough, and it
> contains
> enough complexity, that I think we should look into a standard
> handler
> or utility for it.

I'm not sure what you mean by "anonymous sender handling".

On Mon, Nov 2, 2015 at 6:23 PM, aconway <ac...@redhat.com> wrote:
> > I have added an "engine" class to the C++ binding to simplify
> > integration with external IO. Interested in feedback.
> > 
> >  https://issues.apache.org/jira/browse/PROTON-1036
> > 
> > There is an example select-based broker using the new API. I split
> > the
> > broker code into a common part shared by all the example brokers,
> > in
> > particular note the queue and handler logic are identical for the
> > container- and engine- based brokers.
> > 
> > https://github.com/apache/qpid-proton/blob/master/examples/cpp/brok
> > er.h
> > pp
> > 
> > The select-specific broker:
> > 
> > https://github.com/apache/qpid-proton/blob/master/examples/cpp/sele
> > ct_b
> > roker.cpp
> > 
> > 
> > From the docs:
> > 
> > `proton::engine` provides fewer facilities that `proton::container`
> > but
> > makes fewer (no) assumptions about application threading and IO. It
> > may
> > be easier to integrate with an existing IO framework, for multi
> > -threaded applications or for non-socket IO. See the \ref
> > select_broker.cpp example. The main application and AMQP logic is
> > implemented the same way using the engine or the container.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: c++: engine API and example of integrating with select()

Posted by Justin Ross <jr...@redhat.com>.
I think this looks good.

I've seen the anonymous sender handling pop up enough, and it contains
enough complexity, that I think we should look into a standard handler
or utility for it.

On Mon, Nov 2, 2015 at 6:23 PM, aconway <ac...@redhat.com> wrote:
> I have added an "engine" class to the C++ binding to simplify
> integration with external IO. Interested in feedback.
>
>  https://issues.apache.org/jira/browse/PROTON-1036
>
> There is an example select-based broker using the new API. I split the
> broker code into a common part shared by all the example brokers, in
> particular note the queue and handler logic are identical for the
> container- and engine- based brokers.
>
> https://github.com/apache/qpid-proton/blob/master/examples/cpp/broker.h
> pp
>
> The select-specific broker:
>
> https://github.com/apache/qpid-proton/blob/master/examples/cpp/select_b
> roker.cpp
>
>
> From the docs:
>
> `proton::engine` provides fewer facilities that `proton::container` but
> makes fewer (no) assumptions about application threading and IO. It may
> be easier to integrate with an existing IO framework, for multi
> -threaded applications or for non-socket IO. See the \ref
> select_broker.cpp example. The main application and AMQP logic is
> implemented the same way using the engine or the container.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org