I have developed a .NET UI and windows service which communicate with each other using WCF through the NetNamedPipeBinding protocol. I chose NetNamedPipe because it is the best and efficient choice for interprocess communication on the same machine.
However, one of the key requirements of the application is that the UI should be able to send actions to the windows service and vice versa asynchronously. This means that the windows service should be able to call back the .NET UI application without the need for the .NET UI application to connect to the windows service first.
Keeping this in mind, I have hosted a WCF service in the windows service and a separate WCF service in the .NET UI application so that they can communicate asynchronously without the need to keep the communication channel always alive.
I would like to know if this makes good design sense.
I would appreciate your comments on the same.
Thanks in advance.
Subbu
Hosting another WCF service in the client to receive calls from the main WCF service is not a good idea. You need to use WCF duplex communication (as Subbu posted) aka WCF callback.
WCF: Duplex Operations and UI Threads
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With