Thoughts on software and people.

05 Feb 2009 » Thrift: Reading Thrift Objects from Disk with Java

Reading Thrift objects is as easy as writing them to disk. Here's the utility class I use for reading one or more Thrift objects (of the same type) serialized to disk:


28 Jan 2009 » Invoking the Thrift Compiler from Maven

Thrift and Protocol Buffers require you to invoke a custom compiler during the build process to generate source code from the message definitions in your .thrift or .proto files. You can accomplish this with Maven by using the antrun plugin. Here's the relevant section from pom.xml:


22 Jan 2009 » Rest In a Jar: Maven, Spring, Jetty, and Jersey

Here's a quick example of how to use Maven, Spring, embedded Jetty, and Jersey to build an application that provides a RESTful interface (in a single Jar file). There are four main parts to this project:

  1. First, create and configure the project using Maven.
  2. Second, create the resources.
  3. Third, create/configure the Jetty server.
  4. Finally, tie it all together with Spring.