Not knowing how much data you plan to exchange, it is difficult to give an exact recommendation. I use both WCF and TCP sockets to exchange data between my user interface and my Windows service. These are the considerations I made.
I use WCF for what I call aperiodic data exchange. For example, when an event occurs in my Windows service, I pass the event to the user interface using WCF. In particular, for this event-based mechanism, I would highly recommend the Juval Lowy Publish-Subscribe Framework , which is available for free here . I also use WCF to push configuration changes from the user interface to the Windows service. WCF is the perfect solution for this kind of data exchange for me.
When a user informs my Windows service about some actions, a large amount of data is sent from the Windows service to the user interface. For this, I use TCP sockets. I know that WCF has streaming ability, and I strongly used it. I just did not have time to calm down before I had to make a decision, so I went with what I knew.
Although I wish I had used WCF all over the world for symmetry, i.e. for aperiodic and streaming data, this hybrid approach helped me well.
Hope this helps.
source share