0

We have a client server application. My application need to be changed to work via WCF service in order to receive/send data to the database (security demands).

I also need another service which be hosted at the client side and will connect the client to the WCF service on the server side connect with Https. The WCF service on the server is in PerSession mode. Most of my work with the server is insert / select queries.

So my design is:

Client ->windows service ->WCF server service(iis7) ->database.

This windows service act as client and as server at the same time. Act as server: for the Client application. Act as client for the WCF service which located at the server.

The application needs to support XP and forward operating systems with .net 4.

The windows service will need to connect the WCF service on demand only (when the client application is launched).

I need to decide in which way to implement the client windows service. I prefer to implement it with WCF hosted service with TCP/IP, but it feels like over kill to do so. Should I use other IPC implementations? And if so which one?

So, what is the best way to implement this Windows service?

Thanks

RcMan
  • 893
  • 8
  • 16

1 Answers1

1

I do not fully understand the point why a windows service should be used on the client side in order to communicate with the WCF service. But the question was not about architectural patterns...

So, for inter-process communication I would use NetNamedPipeBinding. You can find more information on how to decide which binding to use here.

Using a WCF service for inter-process communication does not feel overkill to me at all. Actually WCF services are quite lightweight except the host initialization process, which should not happen frequently in case of a windows service I guess. WCF provides reliability and extensibility in exchange for this tiny inconvenience.

[EDITED]

I just reread you post, and I would like to clarify some details about the hosting. You can host a WCF service in a Windows Service, which is explained here, but not the other way around. Sorry, if I misunderstood your question. And yes, TCP/IP for inter-process communication is definitely an overkill, but NetNamedPipeBinding uses shared memory according to this article, so it should be the fastest way.

Community
  • 1
  • 1
Daniel Leiszen
  • 1,827
  • 20
  • 39