Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IChannel and IQueueChannel are incompatible #10

Open
GoogleCodeExporter opened this issue Dec 14, 2015 · 1 comment
Open

IChannel and IQueueChannel are incompatible #10

GoogleCodeExporter opened this issue Dec 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

It is impossible to create generic code that use interfaces and then decide to 
use the event model (Channel) or queue model (QueueChannel) later.

Proposal: drop the IQueueChannel interface altogether and have QueueChannel 
implement IChannel.

Alternative Proposal: have IQueueChannel be the base interface and IChannel 
inherit from that.

IQueueChannel has two methods and no sub-interfaces:
* void Publish(T message)
* IDisposable Subscribe(IExecutionContext, Action<T>)

IChannel has the same two methods (note: IExecutionContext is an IFiber in this 
case, but IFiber is an IExecutionContext) along with a set of other 
subscription models.  There is no reason why there has to be the separation.


Original issue reported on code.google.com by [email protected] on 22 Mar 2011 at 5:20

@GoogleCodeExporter
Copy link
Author

Not sure on this one.  

1) QueueChannel doesn't support many of the methods on IChannel.
2) Not sure how I feel about having IChannel implement IQueueChannel.  Perhaps 
if we came up with better names?

Original comment by [email protected] on 22 Mar 2011 at 7:05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant