S3 Jets3t

Contents

Jets3t

Jets3t is a Java library for S3 Storage

Its open source (Apache licensed). The mailing lists are completely dead, but the CVS repository shows activity.

component role
Cockpit This is a java application for working with S3, letting you manage buckets and ACLs, and for transferring files
Synchronize command line synchronisation tool, driven by settings in the resource sychronize.properties on the classpath
Gatekeeper A servlet that provides time-limited access to upload files
Uploader A simple swing GUI for uploading files; works with Gatekeeper to get authorisation

Gatekeeper and Uploader work together, as described in the gatekeeper architecture. The gatekeeper provides authorisations for specific operations that are valid for a limited period of time. The uploader sends a request to the gatekeeper containing all the headers it wants to put (including the MD5 sum of the data to upload); the gatekeeper returns a URL that contains the auth key to upload the specific content to the a chosen URL; the signature prevents any of this data from being change. Its an interesting way to provide transitive authorisation.

As gatekeeper is a java servlet, it should be possible to deploy this under smartfrog+jetty, with all the configuration data for gatekeeper coming from the .sf file. This could be part of a more ambitious use case (EC2 the photo site, for example)

Code

At first glance

  • there's a lot of dependencies in there, including Axis. If these libraries really are used, it means that jet3t uses the SOAP API. I would not be encouraged to use this; if I did, I'd rather extend Alpine than track down bugs in Axis. (... -it may be optional)
  • they stick bits of Httpclient into the JAR
  • they fiddle with DNS options (System.setProperty("networkaddress.cache.ttl", "300"). While that may be needed, it is rude for libraries to do it.
  • they parse XML error messages using regular expressions, not real XML parsers
  • the code does .equalsIgnoreCase() without doing local conversion; this code is brittle across countries
  • The code looks clean, exceptions aren't ignored.

Overall, the Restlet approach appears to work and is fairly simple; no need for SOAP.

Get SmartFrog at SourceForge.net. Fast, secure and Free Open Source software downloads