Simple HTTP client / Feign

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple HTTP client / Feign

Thomas Andraschko-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

Romain Manni-Bucau
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" <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

Gerhard Petracek
Administrator
In reply to this post by Thomas Andraschko-2
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 <[hidden email]>:

> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

John D. Ament
In reply to this post by Thomas Andraschko-2
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 <
[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

Romain Manni-Bucau
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" <[hidden email]> 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 <
> [hidden email]> 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
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

John D. Ament
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 <[hidden email]>
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" <[hidden email]> 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 <
> > [hidden email]> 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
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

Romain Manni-Bucau
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 <[hidden email]>:

> 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 <[hidden email]>
> 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" <[hidden email]> 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 <
> > > [hidden email]> 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
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

John D. Ament
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 <[hidden email]>
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 <[hidden email]>:
>
> > 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 <
> [hidden email]>
> > 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" <[hidden email]> 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 <
> > > > [hidden email]> 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
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Simple HTTP client / Feign

Romain Manni-Bucau
2016-11-28 13:17 GMT+01:00 John D. Ament <[hidden email]>:

> 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 <[hidden email]>
> 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 <[hidden email]>:
> >
> > > 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 <
> > [hidden email]>
> > > 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" <[hidden email]> 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 <
> > > > > [hidden email]> 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
> > > > > >
> > > > >
> > > >
> > >
> >
>