You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Ioannis Canellos <io...@gmail.com> on 2012/01/04 10:24:10 UTC

Abstractions for Key/Value components and Serializers

As camel component list grows, I can see a lot of components doing similar
things, but every component does things in its own way. A very common
example are key/value components, here are some:

camel-cache
camel-hazelcast
camel-krati
camel-solr
etc.

Each of the components listed above, behaves differently. Each component
uses its own headers. Some components support key/values in the query
string, some others don't and even when they do the names of the query
parameters might be different.

The result is lack transparency/conformity. I think that it would be a
great improvement to abstract some of the key/value concepts (a
KeyValueEndpoint/KeyValueProducer/KeyValueConsumer maybe?) and align those
components so that they all work in a similar fashion.

Some of the components above also use serialization internally in order to
serialize/deserialize key & value (e.g. krati/hbase). For this case data
formats are not a really good fit (imho). I think that it would make sense
to have an abstractions serializer that could be passed to an endpoint that
supports pluggable serialization.

What do you think?

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: Abstractions for Key/Value components and Serializers

Posted by Babak Vahdat <ba...@swissonline.ch>.
@Ioannis,

in the context of this discussion I've asked a question in [1] which I hope
you could please answer it. Thanks!

[1] https://issues.apache.org/jira/browse/CAMEL-4566

Babak

--
View this message in context: http://camel.465427.n5.nabble.com/Abstractions-for-Key-Value-components-and-Serializers-tp5119152p5131110.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Abstractions for Key/Value components and Serializers

Posted by Bilgin Ibryam <bi...@gmail.com>.
Thanks for bringing up this topic Ioannis.


On 4 January 2012 09:24, Ioannis Canellos <io...@gmail.com> wrote:
> As camel component list grows, I can see a lot of components doing similar
> things, but every component does things in its own way. A very common
> example are key/value components, here are some:
>
> camel-cache
> camel-hazelcast
> camel-krati
> camel-solr
> etc.


While writing some of the camel components recently I also had hard
time figuring out what is the preferred way of doing these tasks,
because there is no consistency among existing components.

>
> Each of the components listed above, behaves differently. Each component
> uses its own headers. Some components support key/values in the query
> string, some others don't and even when they do the names of the query
> parameters might be different.
>
> The result is lack transparency/conformity. I think that it would be a
> great improvement to abstract some of the key/value concepts (a
> KeyValueEndpoint/KeyValueProducer/KeyValueConsumer maybe?) and align those
> components so that they all work in a similar fashion.

In addition to abstracting these components, having some guidelines
for consistent naming of the header keys and URI options would also be
helpful I believe.

It seems like the current convention is to name headers like: Camel +
ComponentName+ HeaderName but it is not used this way everywhere.

my 2p
Bilgin

>
> Some of the components above also use serialization internally in order to
> serialize/deserialize key & value (e.g. krati/hbase). For this case data
> formats are not a really good fit (imho). I think that it would make sense
> to have an abstractions serializer that could be passed to an endpoint that
> supports pluggable serialization.
>
> What do you think?
>
> --
> *Ioannis Canellos*
> *
> FuseSource <http://fusesource.com>
>
> **
> Blog: http://iocanel.blogspot.com
> **
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache Camel <http://camel.apache.org/> Committer
> Apache ServiceMix <http://servicemix.apache.org/>  Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
> *