This post is probably a better fit for a tweet, but I don’t play twitter that much :)

When should you write a document for your system?

When someone asks you questions about your application and it takes you more than five seconds to give an answer with certain, you probably should start documenting (in whatever format that you see fit, e.g. even as simple as just a diagram).

Idempotency is a much desired property when designing applications, especially distributed applications because they are more prone to failures and error handling (e.g. retry) is often essential. In this essay I try to present a somewhat systematic approach to implementing idempotency.

What is idempotency?

Let’s begin with refreshing ourselves with the definition of…

The purpose of this essay is to highlight that optimistic locking and idempotency are two distinct concepts. I know this is not new, but I’ve seen enough online writings that confuse the two concepts and even claim that one can simply use optimistic locking to achieve idempotency.

Optimistic Locking

Optimistic locking is…

There are only two hard things in computer science: cache invalidation and naming things — Phil Karlton

Cache invalidation/update is often done incorrectly without noticing it. Let’s take a look at the various strategies to update/invalidate cache.

To start off, let’s quickly recap how we populate cache on the read…

Wenbo Zong

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store