Camel-REST vs Cxfrs

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

Camel-REST vs Cxfrs

DariusX
I would like to expose some Camel routes via REST, and am considering using the REST DSL. (I do not have  pre-existing REST-based web-service components.)

Is there any reason/advantage to using camel-cxfrs or some other such component that supports REST in such a scenario?

It appears to me that the Camel REST DSL is always the way to go unless one has legacy reasons to use something else, but I'd appreciate someone telling me if that's a wrong assumption. Also, is there a page somewhere on the Camel site that would speak to this: i.e. the motivation of using one over the other?

thanks
Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

souciance
I guess it strictly depends on your requirements. If the REST DSL satisfy your requirements and a POC shows it works for you it probably makes sense to use it. I am not sure if there is such a condition as to always use one above the other, unless off course the camel-cxfrs will be discontinued, which I haven't heard.

On Mon, Oct 31, 2016 at 5:02 PM, DariusX [via Camel] <[hidden email]> wrote:
I would like to expose some Camel routes via REST, and am considering using the REST DSL. (I do not have  pre-existing REST-based web-service components.)

Is there any reason/advantage to using camel-cxfrs or some other such component that supports REST in such a scenario?

It appears to me that the Camel REST DSL is always the way to go unless one has legacy reasons to use something else, but I'd appreciate someone telling me if that's a wrong assumption. Also, is there a page somewhere on the Camel site that would speak to this: i.e. the motivation of using one over the other?

thanks


If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523.html
To start a new topic under Camel - Users, email [hidden email]
To unsubscribe from Camel - Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

Sergey Beryozkin
On 01/11/16 07:42, souciance wrote:
> I guess it strictly depends on your requirements. If the REST DSL satisfy
> your requirements and a POC shows it works for you it probably makes sense
> to use it. I am not sure if there is such a condition as to always use one
> above the other, unless off course the camel-cxfrs will be discontinued,
> which I haven't heard.
I don't think it will be discontinued

Cheers, Sergey

>
> On Mon, Oct 31, 2016 at 5:02 PM, DariusX [via Camel] <
> [hidden email]> wrote:
>
>> I would like to expose some Camel routes via REST, and am considering
>> using the REST DSL. (I do not have  pre-existing REST-based web-service
>> components.)
>>
>> Is there any reason/advantage to using camel-cxfrs or some other such
>> component that supports REST in such a scenario?
>>
>> It appears to me that the Camel REST DSL is always the way to go unless
>> one has legacy reasons to use something else, but I'd appreciate someone
>> telling me if that's a wrong assumption. Also, is there a page somewhere on
>> the Camel site that would speak to this: i.e. the motivation of using one
>> over the other?
>>
>> thanks
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523.html
>> To start a new topic under Camel - Users, email
>> [hidden email]
>> To unsubscribe from Camel - Users, click here
>> <
>> .
>> NAML
>> <
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523p5789541.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

Claus Ibsen-2
In reply to this post by DariusX
There are some JIRA tickets to integrate camel-cxf with rest-dsl.
However this requires some changes in CXF to facilitate this.

Some of the CXF committers from Talend said they would like to work on
that, but they don't seem to had the time yet to work on this.

That said you can always code REST services using plain JAX-RS java
code style also. Or if using Spring Boot then how they do it with
their controllers.

Camel in Action 2nd ed book has a full chapter on REST and various
ways to use it with Camel.

On Mon, Oct 31, 2016 at 5:02 PM, DariusX <[hidden email]> wrote:

> I would like to expose some Camel routes via REST, and am considering using
> the REST DSL. (I do not have  pre-existing REST-based web-service
> components.)
>
> Is there any reason/advantage to using camel-cxfrs or some other such
> component that supports REST in such a scenario?
>
> It appears to me that the Camel REST DSL is always the way to go unless one
> has legacy reasons to use something else, but I'd appreciate someone telling
> me if that's a wrong assumption. Also, is there a page somewhere on the
> Camel site that would speak to this: i.e. the motivation of using one over
> the other?
>
> thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

Claus Ibsen-2
Oh also camel-cxf with cxfrs is a bit to bloated with both WS and RS
mixed together. There is also a JIRA ticket to separate this and make
the dependencies smaller and leaner.


On Tue, Nov 1, 2016 at 11:48 AM, Claus Ibsen <[hidden email]> wrote:

> There are some JIRA tickets to integrate camel-cxf with rest-dsl.
> However this requires some changes in CXF to facilitate this.
>
> Some of the CXF committers from Talend said they would like to work on
> that, but they don't seem to had the time yet to work on this.
>
> That said you can always code REST services using plain JAX-RS java
> code style also. Or if using Spring Boot then how they do it with
> their controllers.
>
> Camel in Action 2nd ed book has a full chapter on REST and various
> ways to use it with Camel.
>
> On Mon, Oct 31, 2016 at 5:02 PM, DariusX <[hidden email]> wrote:
>> I would like to expose some Camel routes via REST, and am considering using
>> the REST DSL. (I do not have  pre-existing REST-based web-service
>> components.)
>>
>> Is there any reason/advantage to using camel-cxfrs or some other such
>> component that supports REST in such a scenario?
>>
>> It appears to me that the Camel REST DSL is always the way to go unless one
>> has legacy reasons to use something else, but I'd appreciate someone telling
>> me if that's a wrong assumption. Also, is there a page somewhere on the
>> Camel site that would speak to this: i.e. the motivation of using one over
>> the other?
>>
>> thanks
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

Sergey Beryozkin
In reply to this post by Claus Ibsen-2
Claus,
On 01/11/16 10:48, Claus Ibsen wrote:
> There are some JIRA tickets to integrate camel-cxf with rest-dsl.
> However this requires some changes in CXF to facilitate this.
>
It is not quite correct. As I pointed out at the time, while attaching
the initial patches to the relevant Camel issues, the initial POC (where
absolute HTTP addresses were used as far as I recall) was working, what
was missing was the good tests and the support for some other deployment
scenarios (Blueprint, etc).
> Some of the CXF committers from Talend said they would like to work on
> that, but they don't seem to had the time yet to work on this.
>
Not quite correct either (see above). Unfortunately, yes, finding time
to complete this project is a problem - it would require a full time one
or 2 weeks commitment at least and it is difficult to allocate such a
time...

My own opinion is it will be worth completing the REST-DSL over CXF-RS
project and the foundation (in the form of the initial patches) is
available.

Cheers, Sergey

> That said you can always code REST services using plain JAX-RS java
> code style also. Or if using Spring Boot then how they do it with
> their controllers.
>
> Camel in Action 2nd ed book has a full chapter on REST and various
> ways to use it with Camel.
>
> On Mon, Oct 31, 2016 at 5:02 PM, DariusX <[hidden email]> wrote:
>> I would like to expose some Camel routes via REST, and am considering using
>> the REST DSL. (I do not have  pre-existing REST-based web-service
>> components.)
>>
>> Is there any reason/advantage to using camel-cxfrs or some other such
>> component that supports REST in such a scenario?
>>
>> It appears to me that the Camel REST DSL is always the way to go unless one
>> has legacy reasons to use something else, but I'd appreciate someone telling
>> me if that's a wrong assumption. Also, is there a page somewhere on the
>> Camel site that would speak to this: i.e. the motivation of using one over
>> the other?
>>
>> thanks
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Camel-REST-vs-Cxfrs-tp5789523.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/
Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

DariusX
In reply to this post by Claus Ibsen-2
Claus Ibsen-2 wrote
Camel in Action 2nd ed book has a full chapter on REST and various ways to use it with Camel.
Yes, looking at the MEAP edition got me wondering if that was the general direction: i.e. to encourage the use of the REST DSL unless there were specific reasons for one of the other approaches.

Thank you both for your answers; very informative.
Reply | Threaded
Open this post in threaded view
|

Re: Camel-REST vs Cxfrs

Brad Johnson
I supposed that's a matter of preference. I've used CXF in blueprint and am
very comfortable with it.  I'll usually us a single bundle and commonly
setup up both SOAP and REST endpoints in there using annotated interfaces.
Then I'll use the operationName in a recipient list to route the requests
to the same bundle, whether SOAP or REST, and then deal with the logic in
there and return results.

I like that because it puts the set up of all security, REST/SOAP, etc. in
one place.  The data model/bean is then routed into Camel and that point
I'm free of any REST/SOAP concerns.

But I may like that simply because I've never used the REST DSL and don't
anticipate any immediate need for it.

On Tue, Nov 1, 2016 at 7:51 AM, DariusX <[hidden email]> wrote:

> Claus Ibsen-2 wrote
> > Camel in Action 2nd ed book has a full chapter on REST and various ways
> to
> > use it with Camel.
>
> Yes, looking at the MEAP edition got me wondering if that was the general
> direction: i.e. to encourage the use of the REST DSL unless there were
> specific reasons for one of the other approaches.
>
> Thank you both for your answers; very informative.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-REST-vs-Cxfrs-tp5789523p5789571.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>