On Tue, 2012-02-28 at 19:08 +0000, Gordon Sim wrote: > On 02/28/2012 06:00 PM, Andrew Stitcher wrote: > > I have attached a simplification of this proposal which I believe > > encapsulates most of the ways it improves on the original design > > Could you elaborate on those improvements?
Functionally it remains similar to the original interface In that the operations are asynchronous and complete with a callback. However this proposal is much simpler in detail, in that the proposed interface is very nearly all the detail you need to specify here. It gets a little more complex if you specify a hierarchy or Handle classes (which I think is probably a good idea actually) Another simplification is that it uses a single result callback for each operation - success and failure being distinguished by the type of the result, and left up to the broker to arrange (probably by having a virtual method in the AsyncResult class, but this interface does not need to care). I agree that having just the one callback might not be to everyone's taste, but I was consciously trying to pare the interface down to bare essentials - and I think there is no loss of functionality here. This proposal has all the same async functions as before and I think all the same Handle classes too, it's just shorter and simpler and I think pretty much the same to implement as before. Note I missed passing in the ResultFactory to the StoreAsyncInterface so it's not clear in the sketch how the store knows how to create those broker side objects. Another point - I might prefer separating out the Factory element of the StoreAsyncInterface into a HandleFactory, but I think the difference is fairly moot. Andrew > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
