qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Sim" <g...@redhat.com>
Subject Re: Review Request 28770: Some engine examples and supporting library code
Date Mon, 08 Dec 2014 11:59:02 GMT

> On Dec. 5, 2014, 10:24 p.m., Rafael Schloming wrote:
> > proton-c/bindings/python/proton/__init__.py, line 3542
> > <https://reviews.apache.org/r/28770/diff/1/?file=784021#file784021line3542>
> >
> >     To expand on my question here, I'd also like to understand if this __getattr__
is just an expedient way of copying a specific set of attributes from the context into the
event or if it is actually your intent to flatten any arbitrary context properties into the
event object.

What I want is a 'uniform' interface to an event. I.e. rather than the event-type dependent
context being the only thing directly exposed, I'd like the connection property to be available
for any event that is in any way associated with a connection (even if it is say a delivery-
or link- event), likewise for sessions and links. So whether I'm handing an incoming message,
a change in credit, or perhaps even a change in endpoint state, I can get the relevant objects
via the same property rather than having deducing the context type and figure out how to get
what I want from that.

I'd like to be able to keep this same interface even for 'extended' events created outside
the core engine - e.g. perhaps a timer for retrying a disconnected connection, or an application
defined event indicating availability of data to send on a given link. The extended events
however may additionally have some other properties.

So getting back to the question now the high level goal is (hopefully!) explained, the context
seems to me like an internal detail. What I care about as a user is getting the connection
or link or session or foo from the event. The context is just the mechanism that makes this
work via swig etc. As a user I don't want to distinguish between context and the event itself.

- Gordon

This is an automatically generated e-mail. To reply, visit:

On Dec. 5, 2014, 8:55 p.m., Gordon Sim wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28770/
> -----------------------------------------------------------
> (Updated Dec. 5, 2014, 8:55 p.m.)
> Review request for qpid and Rafael Schloming.
> Repository: qpid-proton-git
> Description
> -------
> These are the current reactive examples using the engine API, that I have been evolving
on the examples branch, alog with the utility code they depend on. I still need to evolve/rationalise
the examples themselves as well as the utility code, but I believe it would be beneficial
to all to do this from the master branch.
> Diffs
> -----
>   examples/engine/py/abstract_server.py PRE-CREATION 
>   examples/engine/py/client.py PRE-CREATION 
>   examples/engine/py/client_http.py PRE-CREATION 
>   examples/engine/py/common.py PRE-CREATION 
>   examples/engine/py/db_common.py PRE-CREATION 
>   examples/engine/py/db_ctrl.py PRE-CREATION 
>   examples/engine/py/db_recv.py PRE-CREATION 
>   examples/engine/py/db_send.py PRE-CREATION 
>   examples/engine/py/helloworld.py PRE-CREATION 
>   examples/engine/py/helloworld_blocking.py PRE-CREATION 
>   examples/engine/py/helloworld_direct.py PRE-CREATION 
>   examples/engine/py/helloworld_direct_tornado.py PRE-CREATION 
>   examples/engine/py/helloworld_tornado.py PRE-CREATION 
>   examples/engine/py/proton_server.py PRE-CREATION 
>   examples/engine/py/proton_tornado.py PRE-CREATION 
>   examples/engine/py/recurring_timer.py PRE-CREATION 
>   examples/engine/py/recurring_timer_tornado.py PRE-CREATION 
>   examples/engine/py/selected_recv.py PRE-CREATION 
>   examples/engine/py/server.py PRE-CREATION 
>   examples/engine/py/server_tx.py PRE-CREATION 
>   examples/engine/py/simple_recv.py PRE-CREATION 
>   examples/engine/py/simple_send.py PRE-CREATION 
>   examples/engine/py/sync_client.py PRE-CREATION 
>   examples/engine/py/tx_recv.py PRE-CREATION 
>   examples/engine/py/tx_recv_interactive.py PRE-CREATION 
>   examples/engine/py/tx_send.py PRE-CREATION 
>   examples/engine/py/tx_send_sync.py PRE-CREATION 
>   proton-c/bindings/python/CMakeLists.txt 6be421e237f86f2aa99c23ffbc08af821b5c8438 
>   proton-c/bindings/python/proton/__init__.py fce3255bfce440dcae57457d259147a4ced8216e

>   proton-c/bindings/python/proton/handlers.py PRE-CREATION 
>   proton-c/bindings/python/proton/reactors.py PRE-CREATION 
>   proton-c/bindings/python/proton/utils.py PRE-CREATION 
> Diff: https://reviews.apache.org/r/28770/diff/
> Testing
> -------
> All examples have been tested, note that the transactional examples require a couple
of extra proton-c patches (available on respective JIRAs) in order to run correctly.
> Thanks,
> Gordon Sim

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message