What is the difference of a WCF Service for a Duplex Service?

0

Follow the questions ...

1- What is the difference between a WCF Service and a Duplex Service?

2- When to use a Duplex Service?

3- Can we compare it to SignalR?

    
asked by anonymous 13.07.2015 / 21:21

1 answer

2
  

What's the difference of a WCF Service for a Duplex Service?

In WCF we can configure the types of messages exchanged between client and the WCF service, Duplex is one of these types of messages:

In a WCF service configured to exchange Duplex messages, the client makes the call to an available operation and continues working, but at some point the WCF service sends a response to the client (callback) , so that based on this feedback the customer can make a decision.

  

When to use a Duplex Service?

In a scenario you need the return of your WCF service to make a decision.

Suppose that a particular WCF service is calling a method for MyServiceWCF. Close Sale (...) . However, you feel the need for your WCF service to notify the client that an event has occurred (by calling a client method), let's imagine that "the inventory is gone and some other method needs to be invoked on the client to handle it." So you give the client a chance to get better interaction with the WCF service.

This allows two-way communication , that is, the client invoke method of a service as well as a service invoke a client method.

  

Can we compare it to SignalR?

As far as implementation is concerned, I've never implemented an application in SignalR, so I do not know how to compare it at the implementation level, but roughly:

Asp.net SignalR is an open-source library that makes it easy to deploy real-time communication (example Chats, updates / notifications asynchronously in an application.

WCF is a part of the .NET Framework that provides a unified programming model for rapidly building distributed service-oriented applications (SOA). WCF represents a separate communication layer and simplifies the deployment and configuration of a distributed application .

    
13.07.2015 / 23:27