On 03/01/2008, tog <[EMAIL PROTECTED]> wrote:
>
> I find the idea of the Camel DSL pretty interesting. While I see typical
> enterprise scenario for using Camel, I am still wondering if it can be used
> for what I am doing. Therefore, I would be interested to receive your
> comments. I am mainly involved in scientific computing where we have to
> chain different applications. An application is (roughly) a piece of code
> that "eat" and "produce" files (nothing ambitious so far ;-) - files might
> be (very) large. Then we want to chain the applications, some output files
> going to some app, some others possibly to other apps.
>
> So it looks quite different to the message model used by Camel.

A message can be a File.
http://activemq.apache.org/camel/file.html

e.g. when routing files from some directory to some processes...

from("file://some/dir").beanRef("myBean");

the body is actually a File object that the bean can process as an
InputStream, Reader, ByteBuffer, byte[], String, DOM or whatever.


> Should I consider that the different files generated by an application
> belong to the same "message" then multicast and filter the message so that
> the next applications only get what they need ?

Does an application generate multiple files that you want to group
together? Or just send each file as a separate message to some
processor?


> Are files (and moving files around) something "natural" in Camel ?

Definitely! :)

e.g. browse directories for files and send them to a message queue (or
a Java Bean or whatever). The first two examples do this...
http://activemq.apache.org/camel/examples.html

The ETL example shows how to bulk load data from files into databases
(as another way of working with files)
http://activemq.apache.org/camel/etl-example.html


> PS: Any groovy example around ?

Unfortunately not yet. There's an example of writing the DSL in groovy here...
http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-groovy/src/test/resources/org/apache/camel/language/groovy/example/GroovyRoutes.groovy

or using Groovy inside the XML routing
http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-groovy/src/test/resources/org/apache/camel/processor/groovy/groovyFilter.xml

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to