Channel allocators

WCF Channel management has always been managed primitively in applications but with good reason... business application developers shouldn't be bothered by managing channels, they should be focused on writing business logic, not plumbing. In fact it would be awesome if they could make service calls like they would make calls to a local class through an interface.

EasyProxy poses to tackle this problem by presenting an interface by which different Channel Allocators can be used to deal with different expectations.
What are Channel Allocators? Primarily they provide the Call Behaviors with channels which they can use to make service calls from, but they also manage the lifetime of a channel.

The following Channel Allocators exist:
There is one more in the pipeline (still needs to be designed and implemented):
  • Scoped Channel Allocator

When you configure your EasyProxy, you supply Channel Allocators to your Call Behaviors. The Channel Allocators, in turn, require the Channel Factory.

Writing custom Channel Allocators requires that one create a class that inherits from ChannelAllocatorBase and where one needs to override the GetAvailableChannel() method. This method returns a ChannelHolderBase (the Channel Holder) class instance which wraps around a WCF channel and is used by the Call Behavior. The Channel Allocator generally (depending on the implementation) keeps tabs on the Channel Holder to help deal with WCF channel lifetimes.

Last edited Jun 4, 2013 at 4:09 PM by dandrejvv, version 3

Comments

No comments yet.