webservice和jms的区别
Webservice专注于远程服务调用,jms专注于信息交换。
大多数情况下Webservice是两系统间的直接交互(Consumer <–> Producer),而大多数情况下jms是三方系统交互(Consumer <- Broker -> Producer)。当然,JMS也可以实现request-response模式的通信,只要Consumer或Producer其中一方兼任broker即可。
JMS可以做到异步调用完全隔离了客户端和服务提供者,能够抵御流量洪峰; WebService服务通常为同步调用,需要有复杂的对象转换,相比SOAP,现在JSON,rest都是很好的http架构方案;(举一个例子,电子商务的分布式系统中,有支付系统和业务系统,支付系统负责用户付款,在用户在银行付款后需要通知各个业务系统,那么这个时候,既可以用同步也可以用异步,使用异步的好处就能抵御网站暂时的流量高峰,或者能应对慢消费者。)
JMS是java平台上的消息规范。一般jms消息不是一个xml,而是一个java对象,很明显,jms没考虑异构系统,说白了,JMS就没考虑非java的东西。但是好在现在大多数的jms provider(就是JMS的各种实现产品)都解决了异构问题。相比WebService的跨平台各有千秋吧
U2FsdGVkX1/B912brsSXvdnUz3o5JieP/iMEoDh05q0dXLy0F0Pff+Gc51PTYEeG
xbQBVFd0RiAwjQuWr804asZaTEJ1miVzMZbj37lpD0vXe88ezuHV4IUDe6nYbZAv
8zIO+AjD3iOf4h/caNG2xHQYCeEGrir85AA2Q2aJDSzbU1eeBwy2IKayEkI3hgHJ
x/YzjTvzm92cZjxj56ccugkWDjr+9CzqBo7C02UnediHWEfTh0Tfv8tLCDz08fq2
KC8PPTMONs1aow62PLOhtPdLNmaSc5GhhdZwRkndAuvoPPgcxgm+d27hLwsItY3I
uO2d22m8BAKMsIctwiNlO6yWb6kGWHS9XuawHeTq6r++u19ceWq2QndGFni0L7Va
LqTc3+3NsClMnU9we1jb4Kuxn/DTwbFSBjQWniSsegpOD/1P6JiTKY+AvAbVHRrM
qVrrlikXwFvk9Hqruxrph4NOtzA4yv2xUq/4oMgKo7c/C89BHDO/2BfhFZCLDjUt
Y5zmB7VAfOk+49+jW8dSdkRFE5vtJZr3irkTyW3TNQrIsqyfRVfRLBJH2CjFF4BB
PNT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