Jun 11, 2007

OneWay Callback Service Invocation Pattern?

As shown in an earlier post WCF allows callback service contracts to be of a request/response pattern. Where in p2p situation this might be great and simple, I was questioning this design in a C/S distributed application and opted for a OneWay pattern:

[ServiceContract(Namespace = "http://www.mleder.blogspot.com/CallbackService/2007/05")]

public interface IMasterCallbackService


    [OperationContract(IsOneWay = true)]

    void RaiseEvent(Message eventToRaise);


If you think OneWay prevents dead-locks, then you are wrong, because the request still needs to synchronize with the thread of the client.

No comments:

Post a Comment