You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Thomas Andraschko <an...@gmail.com> on 2016/10/10 11:47:16 UTC

Simple HTTP client / Feign

Hi @all,

i just discovered the following: https://github.com/OpenFeign/feign

WDYT? Would it be cool to build a similar feature as DS module? (i think
users could also just use feign directly)
We already have the proxy stuff, we would "just" need some annotations and
a handler to parse/execute them.
It would be very similar to the data module.

Regards,
Thomas

Re: Simple HTTP client / Feign

Posted by Gerhard Petracek <ge...@gmail.com>.
hi thomas,

i had a prototype of something quite similar (based on partial-beans).
however, i've stopped with it, because it was too limiting for more
advanced cases.

regards,
gerhard



2016-10-10 13:47 GMT+02:00 Thomas Andraschko <an...@gmail.com>:

> Hi @all,
>
> i just discovered the following: https://github.com/OpenFeign/feign
>
> WDYT? Would it be cool to build a similar feature as DS module? (i think
> users could also just use feign directly)
> We already have the proxy stuff, we would "just" need some annotations and
> a handler to parse/execute them.
> It would be very similar to the data module.
>
> Regards,
> Thomas
>

Re: Simple HTTP client / Feign

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-11-28 13:17 GMT+01:00 John D. Ament <jo...@apache.org>:

> DS - ways to inject the client.  Automate the configuration and bootstrap
> of Feign based clients as CDI beans, without any additional wiring code.
> It just works OOTB.
>
>
@Inject @ConfigProperty + @Produces is good enough for cxf case at least

this kind of api
https://github.com/rmannibucau/cdi-cxf/blob/master/src/test/java/com/github/rmannibucau/cdi/cxf/CxfExtensionTest.java#L45
is really broken compared to ^^


> I think you're assuming you have a JAX-RS runtime.  What if I'm just using
> servlets/jsps and need to call an external service? What about alternate
> REST frameworks like Vert.x, SparkJava?
>
>
You don't care since you use this proxy API so the impl is a detail, no?


> Even with CXF's client library, it comes with the heavy over head of their
> server runtime.  I had already raised a similar feature request in CXF to
> support CDI bootstrapping of their client proxies.  The problem is tying it
> into a configurable URL.  Plus i think you and i have both seen some
> oddities in the CXF space lately.
>
>
we'll get the same in ds so better to fix them where it is IMHO


> John
>
> On Mon, Nov 28, 2016 at 6:25 AM Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > the point was it is already there and even @asf so what would be the
> added
> > value of DS?
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2016-11-28 12:23 GMT+01:00 John D. Ament <jo...@apache.org>:
> >
> > > Romain,
> > >
> > > Portability is one, but even then if you look at Feign its not reliant
> on
> > > JAX-RS either.
> > >
> > > John
> > >
> > > On Mon, Nov 28, 2016 at 2:39 AM Romain Manni-Bucau <
> > rmannibucau@gmail.com>
> > > wrote:
> > >
> > > > Hey John
> > > >
> > > > What is the point? Being portable whatever jaxrs impl?
> > > >
> > > > Maybe we can try to have cxf doing it with few refactoring?
> > > >
> > > > Batche has one trivial impl as well but sounds like wider than DS and
> > > > belonging to a jaxrs impl to me.
> > > >
> > > > Le 28 nov. 2016 04:28, "John D. Ament" <jo...@apache.org> a
> > écrit :
> > > >
> > > > > Sorry to revive this old topic.
> > > > >
> > > > > Personally I'd be in favor of doing something like this.  Are you
> > > > thinking
> > > > > of just doing an integration between Feign and CDI or actually
> fully
> > > > > implement the REST client as a proxy?
> > > > >
> > > > > I was thinking about it... both CXF and RestEasy provide this, but
> > the
> > > > > JAX-RS EG isn't moving forward on a proxy based client and Jersey
> > > doesn't
> > > > > support this.  So it would make standardizing hard.
> > > > >
> > > > > John
> > > > >
> > > > > On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
> > > > > andraschko.thomas@gmail.com> wrote:
> > > > >
> > > > > > Hi @all,
> > > > > >
> > > > > > i just discovered the following:
> > https://github.com/OpenFeign/feign
> > > > > >
> > > > > > WDYT? Would it be cool to build a similar feature as DS module?
> (i
> > > > think
> > > > > > users could also just use feign directly)
> > > > > > We already have the proxy stuff, we would "just" need some
> > > annotations
> > > > > and
> > > > > > a handler to parse/execute them.
> > > > > > It would be very similar to the data module.
> > > > > >
> > > > > > Regards,
> > > > > > Thomas
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Simple HTTP client / Feign

Posted by "John D. Ament" <jo...@apache.org>.
DS - ways to inject the client.  Automate the configuration and bootstrap
of Feign based clients as CDI beans, without any additional wiring code.
It just works OOTB.

I think you're assuming you have a JAX-RS runtime.  What if I'm just using
servlets/jsps and need to call an external service? What about alternate
REST frameworks like Vert.x, SparkJava?

Even with CXF's client library, it comes with the heavy over head of their
server runtime.  I had already raised a similar feature request in CXF to
support CDI bootstrapping of their client proxies.  The problem is tying it
into a configurable URL.  Plus i think you and i have both seen some
oddities in the CXF space lately.

John

On Mon, Nov 28, 2016 at 6:25 AM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> the point was it is already there and even @asf so what would be the added
> value of DS?
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2016-11-28 12:23 GMT+01:00 John D. Ament <jo...@apache.org>:
>
> > Romain,
> >
> > Portability is one, but even then if you look at Feign its not reliant on
> > JAX-RS either.
> >
> > John
> >
> > On Mon, Nov 28, 2016 at 2:39 AM Romain Manni-Bucau <
> rmannibucau@gmail.com>
> > wrote:
> >
> > > Hey John
> > >
> > > What is the point? Being portable whatever jaxrs impl?
> > >
> > > Maybe we can try to have cxf doing it with few refactoring?
> > >
> > > Batche has one trivial impl as well but sounds like wider than DS and
> > > belonging to a jaxrs impl to me.
> > >
> > > Le 28 nov. 2016 04:28, "John D. Ament" <jo...@apache.org> a
> écrit :
> > >
> > > > Sorry to revive this old topic.
> > > >
> > > > Personally I'd be in favor of doing something like this.  Are you
> > > thinking
> > > > of just doing an integration between Feign and CDI or actually fully
> > > > implement the REST client as a proxy?
> > > >
> > > > I was thinking about it... both CXF and RestEasy provide this, but
> the
> > > > JAX-RS EG isn't moving forward on a proxy based client and Jersey
> > doesn't
> > > > support this.  So it would make standardizing hard.
> > > >
> > > > John
> > > >
> > > > On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
> > > > andraschko.thomas@gmail.com> wrote:
> > > >
> > > > > Hi @all,
> > > > >
> > > > > i just discovered the following:
> https://github.com/OpenFeign/feign
> > > > >
> > > > > WDYT? Would it be cool to build a similar feature as DS module? (i
> > > think
> > > > > users could also just use feign directly)
> > > > > We already have the proxy stuff, we would "just" need some
> > annotations
> > > > and
> > > > > a handler to parse/execute them.
> > > > > It would be very similar to the data module.
> > > > >
> > > > > Regards,
> > > > > Thomas
> > > > >
> > > >
> > >
> >
>

Re: Simple HTTP client / Feign

Posted by Romain Manni-Bucau <rm...@gmail.com>.
the point was it is already there and even @asf so what would be the added
value of DS?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-28 12:23 GMT+01:00 John D. Ament <jo...@apache.org>:

> Romain,
>
> Portability is one, but even then if you look at Feign its not reliant on
> JAX-RS either.
>
> John
>
> On Mon, Nov 28, 2016 at 2:39 AM Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
> > Hey John
> >
> > What is the point? Being portable whatever jaxrs impl?
> >
> > Maybe we can try to have cxf doing it with few refactoring?
> >
> > Batche has one trivial impl as well but sounds like wider than DS and
> > belonging to a jaxrs impl to me.
> >
> > Le 28 nov. 2016 04:28, "John D. Ament" <jo...@apache.org> a écrit :
> >
> > > Sorry to revive this old topic.
> > >
> > > Personally I'd be in favor of doing something like this.  Are you
> > thinking
> > > of just doing an integration between Feign and CDI or actually fully
> > > implement the REST client as a proxy?
> > >
> > > I was thinking about it... both CXF and RestEasy provide this, but the
> > > JAX-RS EG isn't moving forward on a proxy based client and Jersey
> doesn't
> > > support this.  So it would make standardizing hard.
> > >
> > > John
> > >
> > > On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
> > > andraschko.thomas@gmail.com> wrote:
> > >
> > > > Hi @all,
> > > >
> > > > i just discovered the following: https://github.com/OpenFeign/feign
> > > >
> > > > WDYT? Would it be cool to build a similar feature as DS module? (i
> > think
> > > > users could also just use feign directly)
> > > > We already have the proxy stuff, we would "just" need some
> annotations
> > > and
> > > > a handler to parse/execute them.
> > > > It would be very similar to the data module.
> > > >
> > > > Regards,
> > > > Thomas
> > > >
> > >
> >
>

Re: Simple HTTP client / Feign

Posted by "John D. Ament" <jo...@apache.org>.
Romain,

Portability is one, but even then if you look at Feign its not reliant on
JAX-RS either.

John

On Mon, Nov 28, 2016 at 2:39 AM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> Hey John
>
> What is the point? Being portable whatever jaxrs impl?
>
> Maybe we can try to have cxf doing it with few refactoring?
>
> Batche has one trivial impl as well but sounds like wider than DS and
> belonging to a jaxrs impl to me.
>
> Le 28 nov. 2016 04:28, "John D. Ament" <jo...@apache.org> a écrit :
>
> > Sorry to revive this old topic.
> >
> > Personally I'd be in favor of doing something like this.  Are you
> thinking
> > of just doing an integration between Feign and CDI or actually fully
> > implement the REST client as a proxy?
> >
> > I was thinking about it... both CXF and RestEasy provide this, but the
> > JAX-RS EG isn't moving forward on a proxy based client and Jersey doesn't
> > support this.  So it would make standardizing hard.
> >
> > John
> >
> > On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
> > andraschko.thomas@gmail.com> wrote:
> >
> > > Hi @all,
> > >
> > > i just discovered the following: https://github.com/OpenFeign/feign
> > >
> > > WDYT? Would it be cool to build a similar feature as DS module? (i
> think
> > > users could also just use feign directly)
> > > We already have the proxy stuff, we would "just" need some annotations
> > and
> > > a handler to parse/execute them.
> > > It would be very similar to the data module.
> > >
> > > Regards,
> > > Thomas
> > >
> >
>

Re: Simple HTTP client / Feign

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hey John

What is the point? Being portable whatever jaxrs impl?

Maybe we can try to have cxf doing it with few refactoring?

Batche has one trivial impl as well but sounds like wider than DS and
belonging to a jaxrs impl to me.

Le 28 nov. 2016 04:28, "John D. Ament" <jo...@apache.org> a écrit :

> Sorry to revive this old topic.
>
> Personally I'd be in favor of doing something like this.  Are you thinking
> of just doing an integration between Feign and CDI or actually fully
> implement the REST client as a proxy?
>
> I was thinking about it... both CXF and RestEasy provide this, but the
> JAX-RS EG isn't moving forward on a proxy based client and Jersey doesn't
> support this.  So it would make standardizing hard.
>
> John
>
> On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
> andraschko.thomas@gmail.com> wrote:
>
> > Hi @all,
> >
> > i just discovered the following: https://github.com/OpenFeign/feign
> >
> > WDYT? Would it be cool to build a similar feature as DS module? (i think
> > users could also just use feign directly)
> > We already have the proxy stuff, we would "just" need some annotations
> and
> > a handler to parse/execute them.
> > It would be very similar to the data module.
> >
> > Regards,
> > Thomas
> >
>

Re: Simple HTTP client / Feign

Posted by "John D. Ament" <jo...@apache.org>.
Sorry to revive this old topic.

Personally I'd be in favor of doing something like this.  Are you thinking
of just doing an integration between Feign and CDI or actually fully
implement the REST client as a proxy?

I was thinking about it... both CXF and RestEasy provide this, but the
JAX-RS EG isn't moving forward on a proxy based client and Jersey doesn't
support this.  So it would make standardizing hard.

John

On Mon, Oct 10, 2016 at 7:47 AM Thomas Andraschko <
andraschko.thomas@gmail.com> wrote:

> Hi @all,
>
> i just discovered the following: https://github.com/OpenFeign/feign
>
> WDYT? Would it be cool to build a similar feature as DS module? (i think
> users could also just use feign directly)
> We already have the proxy stuff, we would "just" need some annotations and
> a handler to parse/execute them.
> It would be very similar to the data module.
>
> Regards,
> Thomas
>

Re: Simple HTTP client / Feign

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Thomas

Cxf supports it OOTB and just needs a @Produces, not sure our added value
there.

Le 10 oct. 2016 13:47, "Thomas Andraschko" <an...@gmail.com> a
écrit :

Hi @all,

i just discovered the following: https://github.com/OpenFeign/feign

WDYT? Would it be cool to build a similar feature as DS module? (i think
users could also just use feign directly)
We already have the proxy stuff, we would "just" need some annotations and
a handler to parse/execute them.
It would be very similar to the data module.

Regards,
Thomas