开发者

How to provide a cross platform, asynchronous service interface

开发者 https://www.devze.com 2023-01-08 22:01 出处:网络
What is the best way to pr开发者_StackOverflow社区ovide an asynchronous service interface to multi-platform (primarily java and .net) clients? The backend service is implemented in java.

What is the best way to pr开发者_StackOverflow社区ovide an asynchronous service interface to multi-platform (primarily java and .net) clients? The backend service is implemented in java.

We are looking at asynchronous web service and message queues, but apparently cross platform asynchronous web service* is not supported yet in java (as far as I know) and for message queues, I was not sure which codec/protocol would be best.

*:Cross platform asynchronous web services can be described in WSDL 2.0, but not in WSDL 1.1 (As far as I understand). Now, JAX-WS 2.x does support asynchronous web service, but not WSDL 2.x. So I'm assuming that JAX-WS asynchronous web service's clients have to be JAX-WS clients, and that we can not use.

Thanks in advance!

EDIT: The difficulty here is that the service is asynchronous, and we prefer a callback based interface for efficiency (so we don't want to use 2 calls on a synchronous WS interface, etc.)


If its messaging, than use a Messagequeue system. like ZeroMQ. they are all cross platform.

otherwise we do it with .net WCF, and use JaxWS from java to test, that the interface is compatible.


Don't know, what's best, but SOAP is a good choice for a Java backend. The messages are xml based (e.g. not restricted to Java platforms) and it is widely used so you get a lot of support, tools and libraries on the net.


Another idea that might fit your needs: XMPP.

It is definitly asynchronous, client sending a service request (wrapped in a xmpp message) is the callback and doesn't wait for an immediate answer. I've used in a scenario where I send 'service request' from a xmpp client to a server and received the answers, immediately or a bit later, depending on the complexity of the calculation. This was a human-machine interaction but machine-machine should be even easier.

0

精彩评论

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