Bloom Filters

“The basic bloom filter supports two operations: test and add.

Test is used to check whether a given element is in the set or not. If it returns:

– false then the element is definitely not in the set.
– true then the element is probably in the set. The false positive rate is a function of the bloom filter’s size and the number and independence of the hash functions used.

Add simply adds an element to the set. Removal is impossible without introducing false negatives, but extensions to the bloom filter are possible that allow removal e.g. counting filters…”

Essential Patterns in Go

“The Golang tutorial and Effective Go will get you up to speed on the basics, but goroutines, channels, and interfaces make much more complex algorithms easier to implement (not to mention more readable) in Go. Here I’ve compiled some nifty Golang patterns from various talks, websites, etc. and made them a bit easier to understand at a glance. Hopefully everyone finds it helpful to have them in one place and beginner-friendly-ified!…”

Eight Docker Development Patterns

“Here I will outline some patterns that have started to show up repeatedly in my use of Docker. I don’t expect any of them to be particularly novel or any big surprises, but I hope some can be useful, and I would very much like to hear from others about patterns you come across while working with Docker.

A foundation for all of my Docker experiments, is keeping state that should persist in volumes, so that the Docker containers themselves can be re-created at will without data loss (unless I’ve been naughty and modified container state without updating the Dockerfile’s – and regularly rebuilding the containers helps stop that bad habit).

The examples Dockerfiles below are all focused on that: Creating containers where the containers themselves can be replaced at any time without having to think about it.

The more regularly the containers are recreated; the more habitual this becomes, the more it reinforces a habit of avoiding state outside of clearly defined locations that are explicitly persisted…”


“Fastsocket is a highly scalable socket and its underlying networking implementation of Linux kernel. With the straight linear scalability, Fastsocket can provide extremely good performance in multicore machines. In addition, it is very easy to use and maintain. As a result, it has been deployed in the production environment of SINA…”

Call me maybe: Redis

“Redis is a fantastic data structure server, typically deployed as a shared heap. It provides fast access to strings, lists, sets, maps, and other structures with a simple text protocol. Since it runs on a single server, and that server is single-threaded, it offers linearizable consistency by default: all operations happen in a single, well-defined order. There‚Äôs also support for basic transactions, which are atomic and isolated from one another.

Because of this easy-to-understand consistency model, many users treat Redis as a message queue, lock service, session store, or even their primary database. Redis running on a single server is a CP system, so it is consistent for these purposes…”