You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mattias Severson <ma...@gmail.com> on 2010/05/28 12:58:23 UTC

Dynamic origin file components?

Is it possible to create file components dynamically?

I have an interface that gives me File objects (after a physical file has
been created on disk) that I would like to send to a remote FTP address. The
files are created one at the time, in different folders and with different
file names. The files should only be sent once and should also remain on the
origin location after they have been sent, e.g. by using the noop option.



void sendViaFtp(File file, String userName, String host) {
    from(getFileUri(file)).to(getFtpUri(userName, host, file));
}

private static String getFileUri(File file) {
    return String.format("file://%s?fileName=%s?noop=true",
filenameUtils.getPath(file.getAbsolutePath()), file.getName());
}

private static String getFtpUri(String userName, String host, File file) {
    return String.format("ftp://%s@%s/%s", userName, host, file.getName());
}



-- 
View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28705368.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Dynamic origin file components?

Posted by Mattias Severson <ma...@gmail.com>.
I found the error. It seems like the FTP server that I am is configured to
passive mode. Consequently, the solution is as follows:

ftp://user@host:21/remote_directory?password=secret&passiveMode=true

/Mattias
-- 
View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28733073.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Dynamic origin file components?

Posted by Mattias Severson <ma...@gmail.com>.
Hmm, there seem to be a problem when I attempt to verify the suggested
solution:

I have a local file on my computer
/Users/mattias/local_directory/ftp-test.txt
The URI I use is of type ftp://user@host:21/remote_directory?password=secret
The Exchange.FILE_NAME in the header is set to ftp-test.txt

I have verified that the file exists locally (file.exists() == true), that
the ftp server is working and that the provided user has write access on the
FTP server (by logging in with a standalone FTP client using the same
credentials and sending a file) and that the remote_directory exists on the
FTP server.

This is the information that I receive:

INFO  [17:17:01 - main] RemoteFileProducer: Connected and logged in to:
Endpoint[ftp://user@host:21/remote_directory?password=secret]
WARN  [17:17:01 - main] RemoteFileProducer: Writing file failed with: Error
writing file [remote_directory/ftp-test.txt]
ERROR [17:17:01 - main] FtpDeliveryImpl: Failed to FTP file
"/Users/mattias/local_directory/ftp-test.txt" to recipient
"ftp://user@host:21/remote_directory?password=secret"
org.apache.camel.component.file.GenericFileOperationFailedException: Error
writing file [remote_directory/ftp-test.txt]


>From this I conclude that the FTP connection is successfully established,
but the file transfer fails.

When debugging I find that the FTPClient.storeFile() returns false because
the FTP response code is 500 (Syntax error, command unrecognized. This may
include errors such as command line too long.), but I fail to see that I
have done anything wrong?


The development machine runs Mac OS 10.6 and the remote FTP server runs on
some Linux distrubution. 
Camel version 2.3


Any suggestion is appreciated.

/Mattias




Claus Ibsen-2 wrote:
> 
> And the file will thus be kept as it was.
> 
> ProducerTemplate template = ...
> File target = new File("the file name here");
> 
> template.sendBodyAndHeader(ftpEndpointHere, target,
> Exchange.FILE_NAME, "the file name to be written on the ftp server");
> 

-- 
View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28732839.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Dynamic origin file components?

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, May 28, 2010 at 6:30 PM, Mattias Severson <ma...@gmail.com> wrote:
>
> That seems like a neat solution. :-)
>
> Question:
> Is it possible to send several files to one receiver in a similar way (e.g.
> by providing a Collection<File> as body)? Naturally, I can iterate over the
> file collection and send the files one by one, but I guess that the
> performance would be better if all files can be sent during the same FTP
> session.
>

It should reuse the same ftp client and check whether its already
connected so just iterate and send the files one by one.
You can however force the ftp client to disconnect after each use, but
you have to turn that on with disconnect=true.

So out of the box it should work fine for you.


>
> Claus Ibsen-2 wrote:
>>
>> ProducerTemplate template = ...
>> File target = new File("the file name here");
>>
>> template.sendBodyAndHeader(ftpEndpointHere, target,
>> Exchange.FILE_NAME, "the file name to be written on the ftp server");
>>
>
> --
> View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28709030.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Dynamic origin file components?

Posted by Willem Jiang <wi...@gmail.com>.
You can consider to use split[1] to do this kind of job.

[1]http://camel.apache.org/splitter.html

Willem
Mattias Severson wrote:
> That seems like a neat solution. :-)
> 
> Question:
> Is it possible to send several files to one receiver in a similar way (e.g.
> by providing a Collection<File> as body)? Naturally, I can iterate over the
> file collection and send the files one by one, but I guess that the
> performance would be better if all files can be sent during the same FTP
> session. 
> 
> 
> Claus Ibsen-2 wrote:
>> ProducerTemplate template = ...
>> File target = new File("the file name here");
>>
>> template.sendBodyAndHeader(ftpEndpointHere, target,
>> Exchange.FILE_NAME, "the file name to be written on the ftp server");
>>
> 


Re: Dynamic origin file components?

Posted by Mattias Severson <ma...@gmail.com>.
That seems like a neat solution. :-)

Question:
Is it possible to send several files to one receiver in a similar way (e.g.
by providing a Collection<File> as body)? Naturally, I can iterate over the
file collection and send the files one by one, but I guess that the
performance would be better if all files can be sent during the same FTP
session. 


Claus Ibsen-2 wrote:
> 
> ProducerTemplate template = ...
> File target = new File("the file name here");
> 
> template.sendBodyAndHeader(ftpEndpointHere, target,
> Exchange.FILE_NAME, "the file name to be written on the ftp server");
> 

-- 
View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28709030.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Dynamic origin file components?

Posted by Claus Straube <cl...@catify.com>.
Hi Niranjan,

I think you can use the fileName property. You can find an explanation 
under http://camel.apache.org/file2.html.

Best regards - Claus

On 20.12.2010 07:30, niranjan wrote:
>      Hi Mattias,
>
>      I found out the mistake. The file “message1.xml” is not in the correct
> path. Now it working fine.
>
>      Just one more quick question.
>      After transffering the file, How do I rename that file? any thought on
> this? I need to rename, because there is file picker program in my remote
> machine pick this file.
>
>      Thanks again for your help
>
>      Regards,
>      Niranjan
>
> I've added my code below. People who want to use java can use my code. If
> you want to use spring integration plz use Mattias.
> (http://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/)
>
>
>
> My code is as
> ===============================================================================
> public interface FtpProperties {
>
>      /**
>       * Gets the protocol
>       * @return One of {@code ftp}, {@code ftps} or {@code sftp}
>       */
>      public String getProtocol();
>
>      /**
>       * Gets the user name
>       * @return The name of the user
>       */
>      public String getUserName();
>
>      /**
>       * Gets the password
>       * @return The password
>       */
>      public String getPassword();
>
>      /**
>       * Gets the FTP host
>       * @return The FTP host
>       */
>      public String getHost();
>
>      /**
>       * Gets the name of the directory on the server where the file will be
> transferred
>       * @return The name of the remote directory
>       */
>      public String getRemoteDirectory();
>
>      /**
>       * Gets the passive mode, e.g. if the server is behind a firewall
>       * @return whether or not passive mode should be used
>       */
>      public boolean getPassiveMode();
> }
>
> public class FtpPropertiesImpl implements FtpProperties {
>
>      private String protocol = null;
>      private String userName = null;
>      private String password = null;
>      private String host = null;
>      private String remoteDirectory = null;
>      private boolean passiveMode = false;
>
>      public FtpPropertiesImpl(String protocol, String userName, String
> password, String host, String remoteDirectory, boolean passiveMode) {
>          this.protocol = protocol;
>          this.userName = userName;
>          this.password = password;
>          this.host = host;
>          this.remoteDirectory = remoteDirectory;
>          this.passiveMode = passiveMode;
>      }
>
>      /**
>       * Gets the protocol
>       * @return One of {@code ftp}, {@code ftps} or {@code sftp}
>       */
>      public String getProtocol() {
>          return protocol;
>      }
>
>      /**
>       * Gets the user name
>       * @return The name of the user
>       */
>      public String getUserName() {
>          return userName;
>      }
>
>      /**
>       * Gets the password
>       * @return The password
>       */
>      public String getPassword() {
>          return password;
>      }
>
>      /**
>       * Gets the FTP host
>       * @return The FTP host
>       */
>      public String getHost() {
>          return host;
>      }
>
>      /**
>       * Gets the name of the directory on the server where the file will be
> transferred
>       * @return The name of the remote directory
>       */
>      public String getRemoteDirectory() {
>          return remoteDirectory;
>      }
>
>      /**
>       * Gets the passive mode, e.g. if the server is behind a firewall
>       * @return whether or not passive mode should be used
>       */
>      public boolean getPassiveMode() {
>          return passiveMode;
>      }
> }
>
> public interface FtpSender {
>
>      /**
>       * Uses the {@code ftpProperties} to transmit the provided {@code file}
> to a remote server
>       *
>       * @param ftpProperties The FTP properties of the remote server
>       * @param file The file to transmit
>       */
>      public void sendFile(FtpProperties ftpProperties, File file,
> ProducerTemplate producerTemplate);
> }
>
> public class FtpSenderImpl implements FtpSender {
>
>      /** Camel URI, format is
> ftp://user@host/fileName?password=secret&passiveMode=true */
>      private static final String CAMEL_FTP_PATTERN =
> "{0}://{1}@{2}/{3}?password={4}&passiveMode={5}";
>
>      @Override
>      public void sendFile(FtpProperties ftpProperties, File file,
> ProducerTemplate producerTemplate) throws RuntimeException {
>           producerTemplate.sendBodyAndHeader(createFtpUri(ftpProperties),
> file, Exchange.FILE_NAME, file.getName());
>      }
>
>      /**
>        * Creates a Camel FTP URI based on the provided FTP properties
>        * @param ftpProperties The properties to be used
>        */
>      private String createFtpUri(FtpProperties ftpProperties) {
>          return MessageFormat.format(CAMEL_FTP_PATTERN,
>                  ftpProperties.getProtocol(),
>                  ftpProperties.getUserName(),
>                  ftpProperties.getHost(),
>                  ftpProperties.getRemoteDirectory(),
>                  ftpProperties.getPassword(),
>                  ftpProperties.getPassiveMode());
>      }
> }
>
> public class TestICSControlSystem {
>
> public static void main(String[] args) {
>
>    CamelContext context = new DefaultCamelContext();
>    try {
>       context.start();
>       File file = new File("C:/test/message1.xml”);
>       FtpProperties ftpProperties = new FtpPropertiesImpl((“ftp”, “dfs”,
> “******”, “dev.e-xxxxx.com”, “images”, true);
>
>       ProducerTemplate producer = context.createProducerTemplate();
>       ftpSender.sendFile(ftpProperties, file, producer);
>
>       Thread.sleep(20000);
>       context.stop();
>    } catch (CamelExecutionException e) {
>       System.out.println("CamelExecutionException:  " + e);
>       e.printStackTrace();
>    } catch (Exception e) {
>       System.out.println(“Error while Starting Camel ” + e);
>    }
> }
> }
>

Re: Dynamic origin file components?

Posted by niranjan <ni...@gmail.com>.
    Hi Mattias,

    I found out the mistake. The file “message1.xml” is not in the correct
path. Now it working fine.

    Just one more quick question.
    After transffering the file, How do I rename that file? any thought on
this? I need to rename, because there is file picker program in my remote
machine pick this file.

    Thanks again for your help

    Regards,
    Niranjan

I've added my code below. People who want to use java can use my code. If
you want to use spring integration plz use Mattias.
(http://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/)



My code is as 
===============================================================================
public interface FtpProperties {

    /**
     * Gets the protocol
     * @return One of {@code ftp}, {@code ftps} or {@code sftp}
     */
    public String getProtocol();

    /**
     * Gets the user name
     * @return The name of the user
     */
    public String getUserName();

    /**
     * Gets the password
     * @return The password
     */
    public String getPassword();

    /**
     * Gets the FTP host
     * @return The FTP host
     */
    public String getHost();

    /**
     * Gets the name of the directory on the server where the file will be
transferred
     * @return The name of the remote directory
     */
    public String getRemoteDirectory();

    /**
     * Gets the passive mode, e.g. if the server is behind a firewall
     * @return whether or not passive mode should be used
     */
    public boolean getPassiveMode();
}

public class FtpPropertiesImpl implements FtpProperties {

    private String protocol = null;
    private String userName = null;
    private String password = null;
    private String host = null;
    private String remoteDirectory = null;
    private boolean passiveMode = false;

    public FtpPropertiesImpl(String protocol, String userName, String
password, String host, String remoteDirectory, boolean passiveMode) {
        this.protocol = protocol;
        this.userName = userName;
        this.password = password;
        this.host = host;
        this.remoteDirectory = remoteDirectory;
        this.passiveMode = passiveMode;
    }

    /**
     * Gets the protocol
     * @return One of {@code ftp}, {@code ftps} or {@code sftp}
     */
    public String getProtocol() {
        return protocol;
    }

    /**
     * Gets the user name
     * @return The name of the user
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Gets the password
     * @return The password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Gets the FTP host
     * @return The FTP host
     */
    public String getHost() {
        return host;
    }

    /**
     * Gets the name of the directory on the server where the file will be
transferred
     * @return The name of the remote directory
     */
    public String getRemoteDirectory() {
        return remoteDirectory;
    }

    /**
     * Gets the passive mode, e.g. if the server is behind a firewall
     * @return whether or not passive mode should be used
     */
    public boolean getPassiveMode() {
        return passiveMode;
    }
}

public interface FtpSender {

    /**
     * Uses the {@code ftpProperties} to transmit the provided {@code file}
to a remote server
     *
     * @param ftpProperties The FTP properties of the remote server
     * @param file The file to transmit
     */
    public void sendFile(FtpProperties ftpProperties, File file,
ProducerTemplate producerTemplate);
}

public class FtpSenderImpl implements FtpSender {

    /** Camel URI, format is
ftp://user@host/fileName?password=secret&passiveMode=true */
    private static final String CAMEL_FTP_PATTERN =
"{0}://{1}@{2}/{3}?password={4}&passiveMode={5}";

    @Override
    public void sendFile(FtpProperties ftpProperties, File file,
ProducerTemplate producerTemplate) throws RuntimeException {
         producerTemplate.sendBodyAndHeader(createFtpUri(ftpProperties),
file, Exchange.FILE_NAME, file.getName());
    }

    /**
      * Creates a Camel FTP URI based on the provided FTP properties
      * @param ftpProperties The properties to be used
      */
    private String createFtpUri(FtpProperties ftpProperties) {
        return MessageFormat.format(CAMEL_FTP_PATTERN,
                ftpProperties.getProtocol(),
                ftpProperties.getUserName(),
                ftpProperties.getHost(),
                ftpProperties.getRemoteDirectory(),
                ftpProperties.getPassword(),
                ftpProperties.getPassiveMode());
    }
}

public class TestICSControlSystem {

public static void main(String[] args) {

  CamelContext context = new DefaultCamelContext();
  try {
     context.start();
     File file = new File("C:/test/message1.xml”);
     FtpProperties ftpProperties = new FtpPropertiesImpl((“ftp”, “dfs”,
“******”, “dev.e-xxxxx.com”, “images”, true);

     ProducerTemplate producer = context.createProducerTemplate();
     ftpSender.sendFile(ftpProperties, file, producer);

     Thread.sleep(20000); 
     context.stop();
  } catch (CamelExecutionException e) {
     System.out.println("CamelExecutionException:  " + e);
     e.printStackTrace();
  } catch (Exception e) {
     System.out.println(“Error while Starting Camel ” + e);
  }
}
}

-- 
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-origin-file-components-tp473618p3311666.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic origin file components?

Posted by niranjan <ni...@gmail.com>.
Hi Mattias

    I've just read your javaway blog
(http://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/)
and is a great and well written blog entry to explore dynamically ftping
files.

    I was also recently asked to develop an FTP client that could transmit
files to various FTP servers as a part of a delivery system. I discovered
"Apache Camel" is the best suited framework for integration. I started
learning Camel from few days ago.

I just followed you as explained above. The only different is that I don't
use Spring. I created the camel context in a java class (in a main method)
and started the context (context.start()). Then I set the FtpProperties and
called ftpSender.sendFile(ftpProperties, file, producer).

Plz note the producer is context.createProducerTemplate(). 

The main java class is as follows
-------------------------------------------------------------------------
public static void main(String[] args) {
  CamelContext context = new DefaultCamelContext();
  try {
    context.start();
    File file = new File("message1.xml");
    FtpProperties ftpProperties = new FtpPropertiesImpl("ftp", "dfs",
"******", "dev.e-xxxxx.com", "images", true);
    FtpSender ftpSender = new FtpSenderImpl();
    ProducerTemplate producer = context.createProducerTemplate();	
    // Thread.sleep(10000);
    // context.stop();  
    ftpSender.sendFile(ftpProperties, file, producer);
  } catch (Exception e) {
    System.out.println("Error while Starting Camel " + e);
  }		
}
-------------------------------------------------------------------------

When I ran the above program I got the following error.

Dec 19, 2010 5:07:20 PM
org.apache.camel.component.file.remote.RemoteFileProducer connectIfNecessary
INFO: Connected and logged in to:
Endpoint[ftp://dfs@dev.e-xxxxx.com/images?passiveMode=true&password=******]
Dec 19, 2010 5:07:21 PM
org.apache.camel.component.file.remote.RemoteFileProducer handleFailedWrite
WARNING: Writing file failed with: Cannot store file: images/message1.xml
Error while Starting Camel org.apache.camel.CamelExecutionException:
Exception occurred during execution on the exchange: Exchange[Message:
message1.xml]


But I can able to ftp files when I use static router (Created at the coding
time) as follows
----------------------------------------------------------------------
public static void main(String[] args) {public static void main(String[]
args) {
  CamelContext context = new DefaultCamelContext();
  context.addRoutes(new RouteBuilder() {
    public void configure() {
	 
from("file:D:/Niranjan/Books/Camel/camelinaction-source/chapter1/file-copy/data/inbox?noop=true")
	 
.to("ftp://dfs@dev.e-xxxxx.com/images?password=*******&passiveMode=true");	          
    }
  });
  context.start();
  Thread.sleep(10000);
  context.stop();
}
--------------------------------------------------------------------
Am I missing that Spring suppose to do by default??
Any help would be appreciated.

My Environment
The development machine runs Windows-7 and the remote FTP server runs on
some Linux distribution (Linux 215402.215402-web1.decmar.co.uk
2.6.18-194.26.1.el5 #1 SMP Fri Oct 29 14:21:16 EDT 2010 x86_64 x86_64 x86_64
GNU/Linux).

Camel version 2.5.0


MY Full Code
-----------------------------------------------------------------------------------------


public class FtpPropertiesImpl implements FtpProperties {

    private String protocol = null;
    private String userName = null;
    private String password = null;
    private String host = null;
    private String remoteDirectory = null;
    private boolean passiveMode = false;

    public FtpPropertiesImpl(String protocol, String userName, String
password, String host, String remoteDirectory, boolean passiveMode) {
        this.protocol = protocol;
        this.userName = userName;
        this.password = password;
        this.host = host;
        this.remoteDirectory = remoteDirectory;
        this.passiveMode = passiveMode;
    }

    /**
     * Gets the protocol
     * @return One of {@code ftp}, {@code ftps} or {@code sftp}
     */
    public String getProtocol() {
        return protocol;
    }

    /**
     * Gets the user name
     * @return The name of the user
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Gets the password
     * @return The password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Gets the FTP host
     * @return The FTP host
     */
    public String getHost() {
        return host;
    }

    /**
     * Gets the name of the directory on the server where the file will be
transferred
     * @return The name of the remote directory
     */
    public String getRemoteDirectory() {
        return remoteDirectory;
    }

    /**
     * Gets the passive mode, e.g. if the server is behind a firewall
     * @return whether or not passive mode should be used
     */
    public boolean getPassiveMode() {
        return passiveMode;
    }
}


public class FtpSenderImpl implements FtpSender {

    /** Camel URI, format is
ftp://user@host/fileName?password=secret&passiveMode=true */
    private static final String CAMEL_FTP_PATTERN =
"{0}://{1}@{2}/{3}?password={4}&passiveMode={5}";

    @Override
    public void sendFile(FtpProperties ftpProperties, File file,
ProducerTemplate producerTemplate) throws RuntimeException {
         producerTemplate.sendBodyAndHeader(createFtpUri(ftpProperties) +
"&binary=true", file, Exchange.FILE_NAME, file.getName());
    }

    /**
      * Creates a Camel FTP URI based on the provided FTP properties
      * @param ftpProperties The properties to be used
      */
    private String createFtpUri(FtpProperties ftpProperties) {
        return MessageFormat.format(CAMEL_FTP_PATTERN,
                ftpProperties.getProtocol(),
                ftpProperties.getUserName(),
                ftpProperties.getHost(),
                ftpProperties.getRemoteDirectory(),
                ftpProperties.getPassword(),
                ftpProperties.getPassiveMode());
    }
}


Regards,
Niranjan
-- 
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-origin-file-components-tp473618p3311118.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamic origin file components?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Its probably just much easier to create a java.io.File for the file
name and then send that as a body to the given FTP endpoint.
Then you do NOT need any camel routes at all.

And the file will thus be kept as it was.

ProducerTemplate template = ...
File target = new File("the file name here");

template.sendBodyAndHeader(ftpEndpointHere, target,
Exchange.FILE_NAME, "the file name to be written on the ftp server");


On Fri, May 28, 2010 at 12:58 PM, Mattias Severson <ma...@gmail.com> wrote:
>
> Is it possible to create file components dynamically?
>
> I have an interface that gives me File objects (after a physical file has
> been created on disk) that I would like to send to a remote FTP address. The
> files are created one at the time, in different folders and with different
> file names. The files should only be sent once and should also remain on the
> origin location after they have been sent, e.g. by using the noop option.
>
>
>
> void sendViaFtp(File file, String userName, String host) {
>    from(getFileUri(file)).to(getFtpUri(userName, host, file));
> }
>
> private static String getFileUri(File file) {
>    return String.format("file://%s?fileName=%s?noop=true",
> filenameUtils.getPath(file.getAbsolutePath()), file.getName());
> }
>
> private static String getFtpUri(String userName, String host, File file) {
>    return String.format("ftp://%s@%s/%s", userName, host, file.getName());
> }
>
>
>
> --
> View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28705368.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus