开发者

Java Spring remoting options

开发者 https://www.devze.com 2022-12-19 03:33 出处:网络
A little context: I would like to separate the Java application I\'m writing into a more or less typical server-client model. I would provide a \"server\" which takes care of business logic and persis

A little context: I would like to separate the Java application I'm writing into a more or less typical server-client model. I would provide a "server" which takes care of business logic and persistence, but write it in a very service oriented fashion. Any front-end code (GUI) would then call upon the server to provide the functionality in a user friendly fashion.

As I'm writing the application using Spring (and an ORM framework), it would make sense to explore the usual suspects to expose the server functionality, with the usual suspects being RMI, Spring HTTP, Hessian, web services, etc (the Spring natively supported options). These are well well documented, both in reference documentation and on here.

However, for the actual question: are there any less obvious, more exotic options I could consider to use for exposing my server services?

It's important (as always) to get the right balance between ease of use (from a front-end POV), performance and scalability. For example; since I've thought about pr开发者_如何学Pythonoviding the Spring-BlazeDS integration in the server any way (for Flex/AS3 clients), it dawned on me that BlazeDS provides a Java-native API for calling AMF services.

Any pointers are much appreciated.


I would recommend BlazeDS if you have a Flex front end and Spring HTTP if not. Both eliminate the non-productive work introduced by having to translate XML to objects and back again.

Spring HTTP is especially attractive because you can write POJO Spring service interfaces just as you always do, deferring the choice to expose via HTTP remoting until the end. You keep your options open that way. If you decide that Spring web services work better for you later on, you can keep re-using the same POJO Spring interface.

0

精彩评论

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

关注公众号