MSMQ and Duplex

One of the nifty features in Windows Communication Foundation is duplex requests. To define a duplex request you need to create two interfaces, both with their OperationContract marked with IsOneWay:=True. The request interface also contains a CallbackContract with the response interface. <ServiceContract(CallbackContract:=GetType(IDuplexResponse))> _ Public Interface IDuplexRequest     <OperationContract(IsOneWay:=True)> _     Sub SendRequest(ByVal data As String) End Interface    <ServiceContract()> _ Public Interface IDuplexResponse     <OperationContract(IsOneWay:=True)> _     Sub SendResponse(ByVal data As String) End Interface  Now in the request implementation you can use the OperationContext to retrieve the callback interface using OperationContext.Current.GetCallbackChannel(Of IDuplexResponse)(). Public Class DuplexRequest     Implements IDuplexRequest        … Continue reading MSMQ and Duplex

Custom activities and workflow persistence

Most of the time there isn’t much of a problem when developing custom activities and workflow persistence. After all when an external system send a message, the service retrieves this, extracts the WorkflowInstanceId and queue name and signals the workflow. Everything’s works just fine and if the workflow runtime restarts the message received will cause the workflow to be reloaded. However there is a catch. Suppose the external service isn’t passively waiting for an external event but must do so in a more active mode. An example of this is a service waiting for a particular file to be recreated. … Continue reading Custom activities and workflow persistence

FeedBurner

I am changing my blog to go through FeedBurner in the future. So if you are subscribing to the RSS feed of my blog please update it to point to http://feeds.feedburner.com/TheProblemSolver instead.

Caching and memory constraints

Caching can be a great way of increasing the performance of an application. I often use the HttpRuntime.Cache just for this purpose, even in WinForm applications as it is fast and easy to use. However as usual there is a tradeoff. In the case of caching the catch is memory consumption. Instead of querying or calculating some data again just keep all results around in the hope they are used again. But that uses up memory and while coding you probably have a fast machine with plenty of memory the case at runtime might be a little different. One easy … Continue reading Caching and memory constraints

[MVP] Congratulations! You have received the Microsoft MVP Award

Dear Maurice de Beijer, Congratulations! We are pleased to present you with the 2007 Microsoft® MVP Award! The Microsoft MVP Award is our way of saying thank you and to honor and support the significant contributions you make to communities worldwide. As a recipient of Microsoft’s Most Valuable Professional award, you join an elite group of technical community leaders from around the world who foster the free and objective exchange of knowledge by actively sharing your real world expertise with users and Microsoft. Microsoft salutes all MVPs for promoting the spirit of community and enhancing people’s lives and the industry’s … Continue reading [MVP] Congratulations! You have received the Microsoft MVP Award