开发者

Java and .NET application interoperability

开发者 https://www.devze.com 2023-04-04 01:05 出处:网络
I am having a Java application and a .NET application both residing in two different machines and need to design a communication layer between these two applications. Any inputs or ideas would be real

I am having a Java application and a .NET application both residing in two different machines and need to design a communication layer between these two applications. Any inputs or ideas would be really helpful. Below mentioned is the nature of interaction between these two applications.

  • Java applications send开发者_如何学Pythons large amounts of data to the .NET application
  • Data latency should be kept to a minimum
  • .NET application should also be able to request for some data (synchronously/asynchronously)


The easyest way .Net and Java can talk is using Web-Services - we have done in my company with much success (using apache's cxf and standard code on the .Net side).

But if latency and size are the main requirements, you should use Sockets - both platforms offer a pretty extensive socketing frameworks and it would give you the best performance possible.


I think this can be done by setting up an xml webservices layer on the java side. You can use RestEasy for restful web services. Just my .2 cents.


Another alternative is some form of MOM (Message Oriented Middleware). There are a lot of implementations, but one to look at first might be ActiveMQ as it has both Java and C# bindings (among others).

I'm not saying this is better than using a web-service, it entirely depends on what your requirements are.


We have had good experiences with providing web services with JAX-WS (part of standard runtime in Java 6). They explicitly list .NET compatibility as a goal and is well supported in IDE's.

The Endpoint.publish() mechanism allow for small, simple deployments.


You can use Web Services. Jax-WS is the API in java that allow you to use it. As the implementation of this API I recommend metro (http://metro.java.net/), this already came with the SDK, and has a great integration with netbeans.

As already someone referred yet, you can use a socket, and create a communication channel on that, but this have some problems, starting with security. Don´t use this in real life applications.

If you need help with this subject you can start reading this: Getting started with JAX-WS


It really depends on your requirements. The simple way is generally Web services. However, if you want higher performance, or more fine-grained access to the API on the other platform, you might want to consider JNBridgePro (www.jnbridge.com).

Disclosure: I work for JNBridge.

0

精彩评论

暂无评论...
验证码 换一张
取 消