简体   繁体   English

架构师迫切希望在JMS上使用SOAP

[英]Architect desperately wants to use SOAP over JMS

I have used JMS in the past to build application and it works great. 我过去曾使用JMS来构建应用程序,它运行良好。 Now I work with Architects that would love to use the Spec : SOAP over Java Message Service 1.0. 现在我和想要使用Spec:SOAP over Java Message Service 1.0的Architects一起工作。

This spec seams overly complicated. 这个规格过于复杂。 I do not see many implementation (Beside the vendors pushing for the spec). 我没有看到很多实现(除了供应商推动规范)。

Does anyone here is using this specification in a production environment? 这里有人在生产环境中使用此规范吗? What is your main benefit of using this spec? 使用此规范的主要好处是什么?

Link: http://www.w3.org/TR/2009/CR-soapjms-20090604/ 链接: http//www.w3.org/TR/2009/CR-soapjms-20090604/

I had the bad luck using SOAP over JMS. 我使用SOAP over JMS运气不好。 It does make some sense, if it is used for fire-and-forget operations (no response message defined in the WSDL). 如果它用于fire-and-forget操作(WSDL中没有定义响应消息),那么它确实有意义。 In this case you can use the WSDL to generate client skeletons and you can store the WSDL in your service registry. 在这种情况下,您可以使用WSDL生成客户端框架,并且可以将WSDL存​​储在服务注册表中。 Plus you get all the usual benefits of JMS (decoupling sender and receiver, load-balancing, prioritising, security, bridging to multiple destinations - eg non-intrusive auditing). 此外,您还可以获得JMS的所有常见优势(解耦发送方和接收方,负载平衡,优先级排序,安全性,桥接到多个目的地 - 例如非侵入式审计)。

On the other hand SOAP is mainly used for request/reply type operations. 另一方面,SOAP主要用于请求/回复类型操作。 Implementing request/reply pattern over JMS introduces the following problems: 通过JMS实现请求/回复模式会引入以下问题:

  • Impossible to handle timeouts properly. 无法正确处理超时。 You never know if a request is still waiting for delivery or got stuck in the called component. 您永远不知道请求是否仍在等待传递或被卡在被调用的组件中。
  • Responses are typically sent on temporary queues. 响应通常在临时队列上发送。 If the client disconnects before receiving the response and there is no explicit time to live set on the response message, the temp queue can get stuck in the JMS server until you restart it. 如果客户端在接收响应之前断开连接并且没有明确的时间设置在响应消息上,则临时队列可能会卡在JMS服务器中,直到您重新启动它。
  • Having a JMS server in the middle dramatically increases roundtrip times and adds unnecessary compexity. 在中间使用JMS服务器会大大增加往返时间并增加不必要的复杂性。
  • JMS provides a reliable transport medium that decouples the sender from the receiver, but in case of request/reply the client should not be decoupled from the server. JMS提供了一种可靠的传输介质,可以将发送方与接收方分离,但在请求/回复的情况下,客户端不应与服务器分离。 The client needs to know if the server is up and available. 客户端需要知道服务器是否已启动且可用。

The only advantage I could think about is that the server can be moved or load-balanced without the client knowing about it, but using UDDI and HTTP load balancer is a better solution. 我能想到的唯一优势是可以在客户端不知道的情况下移动或负载均衡服务器,但使用UDDI和HTTP负载均衡器是一种更好的解决方案。

I'd say that from an Architect's prospecting the same question would be about why having a 5 layer Internet model, with the 5th being the application when one could simply code the entire application at the socket level. 我想说,从建筑师的探矿中,同样的问题是关于为什么要有一个5层互联网模型,第五个是应用程序,当一个人可以简单地在套接字级编码整个应用程序。 To abstract out the Transport layer (JMS in your case) from what your application produces or consumes (SOA messages) is a good practice for may reasons amongst which independent unit testing, and future migration to other platforms are the first to come to my mind 从您的应用程序生成或使用的内容(SOA消息)中抽象出传输层(在您的情况下为JMS)是一个很好的做法,其中可能的原因是独立的单元测试以及将来迁移到其他平台的第一个出现在我的脑海中

Goddammit, I hate working with Architect Astronauts. 天哪,我讨厌与建筑师宇航员合作。 I feel your pain brother. 我觉得你的痛苦兄弟。 Do they actually have a actual, functional reason for doing so other than "it's a standards"? 除了“这是一个标准”之外,他们实际上是否有实际的功能性原因? Is this decision going to lock them into a specific EE container vendor (say WebSphere)? 这个决定是否会将它们锁定到特定的EE容器供应商(比如WebSphere)? That is so 2002; 那是2002年; very few people have a real need for it; 很少有人真正需要它; and in fact, SOAP has been pretty much ignored by most practical, successful implementations. 事实上,大多数实际的,成功的实现都忽略了SOAP。 Unless they have a real need for more reliability than what it is provided by JMS or SOAP-over-HTTP alone, you are in for a trip. 除非他们真正需要比JMS或SOAP-over-HTTP单独提供的更多可靠性,否则您就是在旅途中。

Check the Apache CFX site for some examples (specific to CFX). 查看Apache CFX站点以获取一些示例(特定于CFX)。

http://cxf.apache.org/docs/soap-over-jms-10-support.html http://cxf.apache.org/docs/soap-over-jms-10-support.html

The rule of thumb would be to really use the bare minimums, and not the full stack. 经验法则是真正使用最小的最小值,而不是完整的堆栈。 If your architect astronauts still insist in using the whole thing, you might just be walking into a world of pain. 如果你的建筑师宇航员仍然坚持使用整个东西,你可能只是走进一个痛苦的世界。 Sorry. 抱歉。


EDIT: 编辑:

BTW, what application container will you be using? 顺便说一下,你将使用什么应用容器? WebLogic, JBoss, WebSphere? WebLogic,JBoss,WebSphere? And which web service framework? 哪个Web服务框架? Apache CFX, Axis? Apache CFX,Axis?

Architects astronauts will love to say that those are implementation details. 建筑师宇航员会喜欢说那些是实施细节。 Bull. 公牛。 Any decision on a system whose change carriers a great cost (or whose implementation carries significant savings) is an architectural decision. 对系统的任何决策都是一个架构决策,这个系统的变化承担了巨大的成本(或者其实施带来了显着的节省)。 These pretty much dictate how things will be implemented (and what the cost of change will be) so determining early on which you will be using is an architectural decision except with very self-contained systems. 这几乎决定了事情将如何实施(以及变更的成本),因此尽早确定您将使用的是一个架构决策,除非有非常独立的系统。

A few more links on this controversial subject: 关于这个有争议的主题的一些链接:

http://www.subbu.org/blog/2005/03/soap-over-jms http://parand.com/say/index.php/2005/03/29/soap-over-jms-no-such-thing/ http://www.subbu.org/blog/2005/03/soap-over-jms http://parand.com/say/index.php/2005/03/29/soap-over-jms-no-such -事情/

SOAP/JMS and SOAP/HTTP are used for different scenarios albeit with Message Fire and Request/Response. SOAP / JMS和SOAP / HTTP用于不同的场景,尽管Message Fire和Request / Response。 SOAP/JMS is actually terrific for propagating discovered (if required converted) messages to multiple sourecs simply by usage of SoapAction and targetService. SOAP / JMS实际上很简单,只需使用SoapAction和targetService就可以将发现的(如果需要转换的)消息传播到多个sourec。 The JMS Specs also help in complex routing using the headers. JMS规范还使用标头帮助进行复杂路由。

In Fact, UDDI as well as build servers can, is AND has been used as sources to discover published WSDLs (inline) from massive middleware deployments (Irrespective of engine architecture) as a SOAP/JMS Message to singular SOA Repository Sinks. 事实上,UDDI以及构建服务器可以用AND作为源来发现从大规模中间件部署(无论引擎架构)作为SOAP / JMS消息到单一SOA Repository Sinks的已发布WSDL(内联)。 Very Important in Enterprise Governance 在企业治理中非常重要

Hence it is of utmost importance for wire tap patterns essentially when asynchronicity is of paramount importance. 因此,当异步性至关重要时,对于线接头模式来说,这是至关重要的。

SOAP/HTTP and now REST (with the verb noun model) work best for trusted sub-system calls SOAP / HTTP和现在的REST(使用动词名词模型)最适合可信的子系统调用

Image you implemented a frequently used Web-Service, that tends to run ouf threads, while you promised, that no message will be lost. 你实现了一个经常使用的Web服务的图像,它往往会运行你的线程,而你承诺,没有任何消息会丢失。

A Webservice implementation (the server) that runs over a session bean comes with a limited amount of threads (say n active PE in your pool), that may run n web-service request concurrently. 在会话bean上运行的Web服务实现(服务器)带有有限数量的线程(比如池中的n个活动PE),它可以同时运行n个Web服务请求。 What will happen to the n+1 request ? n + 1请求会发生什么?

MRDE, didn't you promised you application owner, that no message will be lost. MRDE,你没有答应你的应用程序所有者,没有消息会丢失。 So the JMS quaranties this functionality. 因此,JMS会保留此功能。 The Webservice skeleton only has to store the data in a queue, and this give reliability also with regard to load-peaks. Web服务框架只需将数据存储在队列中,这也为负载峰值提供了可靠性。

The interesting thing about WS over JMS is, that the elapsed time of a running WS-request is quite short, so the computing ressouce will be back immediately to server the next request. WS over JMS的有趣之处在于,正在运行的WS请求所用的时间非常短,因此计算重新将立即返回给服务器下一个请求。

From here : 这里

SOAP over JMS offers an alternative messaging mechanism to SOAP over HTTP. SOAP over JMS为SOAP over HTTP提供了另一种消息传递机制。 While it is not yet standardized and hence may not be interoperable across platforms, SOAP over JMS offers more reliable and scalable messaging support than SOAP over HTTP. 虽然它尚未标准化,因此可能无法跨平台进行互操作,但SOAP over JMS提供比SOAP over HTTP更可靠和可扩展的消息传递支持。 As JAX-RPC and JSR-109 become integral parts of the J2EE standard, enterprise messaging in Web services using SOAP over JMS will become well-established. 随着JAX-RPC和JSR-109成为J2EE标准的组成部分,使用SOAP over JMS的Web服务中的企业消息传递将变得非常成熟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM