Belt and Suspenders: Safety and Trust in a Distributed System

May 02, 2012

Wealthfront is built on a traditional service-oriented architecture: requests from web browsers are dispatched to a cluster of Rails instances, which will in turn query back-end services. As a single page load might trigger tens of internal remote calls, it quickly becomes difficult to understand why a back-end service was called, who initiated the call,… Read more

Beyond Java’s Access Control: the Visibility Test

December 02, 2011

It is generally a good practice to use the most restrictive access level that makes sense. However, Java’s access control is not always as expressive as one would want. In this blog post, I am going to give two examples where an access level must be artificially relaxed. Then, I’ll describe Wealthfront’s recently open sourced… Read more

Deploying With a Phone Call: Speech Recognition in a Java backend

November 11, 2011

We had a lot of fun playing with last week’s experiment. However, it became quickly obvious that clicking on a button next to the service you want to deploy is much more convenient than talking to your web browser. Could we take the experiment further and build something that’s actually useful? Well, we all knew… Read more

Encrypting using gpg from Java

February 23, 2011

Recently, we worked with a third-party that had trouble reading files encrypted using the Bouncy Castle’s OpenPGP implementation. We ended up deciding to rely directly on the GNU Privacy Guard’s OpenPGP implementation. As I didn’t find any working example on the web, I figured that the following piece of code might end up being useful… Read more

Circular dependencies between entities

November 29, 2010

One question I am often asked is how to handle circular dependencies between Hibernate entities. Interestingly enough, the answer that people are usually looking for ends up being to a slightly different question; namely, how to handle circular dependencies between entities. Let’s have a look at an example. Consider two entities, Customer and Account, with… Read more

If you ever write a varags method…

November 08, 2010

In some specific cases, methods with a variable argument list might greatly improve the usability of an API. However, it is very easy to overuse or misuse this language feature, leading to cumbersome APIs. Varags methods shine when the programmer knows how many arguments must be passed to a specific invocation of the method when… Read more