tags:

views:

580

answers:

3

What is the best and easiest method that can be used for inter-process communication in a very large project?

My requirement is to communicate between a normal Windows Forms Application and Windows Services.

Methods that are easy to maintain and implement are preferred.

Thanks

A: 

It really depends on the project as there are a large number of methods.

This may depend on where the different portions of the project run (They could run on different servers, or different technology stacks altogether.).

The most common method is probably web services. Although these come with an overhead, so it may be worth looking at a simple interface API via a DLL.

Whatever you do it should probably be thought about and designed carefully, considering security and performance, and how you will extend or modify it in the future.

Bravax
+2  A: 

From the tags I understand that we are talking about .NET. Perhaps you should try Microsoft WCF. It unifies this issue, abstracting specific inter-process (inter-service) communication technology from actual code. So generally you'll design and write the interfaces that your processes will use to talk to each other and then you'll configure a specific communication technology in XML config file. That is, you have rather clear separation between "what do the processes talk about" and "how is this communication implemented specifically".

WCF supports SOAP, TCP\IP communication, MSMQ etc., you processes can be IIS-hosted web-services, usual Windows services, console applications etc. - all this under unified framework. I think, this is exactly what you are looking for.

Dmitry Perets
He also said EASY though. WCF has the worst binding and setup nightmare for any MS product I think. Try to get anonymous services to connect when the server is part of a domain - you have to edit the system registry! ACK!
Jason Short
Well, I am not familiar with your specific case, so I can't argue... But from what I've seen, the WCF configuration is rather intuitive and well-documented. And as usually with Microsoft products and frameworks, if your scenario is one of the described by Microsoft scenarios, then things will work almost out-of-the-box (unlike many 3rd-party solutions). Anyway, worth try, for my opinion.
Dmitry Perets
A: 

Not necessarily the best or the easiest....

In the .NET world try MSMQ or IBM MQ message queue middle ware.

If the communication is mostly 1-way, then consider using WCF services, which are both good and easy if you let the code generators in Visual Studio do most of the work for you.

Jeff Leonard
WCF also supports 2-way (duplex) communication, there are several provided bindings that support that - see wsDualHttpBinding, netNamedPipeBinding, and of course netTcpBinding and some others... See here: http://msdn.microsoft.com/en-us/library/ms730879.aspx
Dmitry Perets