camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <>
Subject Re: Mega mega (VFS) file handler
Date Thu, 08 Jan 2009 08:25:16 GMT
On Thu, Jan 8, 2009 at 8:59 AM, Ramon Buckland <> wrote:
>> Yeah that is a missing piece in Camel. A lot of integration is file
>> based using FTP with all kind of zipped or not zipped files.
>> Would be nice to be able to zip/unzip directly from Camel instead of
>> must use script files.
> Very nice. commons-vfs is good. How would you suggest I go about creating a
> mega commons-vfs component ?
> Do I swing it off the file:// implementation ? As I mentioned I have freed
> the evening to work on this (in the hope that it will be easy /. (haha).
> Any suggestions for where to start ? I guess pinning down the vfs URL
> format, to me is quite crucial.
I recently did a lot of refactor in Camel 2.0 on the ftp/sftp
component towards a goal of a VFS in Camel itself.
So there code be shared code between file and ftp component.

What basically needs to be done to add a potential new file based
component is (based on the ftp refactoring).

1) Implement transport specific consumer (see FtpConsumer,
SftpConsumer, and FileConsumer)
2) Implement transport specific operations (see FtpOperations, SFTPOperations)

That's it. Well if you added a new transport to camel-ftp that is. But
this could pave the way for the Camel VFS, where we basically needs to
refactor the file component to implement a FileOperations as well.
Then they could all share the same producer.

> vfs: ??
> How would you see " polling a remote endpoint to an ever changing named ZIP
> file be handled ?
> eg: Each day a ZIP arrives .. sftp://user@host://,
> Given that vfs has the sftp capability in it .. would the URI look like (to
> capture the rolling day)
> vfs:zip:sftp://user@somehost/downloads/myfile-${date:now:yyyy-MM-dd}.zip?consumer.delay=86400000
Ah yeah that would be cool. I guess we have the blocks already in
Camel with the file language and the expression option (for the

I will create a ticket to get this into Camel file + ftp component.

It could be supported like this.

The current problem is that the file component is based on the fact
that the starting folder/file is a object and I guess it
dont like the dynamic notation. So we might need a refactor there as
well, to get it directly in the URI when consuming. In fact it could
also be done for producing.

This change will be on the Camel 2.0. The file and ftp components in
1.x is kinda a bit ugly in some areas hence the big refactor in Camel

> ?
>> We could also consider adding our own component for TrueZip support to
>> be able to read/write archives, if commons-vfs doesnt pick it up.
> Or just provide a patched version on a public repo, until they do put it in?
> Not ideal, but after all this is open source software :-)


/Claus Ibsen
Apache Camel Committer

View raw message