camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <deepa...@accenture.com>
Subject RE: Excess usage of Bean Component - performance impacts
Date Tue, 14 Jun 2011 03:23:30 GMT
Thanks Ben / Hadrian!

Fine grain seems the way to go preferable to implement EIP.

Thanks,
Deepa

-----Original Message-----
From: Hadrian Zbarcea [mailto:hzbarcea@gmail.com]
Sent: Tuesday, June 14, 2011 3:32 AM
To: users@camel.apache.org
Subject: Re: Excess usage of Bean Component - performance impacts

I personally prefer the finer grained approach. There is a very small
overhead in terms of camel piping going fine grained and obviously
requires a bit more proficiency with camel (which comes quite quickly
though).

There are however imho huge gains stemming from encouraging a developer
to better design/architect her solution. Having multiple finer grained
tasks organized in a route (even pipeline) helps with maintenance, like
Ben said (if you need to improve something you need to
change/replace/test/redeploy) a small part of your application. It then
helps with scalability, as you can split a route and deploy parts of it
on multiple boxes or at the very least throw more threads at a
particular task. Also the dsl of the route gives a better idea of what
the processing really does (although more verbose) vs if it was one
coarse bean that needs to be documented. It is also trivial to split the
route and hide that complexity behind something like a "direct:"
endpoint if you want your routes to be smaller.

But like Ben said, it all depends on your situation.

My $0.02,
Hadrian




On 06/13/2011 05:23 PM, boday wrote:
> It just depends on your situation.  Both are viable approaches...approach #1
> will have slightly more overhead, but gives you greater flexibility because
> your bean calls are more granular, etc.
>
> If there is an EIP pattern that you'd like to leverage, break things up into
> multiple calls and use Camel in between the calls.  Otherwise, a more coarse
> bean call is generally easier to read/maintain/test, etc.
>
>
> Deepa wrote:
>>
>> hi,
>>
>> I am new to Camel. I find Camel a great framework.
>>
>> Configuring routes to invoke processing methods using bean component is an
>> intutive way of organizing route.
>>
>> My question -
>> Approach 1 - Can we use bean component (bean uris) several times?
>> Ex -<camel:to uri="bean:bean1?method:postprocessing1>
>>         <camel:to uri="bean:bean1?method:postprocessing2Log>
>>         <camel:to
>> uri="bean:bean1?method:postprocessing3UpdateSomeInfoInResponseObject>
>>         <camel:to
>> uri="bean:bean1?method:postprocessing4UpdateSomeMoreInfoInResponseObject>
>>
>> Approach 2 -
>> <camel:to uri="bean:bean1?method:postprocessing1>
>>
>> In postprocessing1 - Programmatically (in a modular fashion ofcourse) do
>> all the post processing?
>>
>> Also by some basic profiling I found out approach 2 seem to give better
>> performance than approach 1.
>>
>> Which is the recommended approach? What would be considered over usage of
>> the framework.
>>
>> Thanks,
>> Deepa
>>
>
>
> -----
> Ben O'Day
> IT Consultant -http://consulting-notes.com
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Excess-usage-of-Bean-Component-performance-impacts-tp4483913p4485766.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



  ________________________________
This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information. If you have received it in error, please notify the sender
immediately and delete the original. Any other use of the email by you is prohibited.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message