23. Februar 2010

Amazon S3 is a great way to store files that need to be exposed on the web. Every uploaded file can be accessible to the public or accessible to authorized users only via a clever system of expiring signatures.

Joe Danziger wrote an excellent CFC to do all kinds of operations via the S3 REST interface.

The only missing part is the new way Amazon is offering to upload files without the need to first buffer them on your own server.

The old way:

  • You send a user (let's say a user of your CMS) to a page where he can upload a file
  • The user clicks on 'Browse' to find the file on his harddisk and submits the form.
  • The file is sent to your server.
  • You send the file to S3 via a REST put.
  • On success: you save a record in your database so you can remember what you sent to S3

The better way:

  • You send a user to a page where he can upload a file
  • The user clicks on 'Browse' to find the file on his harddisk and submits the form.
  • The file is sent directly to a certain bucket of your Amazon S3 storage
  • Amazon tells you about a successful upload and you update your database.
15. November 2009

While pumping lots of records / docs / bulk inserts to the new CouchDB Server i got a mysterious connection timeout that appeared always after about 4000+ inserted records.

By using cfhttp.errorDetail i got the error:

I/O Exception: Address already in use: connect

To save you some time here is what i found.

21. Oktober 2009

The usual setup is ColdFusion on either Windows with IIS or on Linux with Apache.

Both webservers are great webservers unless you get excessive load on them. At that time you wish that you had one server to do all the static files and one or more servers to do the ColdFusion requests.

Enter Nginx, the lightweight webserver written by Igor Sysoev. Nginx is one of the fastest webservers around and due to its different architecture will yawn at the load while Apache is already collapsing.