Message Queue vs. Web Services?
From stackoverflow.com
When you use a web service you have a client and a server:
- If the server fails the client must take responsibility to handle the error.
- When the server is working again the client is responsible of resending it.
- If the server gives a response to the call and the client fails the operation is lost.
- You don't have contention, that is: if million of clients call a web service on one server in a second, most probably your server will go down.
- You can expect an immediate response from the server, but you can handle asynchronous calls too.
When you use a message queue like RabbitMQ, Beanstalkd, ActiveMQ, IBM MQ Series, Tuxedo you expect different and more fault tolerant results:
- If the server fails, the queue persist the message (optionally, even if the machine shutdown).
- When the server is working again, it receives the pending message.
- If the server gives a response to the call and the client fails, if the client didn't acknowledge the response the message is persisted.
- You have contention, you can decide how many requests are handled by the server (call it worker instead).
- You don't expect an immediate synchronous response, but you can implement/simulate synchronous calls.
Message Queues has a lot more features but this is some rule of thumb to decide if you want to handle error conditions yourself or leave them to the message queue.
Message Queue vs. Web Services?的更多相关文章
- MSMQ(Microsoft Message Queue)
http://www.cnblogs.com/sk-net/archive/2011/11/25/2232341.html 利用 MSMQ(Microsoft Message Queue),应用程序开 ...
- AWS(0) - Amazon Web Services
Computer EC2 – Virtual Servers in the Cloud EC2 Container Service – Run and Manage Docker Containers ...
- 消息队列(Message Queue)简介及其使用
消息队列(Message Queue)简介及其使用 摘要:利用 MSMQ(Microsoft Message Queue),应用程序开发人员可以通过发送和接收消息方便地与应用程序进行快速可靠的通信.消 ...
- BizTalk发布WS-Security的web services
最近做个项目,biztalk跟OTM(Oracle Transportation Management)系统做对接,双方通过web services通讯,这部分是BizTalk发布WS-Securit ...
- BizTalk调用WS-Security的web services
最近做个项目,biztalk跟OTM(Oracle Transportation Management)系统做对接,双方通过web services通讯,这部分是BizTalk调用OTM的web se ...
- Web Services 中XML、SOAP和WSDL的一些必要知识
Web Services 是由xml来定义数据格式的,通过SOAP协议在各个系统平台中传输,那么接下来讨论下SOAP和WSDL的各自作用. SOAP和WSDL对Web Service.WCF进行深入了 ...
- csharp: get Web.Services WebMethod
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- The Python web services developer: XML-RPC for Python
原文地址:http://www.ibm.com/developerworks/webservices/library/ws-pyth10/index.html 摘要:概括地说,您可以将 XML-RPC ...
- Java Web services: WS-Security with Metro--referenc
As you know from "Introducing Metro," the reference implementations of the JAXB 2.x data-b ...
随机推荐
- Python数据类型(3)
字符串(str):单引号''.双引号""嵌套使用,可以不使用转义字符:'abc"dd"ef'."acc'd'12",字符串不可以是多行的三单 ...
- NPOI简单操作excel
本文仅当是个记录文件,仅供初学者参考. 首先得using几个npoi的空间名如下: using NPOI.HSSF.UserModel;using NPOI.HSSF.Util;using NPOI. ...
- js == 判断
根据阮一峰介绍的算法文章分12部分可判断: 如果x不是正常值(比如抛出一个错误),中断执行. 如果y不是正常值,中断执行. 如果Type(x)与Type(y)相同,执行严格相等运算x === y. 如 ...
- 【转】Unity中的协同程序-使用Promise进行封装(二)
原文:http://gad.qq.com/program/translateview/7170970 译者:王磊(未来的未来) 审校:崔国军(飞扬971) 在上一篇文章中,我们的注意力主要是 ...
- 获取windows磁盘的可用空间函数
<?php /* *获取某个磁盘的剩余空间 *$param 关联数组,下标是哪个盘,单位,可以是B,KB,MB,GB *可以设置获取多个磁盘,例如:array('C'=>'KB','D'= ...
- MySQL导入.sql文件及常用命令
在MySQL Qurey Brower中直接导入*.sql脚本,是不能一次执行多条sql命令的,在mysql中执行sql文件的命令: mysql> source d:/myprogram/d ...
- tcp_tw_recycle 的问题, 使用某一个wifi,APP老是连接不上网络
ss -tan 反映出来的情况就是在服务器上抓包,发现有SYN包,但服务器就是不回ACK包,因为SYN包已经被丢弃了.为了验证这一结果,可以执行netstat -s | grep timestamp ...
- lua MVC框架 Orbit初探
介绍 http://keplerproject.github.io/orbit/ Orbit是lua语言版本的MVC框架. 此框架完全抛弃CGILUA的脚本模型, 支持的应用, 每个应用可以卸载一个单 ...
- Linux中的软硬链接
说到Linux中的软硬链接,就必须谈一下Linux的文件系统的组成的重要部分iNode和block. 首先是iNode,先用一张图了解一下iNode在Linux文件系统中的地位: Linux中的文件的 ...
- 使用ScheduledExecutorService实现Timer
大家都说Timer不太好用,经常会遇到:如果前边的一个任务比较慢,超出了period,此时timer的下一次轮询也会延迟. 同事说ScheduleExecutorService可以避免该问题,我写个例 ...