webservice和jms的區別

xmh_sxh_1314發表於2020-11-15

在這裡插入圖片描述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的跨平臺各有千秋吧

U2FsdGVkX19+TG7pJihKol5dgsPrvWUF2exdLMeXrFiy/wjUx3FoqX+8+a1LhIH+
eDmW7yyKtMscOHziOyWTORgGZ0dBiv5Uv3YKw3/pVSNC0WtPsPCA/RzTL8JtPt51
azLxdcqB0YPmeOj8n/QxPbjJwbyUvk7JnQhVJjFr5A+Uh0zPWVhQMlandb7Y5PvY
0aSweaJZnfqd4d8Z+aj6nJc5iKYmvTGRKMEgldS8L7u7h4PzHfF8NtOwBoc9C7sR
0dEAx+cHm+Z1HeiF4nQ+It8Jfk6+mC7p4qoE/U/7OD4g5NWRLdEoQ8/Rdy5H35Wp
2Aufl154PPNfo5Vp1+VRuSMXQQhzfVmJdpNxN2e4eCtjubgX03b8kGqerxI3f/t8
T4bj9codOHmwmlDgyKQem2rqD0m1MuDt0m7Z4PzU9A7KSJJNg9j1wj9slwRW3M16
qHn2F6zieN24/yghm3DrZ2bC28mINf+wkUIXi2YZ8xnddjCxkZE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