From stackoverflow.com


When you use a web service you have a client and a server:

  1. If the server fails the client must take responsibility to handle the error.
  2. When the server is working again the client is responsible of resending it.
  3. If the server gives a response to the call and the client fails the operation is lost.
  4. 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.
  5. 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:

  1. If the server fails, the queue persist the message (optionally, even if the machine shutdown).
  2. When the server is working again, it receives the pending message.
  3. 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.
  4. You have contention, you can decide how many requests are handled by the server (call it worker instead).
  5. 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?的更多相关文章

  1. MSMQ(Microsoft Message Queue)

    http://www.cnblogs.com/sk-net/archive/2011/11/25/2232341.html 利用 MSMQ(Microsoft Message Queue),应用程序开 ...

  2. AWS(0) - Amazon Web Services

    Computer EC2 – Virtual Servers in the Cloud EC2 Container Service – Run and Manage Docker Containers ...

  3. 消息队列(Message Queue)简介及其使用

    消息队列(Message Queue)简介及其使用 摘要:利用 MSMQ(Microsoft Message Queue),应用程序开发人员可以通过发送和接收消息方便地与应用程序进行快速可靠的通信.消 ...

  4. BizTalk发布WS-Security的web services

    最近做个项目,biztalk跟OTM(Oracle Transportation Management)系统做对接,双方通过web services通讯,这部分是BizTalk发布WS-Securit ...

  5. BizTalk调用WS-Security的web services

    最近做个项目,biztalk跟OTM(Oracle Transportation Management)系统做对接,双方通过web services通讯,这部分是BizTalk调用OTM的web se ...

  6. Web Services 中XML、SOAP和WSDL的一些必要知识

    Web Services 是由xml来定义数据格式的,通过SOAP协议在各个系统平台中传输,那么接下来讨论下SOAP和WSDL的各自作用. SOAP和WSDL对Web Service.WCF进行深入了 ...

  7. csharp: get Web.Services WebMethod

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  8. The Python web services developer: XML-RPC for Python

    原文地址:http://www.ibm.com/developerworks/webservices/library/ws-pyth10/index.html 摘要:概括地说,您可以将 XML-RPC ...

  9. Java Web services: WS-Security with Metro--referenc

    As you know from "Introducing Metro," the reference implementations of the JAXB 2.x data-b ...

随机推荐

  1. c++之vector

    vector是STL中最常见的容器,它是一种顺序容器,支持随机访问.vector是一块连续分配的内存,从数据安排的角度来讲,和数组极其相似, 不同的地方就是:数组是静态分配空间,一旦分配了空间的大小, ...

  2. Android课程---视图组件总结

  3. 【iCore3 双核心板】例程三十:U_DISK_IAP_FPGA实验——更新升级FPGA

    实验指导书及代码包下载: http://pan.baidu.com/s/1jH1TiKY iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  4. 【iCore3 双核心板_FPGA】例程三:GPIO输入实验——识别按键输入

    实验指导书及代码包下载: http://pan.baidu.com/s/1dEaDr37 iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  5. centos安装后iptables基本设置

    一.首先关闭防火墙#service iptables stop 二.查看状态,确认关闭#service iptables status 三.清除掉防火墙规则#iptables -F#iptables ...

  6. Sublime Text3 常用快捷键

    1. 更改变量名的几种方法 a.选中变量,ctrl+d 一个个选择 b.选中变量,alt+F3   2.查找打开过的文件:Ctrl+P,然后输入最近的文件名就可以即时预览到文件内容. 3.ctrl+r ...

  7. IHttpModule

    随便写一个类继承IHttpModule 实现IHttpModule中的两个方法 Init() Dispose() public void Init(HttpApplication context) { ...

  8. 如何真正抓住微信小程序的红利? 阿禅知乎live总结

    微信App定义 为满足用户某种开发需求.完全基于微信的消息或网页应用,入口是公众号,用户无需离开微信即可完成所有操作,所有需求都在公众号里被满足 微信App的优势 1. 顾客在哪里,就让顾客在哪里看到 ...

  9. openfire二次开发eclipse环境搭建

    转自:http://blog.csdn.net/daigua245/article/details/7918243 1.将openfire源码项目解压到(如果是从SVN CO下来的则不用)eclips ...

  10. iOS开发之音频口通信-通过方波来收发数据

    之前做过的项目有需要通过音频口通信用方波来收发数据,由于这方面的资料比较少,下面就介绍下其原理,希望能给大家帮助. 一. 音频通信简介大家应该都知道支付宝声波支付和拉卡拉吧,它们都是利用手机的音频口( ...