camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Burgazzoli <lburgazz...@gmail.com>
Subject Re: Cyclomatic complexity of camel-redis
Date Tue, 31 May 2016 16:05:28 GMT
You may also have a look at HeaderSelectorProducer which let you to
use annotations and/or lambdas as callbacks for a given header  i.e. :

https://github.com/apache/camel/blob/master/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/ConsulAgentProducer.java
https://github.com/apache/camel/blob/master/components/camel-consul/src/main/java/org/apache/camel/component/consul/enpoint/ConsulKeyValueProducer.java
---
Luca Burgazzoli


On Tue, May 31, 2016 at 5:57 PM, Bilgin Ibryam <bibryam@gmail.com> wrote:
> Hi arno,
>
>
>
> With modern javac and JVMs I don't think there will be any performance
> or footprint impact from having one or more classes.
>
> Apart from CC, consider also whether the code will be easier to
> understand/maintain and extend. If you belive it will be bettter, then
> go for it.
> we at Camel community love contributions.
>
> Bilgin
>
>
>
> On 31 May 2016 at 06:54, arno noordover <anoordover@gmail.com> wrote:
>> The CommandDispatcher in redis-component has a high cyclomatic complexity.
>> It is relatively simple to extract all redis-command to its own class and
>> put these classes in a HashMap.
>> This means that a lot of classes will emerge (one for every entry in the
>> Command-enum).
>> But it also means that extension will be easier when we drop the
>> Command-enum and let each redis-command have knowledge about which String
>> should be used to identify a certain Command.
>> Can anybody guess what the impact will be when we add a lot of small classes
>> in component?
>> Will this impact performance or footprint?
>> Is this a price that we are willing to pay?
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Cyclomatic-complexity-of-camel-redis-tp5783270.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>
>
>
> --
> Bilgin Ibryam
> Camel Committer at ASF & Integration Architect at Red Hat
> Blog: http://ofbizian.com | Twitter: @bibryam
>
> Camel Design Patterns https://leanpub.com/camel-design-patterns
> Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475

Mime
View raw message