camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <ja...@fusesource.com>
Subject Re: Service architecture
Date Tue, 29 Mar 2011 11:21:52 GMT
On 29 March 2011 11:58, gonzalo diethelm <gdiethelm@dcv.cl> wrote:
>> Hi Gonzalo.
>
> Hi Claus, thanks for your insight.
>
>> > 0. First off, does it really make sense to turn my back to J(2)EE?  I
>> know I would be giving up a significant amount of "baseline", but I am
>> really hungry for some lean and mean architecture.  Opinions?
>>
>> If you feel hungry - do it. I think you can do everything without JEE in
>> a smart way, too. ;)
>
> Great.
>
>> > 1. How do you feel about RESTful vs. SOAP?  Do you think it is a good
>> idea to ignore frameworks such as CXF and go with something like jetty for
>> my (RESTful) RPC endpoints?
>>
>> I think there is no REST vs. SOAP. They have both advantages and
>> disadvantages. With camel you're free to provide both with a little more
>> effort. If you only want to provide simple CRUD style services, REST
>> seems a little bit easier to use. And in combination with camel and
>> jetty (the jetty component) you can do great things like internally non
>> blocking sync calls.
>
> Excellent. And yes, until now all I see in my requirements are CRUD services.
>
> One thing I have not been able to figure out is how to expose all these CRUD services
over jetty. Just as an example, let's say I will handle account objects and will want to support
three actions on them:
>
> GET /account/{id} => retrieve that account
> PUT /account/{id}/balance/{bal} => update that account's balance
> DELETE /account/{id} => delete that account

When building RESTful services am personally a big fan of JAXRS (I
tend to use Jersey but there are various providers out there such as
CXF, RestEasy).

While you can use Camel to consume RESTful services, I find JAXRS is a
better programming model where you can focus purely on being a good
RESTful API and getting your URI templates correct and so forth. You
can then reuse Camel whenever you like inside your resource beans etc.

-- 
James
-------
FuseSource
Email: james@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan
Blog: http://macstrac.blogspot.com/

Open Source Integration

Mime
View raw message