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. Android课程---视图组件之开关按钮

    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="ht ...

  2. MessageBox Class

    Examples http://msdn.microsoft.com/en-us/library/aa969773(v=vs.110).aspx Displays a message box that ...

  3. whether the computers in a cluster share access to the same disks

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION In the literature, cl ...

  4. ArcGIS Server 创建站点失败

    前期解决方案中部分解决方法汇总:①安装Server时创建的ArcGIS Server Account (操作系统级别用户,默认用户名arcgis)对创建站点时新建的站点目录arcgisserver文件 ...

  5. 树莓派wiringPi库详解

    wiringPi是一个很棒的树莓派IO控制库,使用C语言开发,提供了丰富的接口:GPIO控制,中断,多线程,等等.java 的pi4j项目也是基于wiringPi的,我最近也在看源代码,到时候整理好了 ...

  6. jqxGrid 绑定格式化

    var cellsrenderer = function(row, columnfield, value, defaulthtml, columnproperties) { ) || (row == ...

  7. List<T> 添加 DataTable

    public System.Data.DataTable getDataTable() { System.Data.DataTable dt = new System.Data.DataTable() ...

  8. JMeter学习-021-JMeter 定时器(Synchronizing Timer)之集合点应用

    性能测试中我们经常提到一个概念就是“并发”,其实在实际真实的性能测试中是不存在真正的并发的.为了更真实的模拟对一个请求的并发测试场景,我们通常设置一个集合点,JMeter中提供了这样的一个功能设置. ...

  9. 关于TCP/IP的三次握手和四次挥手解释

    TCP协议三次握手过程分析 TCP(Transmission Control Protocol) 传输控制协议 TCP是主机对主机层的传输控制协议,提供可靠的连接服务,采用三次握手确认建立一个连接: ...

  10. Unit02-OOP-对象和类,数组(下)

    Unit02-OOP-对象和类,数组(下) 1.方法的签名: 方法名+参数列表 2.方法的重载(Overload):  1)发生在一个类中,方法名称相同,参数列表不同  2)编译器在编译时自动根据签名 ...