webservice和jms的区别

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/ttpUIne3apAzC9KxEwEIBf77ZRJ/KNW9UvjftYB7eIQXAfQGjwvR8
i9FORwh7iAGzLvBZfbOB+plD1zNyKxJOQjQoJsRT98QIgYpKZDdATEseVabuZXHY
MwBe0BnP9JhJhlqlGW2KPiQvPJQhxf8nKIjcyfa7wFmPOcBIKdpim3ReIzcVXFoe
OszjUH5mZShhlDaA03SFWVYFlLZ5c0CPihYJEWUWG45/D8ZRWpnpCGCzY2Dt0y+L
IMDwgD4U9onCoikH+Rioj3CYfeQP7XBNgxo/qAjkwNQGl13FHsR72gSSt/aAHsbY
V8hPjee48SPrKFJWTeR54/c0XuMtW4NpdHaLGhUOqhEFU6MakE8BuXmDWQsaPTc2
2wV/JxSCejn+aqxl/rulFPXywvrSbb38z10YrFKv1S8Wp+DGM7QFTs73I/ED2kPt
ROzC28ENZerseC5GRUzWZP8JPIJ8OQv1eu/aKCMpUy3gjitL+gIo5ENBJBBwdOUr
EueTMh1qlOoCaMmAD83xY0JblquHGJcNG+W09valcKTDZ9EF6jDT7+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Qv6DgPcT4XUpPD0zB2ilWUtijse4j/Y+SysfpYkkSuGZn8gHwAMCJXE3LX2r
nDX8vN+qOD6c4C40MRJeeCCoQcV+jLvlv9kLvRGt3qJgsc7ulKLQubgieZNcBuHP
0mEw4TNYRRPpFATnyNq6GtHzdkzbk+RrqiBTqFIx81FN5s09jTOi2sLNhKc+a2ao
wmJR29hW25vY4+vmG+gsJJibTsRGuz41E8h5UkfQmzEkBbk1sys3+ugZxISripzG
QdiB4DNCNSYXCgLm35e62vr/sJt6Wy7NG4EIurDwharmSWD8ADA4ocphliXhnY/c
tx/EUC5Z3PCxV1y90DAkIDEzbme/wCa6pYRbjKmrxudwJc7QLxKgGPfja7wWaXdo
9vzlSeRDsh6ZskZaOznkeqnTjojm9f4K6mmesCxbYvdQw/uWMmRGHji3lxXJiFXk
iL0MSHcNo8OxrJxJosFCgSPdS9KfnH17clfZjoOJs+Rw3YnX40Iyz+U9fapza+OA
q8EZlhH/IgP4n3IAIYdhhcjTieTBmOueyk6JuyImqNa4O/5BBr6kWLDdsXsfDVrb
hoKTaca3BokSH9yJElNT8HxDrWzJrJJEnLcC9i58Ox+qYOOReMHAPhV2wlNG45Od
/iaS1o0/EmrWOp9fV8PCTZNeH61KKrMd1cRluF/ZEAMBUFYHMt+y4zXAdNXGs/FE
q8IpcDu0kOZf5uHs3biuvQgMdzfgYyMhd5jHnVWu0na4LzBigOtojilp50eJBQ4y
4C6qvW6wlUh33UU5k7ymEP3iwtwrZF8S0vRcr7LykXyqYMo5D31Pe3FQPexzgbmh
hJ0u9OsPNYrUiklqmba5NV4gHbQX3OJmbqwL18UWkzpmGRF2ixcAUlW1p3O72xXZ
43t38HmBwixN4TvNwkgFt/V7Guky9uJ3aj74c9qruGI=

上一篇:如何让Kafka在保证高性能、高吞吐的同时通过各种机制来保证高可用性?


下一篇:python生产和消费kafka数据