TOAST

The other day I was working through my (quite massive) backlog of saved Hacker News stories and read this gem — Introduction to PostgreSQL physical storage. As someone who has loved databases forever, and has spent over a year building LinkedIn’s next generation distributed graph database, I found this post absolutely fascinating.

As the title suggests this article talks about how data in PostgreSQL tables and databases are actually stored on disk and how free space (to figure out where to store incoming data) is managed. The diagram of the page structure is very helpful in understanding how data is stored in a page. I also really liked the use of PostgreSQL queries used throughout the article to explain the topic at hand by examining a real PostgreSQL instance. The author does a great job at explaining concepts at just the right amount of detail, with several links provided for those interesting in learning more.

(Relevant side bar: the PostgreSQL source code documentation is amazing)

Cache

One long standing issue that I’ve had with the LinkedIn GitHub page that I helped design was that it because it relied on the GitHub public API to fetch all the data, if the user accessed the page from a rate-limited IP address the rendered page would be blank as no data would be returned by the API. I had some time on my hands today and decided to fix this bug.

The simplest fix for this bug is to cache the GiHub API response in a file, and when you get rate-limited by the GitHub API fall back to reading from a cached API response. Since the raw API response contained lots of information that was not required to generate the website, I decided to add an intermediate filtering step to only extract the relevant information from the raw GitHub API response. The JSON data generated by this filtering step is the final cache used by the webpage.

To test the code I’d written and to make sure everything works as expected I needed to rate limit myself. This was easily done using the (amazing) Python Requests library.

You can find my fix for this bug here.

Update — I realized that my original patch failed to use the GitHub API response when the user was not rate limited. My last commit should fix this.

 

Vocal

Here is a list, in no particular order, of some of my favorite vocalists in metal music:

  • James Hetfield (Metallica): Metallica were one of the first metal bands that I listened to and to this day I associate James Hetfield’s powerful voice with metal music.
  • Rob Halford (Judas Priest): I’m amazed by the high notes he can hit.
  • Bruce Dickinson (Iron Maiden): His vocal range is incredible.
  • Maynard James Keenan (Tool, A Perfect Circle): His voice has a sadness and raw energy to it that I think is simply wonderful.

  • Daniel Tompkins (TesseracT, ex-Skyharbor): Favorite modern metal singer. His cleans, his screaming — all incredible.
  • Chino Moreno (Deftones):  His voice has an ethereal, dream-like quality that is beautiful.
  • Mikael Åkerfeldt (Opeth): 2nd favorite modern metal singer.

  • George Clarke (Deafheaven): His screams are pure, raw energy. Favorite screaming vocals.
  • Ian Kenny (Karnivool): Another singer with an incredible vocal range.