简体   繁体   中英

communicating between applications (.NET + java)

I have a pretty general question here. What is the best + reliable way for two applications running on the same machine to communicate with each other WITHOUT using web services or a web server of any kind.

as example:

application A: runs at .NET app that with active X controls can access another third party application and receive data.

application B: (lets assume is running java) wants to be able to start a process in application A with specific parameters and receive information back from application A. (no web services allowed)

the only thing I can think of is perhaps application B executing a file with certain parameters...then application A does any work and writes any return information into a database...but I don't know how reliable this is...or how application A would know when the data has been written to the database. (plus this sounds like a bit of a hackish solution to me..and was wondering is there anything better out there)

alright...thanks for any help!..

Andrew

Using tcp sockets should be pretty reliable, even more so in the same machine. It doesn't need web services, web servers, etc - just a socket on each side.

In addition to all the answers I would alos like to say that I looked into WCF: http://en.wikipedia.org/wiki/Windows_Communication_Foundation

This is what I am going to use. I found this article very helpful:

http://bloggingabout.net/blogs/dennis/archive/2007/04/20/wcf-simple-example.aspx

A socket will be fairly easy to setup; however I suggest looking into something more akin to SOAP or XMLRPC - both will be a lot easier when it comes to packing and unpacking the data. Both .NET and Java both have extensive access and libraries availible for both XMLRPC and SOAP (both providers and consumers).

As far as implementation is concerned, TCP sockets and web services are about as easy to set up on either side (client-server).

When performance is a consideration, TCP sockets will have the upperhand since there is less overhead.

But when it comes to useability, and ease of integration in the code I prefer web services. And honestly it is a much more transparent technology when it comes to debugging your code. The sockets counterpart will require more plumbing code before it gets useable.

Check out this article for more info on .NET and Java intercommunication via Web Services.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM