简体   繁体   English

Web服务或Jms

[英]Web Service or Jms

Currently I am responsible for a service: To make a Http Get call on remote server to recharge the mobile which uses asp (plain asp without .net). 目前,我负责一项服务:在远程服务器上进行Http Get呼叫,以便为使用asp(不带.net的纯asp)的移动电话充值。 URL looks like recharge.asp?param=provide Ai amount 100 Num 9999999 URL看起来像recharge.asp?param =提供Ai数量100编号9999999
Server takes about 10 sec to recharge the mobile and then send the response. 服务器大约需要10秒钟才能为手机充电,然后发送响应。 Since the client application uses Java EE technology what is best suited Java EE technology for this scenario (Web service, JMS etc )? 由于客户端应用程序使用Java EE技术,因此最适合此场景的Java EE技术(Web服务,JMS等)是什么? What about synchronous and asynchronous request? 同步和异步请求呢?

Since two different technologies are concerned I would suggest going for webservice, as it uses industry standards and not Java standards, 由于涉及到两种不同的技术,因此我建议您使用网络服务,因为它使用行业标准而不是Java标准,

Since this is transactional in nature, message should be synchronous, as users in general are more convenient waiting rather than being notified later about success or failure, had the wait period long then it could have been a different story, but in general 10 seconds is acceptable. 由于这本质上是事务性的,因此消息应该是同步的,因为一般来说,用户等待更方便,而不是事后通知成功或失败,因为等待时间长了,所以本来可以是另外一个故事,但是通常10秒是可以接受的。

If your capacity planning suggests that 10 seconds wait will put server under extreme load, please take asynchronous approach while ensuring that user is notified about success or failure. 如果您的容量计划建议等待10秒将使服务器承受极高的负载,请采取异步方法,同时确保通知用户成功或失败。

WS Architecture WS架构

Transaction In WS WS中的交易

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

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