Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91BB111A7D for ; Tue, 19 Aug 2014 09:26:45 +0000 (UTC) Received: (qmail 3478 invoked by uid 500); 19 Aug 2014 09:26:45 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 3407 invoked by uid 500); 19 Aug 2014 09:26:45 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 3391 invoked by uid 99); 19 Aug 2014 09:26:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 09:26:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivan.brencsics@gmail.com designates 209.85.219.53 as permitted sender) Received: from [209.85.219.53] (HELO mail-oa0-f53.google.com) (209.85.219.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 09:26:39 +0000 Received: by mail-oa0-f53.google.com with SMTP id j17so5000834oag.40 for ; Tue, 19 Aug 2014 02:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=r693+ERyD4Qt6zbY75EtHkMmvmAnZ8rU0cgM9zCljG4=; b=dMwhGS9zqVbKwr9WyC1KIiL1/o3FaN2qCBobF5ZUYvihB41odb+BglTCtMaEdKfu50 rEGPuhp+aY2qCA5rjjePIj5OHj4cpxIm9047d3rPVzvKjU7Vpzl2BUU9hOD/6FVJJe79 lrSG6pe1cnKZn701tHC3SXs8PXzCVzXPfXqTo6lzASeXqis4q9d0ncUCYY/tq+j7//Rg mR6+/LB5ZETCANkKiW2L4iQPae3sTtGB7g5fgFHwmeCgpWWMycLQvzZvrW66/PrRG++u xdYAsm8Q9fRDZyt0nHxgeaIqswWsgI/koE0btcvMi7QjpCro1Pe95706/KJoHGxxs7Xv X4og== MIME-Version: 1.0 X-Received: by 10.182.29.101 with SMTP id j5mr42690157obh.20.1408440378505; Tue, 19 Aug 2014 02:26:18 -0700 (PDT) Received: by 10.182.80.66 with HTTP; Tue, 19 Aug 2014 02:26:18 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Aug 2014 11:26:18 +0200 Message-ID: Subject: Re: When an async request is acknowledged? From: Ivan Brencsics To: users@cxf.apache.org Content-Type: multipart/alternative; boundary=001a11c200ca72c0530500f81431 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c200ca72c0530500f81431 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks a lot Aki for the explanation. 2014-08-18 13:48 GMT+02:00 Aki Yoshida : > 2014-08-15 22:11 GMT+02:00 Ivan Brencsics : > > Thanks for the explanation. From your answer I assume there is no singl= e > > truth here. Let me just have two questions. > > > > 1) If you need to integrate with an external system that publishes some > > kind of oneway services, how do you interprete the HTTP 202 acknowledge= ? > Do > > you assume your message was persisted (so cannot be lost), or that it w= as > > simply read out from the wire, and not processed at all? So do you > > implement some kind of retry mechanism or not? > > The only thing that we can assume is that some component accepted the > message. But we cannot assume if the message will be processed or if > the request was sent to the right service (e.g.., the request might > have been sent to the wrong service and that service responded with an > http 202). > > So you will need to add an "real" acceptance acknowledgement mechanism > either in the protocol layer (e.g., using WS-RM, etc) or in your > application layer (e.g., your synchronously called service putting the > request in a queue and returning an http 202 and then executing the > actual service). For the former, as I described in my previous reply, > the acknowledgement is done using the RM-Ack message and there is no > ack semantics associated with the http 202 response. For the latter, > the http 202 response can be used as an acknowledgement message. > Regarding the retry mechanism, you will have one in the corresponding > layer if you are providing At-Least-Once or Exactly-Once QoS. > > > > > 2) If you need to design a communication specification that interconnec= ts > > systems, and you use oneway services, do you specify what a HTTP 202 > > acknowledge should mean? So do you make it mandatory for the parties > > implementing your protocol to interpret the acknowledge the same way? > > > > Without having the same interpretation, or in other words, the same > protocol, the client cannot assume what is happening for the request > message at the server. I think my answer to question 1 is also > answering this question. > > regards, aki > > > > > > > > > > > 2014-08-14 16:55 GMT+02:00 Aki Yoshida : > > > >> Maybe this is a difficult question to answer. > >> > >> An HTTP 202 response will be returned for a request that has been > >> determined as a oneway service call. If something goes wrong before > >> that happens, there will be some HTTP 4xx/5xx error. The semantics of > >> HTTP 202 may differ depending on what your code (not the service code > >> itself but the extension/feature used with the service) is doing up to > >> that point. > >> > >> > >> 2014-08-14 13:12 GMT+02:00 Iv=C3=A1n Brencsics : > >> > Hi, > >> > > >> > I had a general question about web services. Sorry, it is not relate= d > to > >> > CXF, but this is a so good community, maybe someone can help me:). > >> > > >> > In case of an async web service call the receiver acknowledges the > >> request > >> > with an HTTP 202 usually. What is the semantics of this acknowledge: > >> > > >> > 1) We received the message, will process it later, and if no critica= l > >> > failure happens, will send back an async response. The message might > get > >> > lost. > >> > >> this is the case assumed for plain web services. > >> > >> > > >> > 2) We received the message, validated it, so we can process it later= . > >> Will > >> > send back an async response later if no critical failures. The messa= ge > >> > might get lost. > >> > >> if you add your validation interceptor before the above oneway switch > >> is taking place, you can get this behavior. > >> > >> > > >> > 3) We received, validated and persisted the request. So it wont be > lost. > >> We > >> > will process it, and send back an async response later for sure. > >> > > >> > >> similarly, if you have your custom persistence before the oneway > >> switch, you can also get this behavior. Another way of persisting the > >> request is using WS-RM. But with WS-RM, the HTTP code itself has not > >> much meaning as an Ack, as WS-RM uses its own SOAP based Ack messages > >> that are either returned in the HTTP response or sent back separately > >> using a separate connection to the client. > >> > >> > 4) ... > >> > > >> > Does HTTP 202 has such a semantics, or does it leave the meaning > open? Or > >> > if a system uses async calls, should it decide on its own, what does > >> > "acknowledge" mean? > >> > > >> > Regards, > >> > Ivan > >> > --001a11c200ca72c0530500f81431--