My Avatar

(require 'thoughts)

80% engineer, 30% photographer, very good at math.

Configure Hystrix in Clojure


Hystrix is an amazing tool to help stop cascading failure and enable resilience in complex distributed systems. It is pretty straightforward to integrate it with your Clojure web applications, and works well out-of-the-box. However, if you want to modify Hystrix’s default behaviors, this tutorial will show you a few different ways to do so.

In fact, Hystrix leverages its plugin system which gives you full control over how properties are defined for the system. By default it uses Archaius as the default implementation, so the methods mentioned below would apply to any applications using the same for configuration management.

The full example code can be found in this repo.

Read More

Random thoughts on working with Go


Last week I had a chat with a friend, who has been pretty upset lately because he was having a hard time to introduce Rust to his company, a hard tech startup and a Go shop. He couldn’t understand why his co-workers would be willing to settle on, quotes from him, “such an ugly tool”.

Fair enough. Admittedly I was never a big fan of Go either. I think the GOPATH is a mess and the dependency management is gnarly; I like the concept of slice, but the operations are pretty weak and almost broken; the variable shadowing is funny and nil interface is somewhat confusing; I don’t really have problem with its error handling like others do, but it does make the program rather verbose… and the list can go on and on.

There might be better alternatives nowadays. I am lucky enough to be able to use Clojure at work. To me, I think Clojure is both beautiful and productive, arguably the best tool for manipulating data, or designing a DSL.

Read More

Data Infrastructure at Oyster


This was originally posted on Oyster engineering blog, as the first one of a series of posts on building data-driven products at Oyster.

Our mission at Oyster is to connect readers with books they’ll love. We do this by combining over 1 million books with great discovery features via social, editorial, and algorithmic recommendations to make it easy to browse and discover a great book.

Oyster has its own unique challenges with data processing. For example, we have user behavioral data coming from online and offline sessions, and book reading progress is hard to represent with immutable data structure. We also have multiple teams that rely on data analytics in their own ways. The product team, for instance, relies on event data to understand how readers interact with Oyster apps, while marketing needs data to track user growth and conversions.

In this blog post, we will share our approach to building a scalable and accessible data system to support these diverse needs.

Read More