none
Interprocess communication RRS feed

  • Question

  • Hi,

    Currently i am working on project where i have a windows service and a windows application.

    i want to send a request to the service, the service will process the request and should send processed data back to the windows application. similarly i will send a request from windows service to win app, the win app will process the request and should send back the processed data.

    Both service and windows application are running on the same machine.

    Which is the best suitable way to accomplish this functionality?

    i heard that we can accomplish this by using MSMQ. is that correct?


    Veeresh Angadi

    Friday, July 5, 2013 5:22 AM

Answers

  • There are plenty of ways for interprocess communications available on Windows, and messages are one of the most handy. Windows Messages can't be sent between services and applications, and MSMQ is too heavyweight. A great option would be to use our MsgConnect which is a cross-platform message-oriented framework.

    Sincerely yours, Eugene Mayevski

    Friday, July 5, 2013 12:33 PM
  • It can be easily done with WCF SOA service using WCF over MSMQ or WCF over Named Piped. The Windows service would host the WCF service, and the WCF client would be hosted by the Windows desktop UI application. Normally, the WCF client must make the initial contact with the WCF service to start communications. On that same note, the client application can host a WCF service as well so that the Windows service can be a WCF client to the Windows desktop application hosting the WCF service, a two way communications with both applications Windows desktop and Windows service acting as a client and a service host for two way communications between the two.

    WCF uses XML serialization, meaning you can use a custom object like a DTO (Data Transfer Object) and send the object or objects between the WCF client and service to marshal data between the applications. 

    Friday, July 5, 2013 1:48 PM

All replies

  • There are plenty of ways for interprocess communications available on Windows, and messages are one of the most handy. Windows Messages can't be sent between services and applications, and MSMQ is too heavyweight. A great option would be to use our MsgConnect which is a cross-platform message-oriented framework.

    Sincerely yours, Eugene Mayevski

    Friday, July 5, 2013 12:33 PM
  • It can be easily done with WCF SOA service using WCF over MSMQ or WCF over Named Piped. The Windows service would host the WCF service, and the WCF client would be hosted by the Windows desktop UI application. Normally, the WCF client must make the initial contact with the WCF service to start communications. On that same note, the client application can host a WCF service as well so that the Windows service can be a WCF client to the Windows desktop application hosting the WCF service, a two way communications with both applications Windows desktop and Windows service acting as a client and a service host for two way communications between the two.

    WCF uses XML serialization, meaning you can use a custom object like a DTO (Data Transfer Object) and send the object or objects between the WCF client and service to marshal data between the applications. 

    Friday, July 5, 2013 1:48 PM