Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB72318825 for ; Fri, 9 Oct 2015 20:21:28 +0000 (UTC) Received: (qmail 57156 invoked by uid 500); 9 Oct 2015 20:21:28 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 57078 invoked by uid 500); 9 Oct 2015 20:21:28 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 57060 invoked by uid 99); 9 Oct 2015 20:21:28 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2015 20:21:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C36D8C1733 for ; Fri, 9 Oct 2015 20:21:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8Q_aeXhLkbKe for ; Fri, 9 Oct 2015 20:21:27 +0000 (UTC) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5A8A724E1C for ; Fri, 9 Oct 2015 20:21:26 +0000 (UTC) Received: by wicgb1 with SMTP id gb1so82777567wic.1 for ; Fri, 09 Oct 2015 13:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=E3ItM7VAylUo+rxmUoHCsjAAW9dNNNTxGeqKpIrBJoo=; b=VoqXuJwN+bwnv3V01EcliAZ/fbQfUbjaRCsOdlZPpFmCatk/O3+Vdpk4c5nWFNxV8x k+qExENla4+WYrfar28UIiRdIWUXbwbHpMvgzId4/jZyC5G2fZNwAicFKC3ZRR8AmUKz LnvWxOv/rcM43tHevV5r9U7e+JJ6mKE1FPhNVuozztHI6aYckzeJzSm823lOu51CMTYG 3CtqRKkUgk5WM7fNeL2n02eLD/Abh6yMr/45Nrkof5ToAS6tWTLGOaNSHBpdVC5ByOlW miS7ij781kQI95G5e6K/HW7UJXCWHhSJgb5l7DLkp3pyGjPlTOHpQrLynTR7gN41VLq2 Az1Q== X-Received: by 10.180.187.205 with SMTP id fu13mr1162580wic.81.1444422086071; Fri, 09 Oct 2015 13:21:26 -0700 (PDT) Received: from [192.168.2.7] ([109.255.216.8]) by smtp.googlemail.com with ESMTPSA id lf10sm3999175wjb.23.2015.10.09.13.21.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Oct 2015 13:21:25 -0700 (PDT) Subject: Re: Vert.x support To: dev@cxf.apache.org References: <052201d102bd$a6ef2520$f4cd6f60$@binarygenetics.com> From: Sergey Beryozkin Message-ID: <561821BA.9060200@gmail.com> Date: Fri, 9 Oct 2015 21:21:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <052201d102bd$a6ef2520$f4cd6f60$@binarygenetics.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi Thanks for your proposal. Personally I do not have any experience with Vert.x. However we expect that JAX-RS 2.1 proposal on the reactive client API be available next week. Once we analyze it we can start reviewing which framework/mechanism can help us with implementing this reactive API proposal. Checking Vert.x docs suggests that it can possibly help in this area. Re your proposal below. Can JAX-RS 2.0 AsyncResponse be somehow relevant ? I.e, can it help doing what you expect to be able to do if your proposal is accepted ? Note we also expect a JAX-RS 2.1 proposal on non-blocking IO be available next week - I'm not sure yet how/if it will be related somehow to what Vert.x can do on the server side. I guess Vert.x is Java 8 based ? We are very close now to opening a Java 8 trunk now that the last quarter is nearly here, but we have still a Java 7 trunk... Cheers, Sergey On 09/10/15 19:09, Michael Putters wrote: > Hello, > > > > > > I'd very interested in having JAX-RS annotations - and a CXF implementation > for them - running within Vert.x, for two main reasons: > > > > 1. the typical features you get from CXF (duh), with the possibility > of doing operations asynchronously re-using the continuation mechanism > already present > > 2. to use Vert.x as a mostly-automated API gateway: > > a. some of the back-end's micro services would be registered in the > gateway (using the JAR that holds the interface with the JAX-RS annotations) > > b. the implementation of those services would be a simple proxy that > forwards the request to the back-end through an asynchronous CXF client, > once the typical validation/etc. are performed > > c. interceptors would make it possible to add features such as the > ability to do throttling/etc. based on tokens, for example > > > > The main advantage over servlets being the event-based I/O rather than > distributing requests over a pool of threads. > > > > Now, I'm fairly new to the CXF codebase, but I've used CXF quite a bit in > the past (but also Camel, so the whole Message/Exchange part is not entirely > foreign to me). Which leads to me think maybe I could try to get this > working and submit a pull-request when it gets to a point where it's > useable. > > > > However, just to make sure my pull-request doesn't get instantly refused, I > have some question regarding what I plan to do (mostly: is it OK if I do it > this way?). Here's the plan: > > > > - turn the cxf-rt-transports-http project and its classes into > something more abstract, extracting the servlet-specific parts to a new > cxf-rt-transports-http-servlet project; this is mostly the various > parts/methods that use ServletConfig, ServletContext, HttpServletRequest, > etc. > > - this cxf-rt-transports-http-servlet project would depend on > cxf-rt-transports-http and implement servlet-specific versions of the > generic abstract classes and methods present in cxf-rt-transports-http > > - create a cxf-rt-transport-http-vertx project that does just the > same, but using Vert.x classes and mechanisms rather than the servlet > equivalent, eg: HttpServletRequest becomes HttpServerRequest > > - update the cxf-rt-transports-http-* projects so that they depend > on cxf-rt-transports-http-servlet rather than cxf-rt-transports-http > > > > This would cover a first step that only includes a slice of the server-side > elements and nothing regarding the CXF client. > > > > Can anyone confirm that this would be the right way to add Vert.x support to > CXF? > > > > Thanks, > > > > > > Michael > >