读书人

[摘引自spring的ppt]spring remote技术

发布时间: 2012-11-13 10:00:51 作者: rapoo

[引用自spring的ppt]spring remote技术比较

Hessian

Lightweight binary protocol by CauchoHTTP-basedUses custom serialization mechanismSupport for several platforms
??? PHP / Python / C++ / C# / Ruby / JavaProblematic when using for example
??? Hibernate lazy loading without OSIVHessianServiceExporterHessianProxyFactoryBean

Burlap

XML-based lightweight protocol (Caucho)HTTP-basedUses custom serialization mechanismKnown support only for JavaProblematic when using for example Hibernate lazy loading without OSIV

Spring HttpInvoker

Spring-based Java-to-Java remotingHTTP-basedUses Java serialization just like RMIEasy to setup(no HTTP tunneling as with RMI)HttpInvokerServiceExporterHttpInvokerProxyFactoryBean

RMI

Plain-and-simple RMIWith some additions:
??? Converts checked RemoteExceptions to unchecked RemoteAccessExceptions
??? Supports exposing plain Java interfacesClient support for both Spring-exposed as well as convential RMI endpointsRmiServiceExporterRmiProxyFactoryBean

RMI-IIOP / CORBA

Ability to use RMI-IIOP implementation from vendor (see demo)Of course with the need for stubs and skeletonsWith a Spring-based client, still no need for java.rmi.RemoteJndiRmiServiceExporterJndiRmiProxyFactoryBean

When to use what

Both client and server under control
???? Both Spring: HttpInvoker, Hessian, Burlap
???? Low bandwidth: Hessian, Burlap(beware of complex object graphs)
???? No servlet container: RMI(-IIOP)Only server under control: RMIMultiple client platforms: Hessian(or web services)Need for security: HttpInvoker or RMI

读书人网 >软件架构设计

热点推荐