My Study Plans

Throughout my life, I lost track of things I wanted to learn. I have a forever-growing list of books I want to read on Good Reads, many of them related to Computer Science somehow. As I make a living by building software, I decided to have a dedicated number of hours a week to study… Continue reading My Study Plans

Words about Idempotency

The other day I came across this article. I was immediately interested in it since we are designing a system that needs idempotency and didn’t have anything in place. The nice thing about Airbnb’s design was that they generalized the idempotency with a three-phase process. Pre-RPC, RPC, and Post-RPC. In the first phase, they record… Continue reading Words about Idempotency

Chapter 11: Stream Processing

This chapter discusses the purpose of event streams, how to process them, and some key differences between them and batch processing. Message brokers process event streams, and there are two types of them: The first one is AMQP/JMS-style message brokers, which is suitable when there is no need to go back in time to reprocess… Continue reading Chapter 11: Stream Processing

Chapter 10: Batch processing

This chapter starts by discussing Unix tools and pipes and how they are composed to solve larger problems. Later, the same principles are derived to explain how MapReduce and other more recent dataflow engines work. The pipe is the main driver of data between two Unix processes. On MapReduce, on the other hand, are files… Continue reading Chapter 10: Batch processing

Chapter 9: Consistency and Consensus

This chapter, as the title says, touches on both consistency and consensus from different angles. The first concept it dishes out is about linearizability, a consistency model that tries to make all the data behave as if it is written sequentially. A weaker consistency model can be model using the concept of casualty, which differs… Continue reading Chapter 9: Consistency and Consensus

Compilers – Register Allocation and Garbage Collection: my study notes

These notes are from the Week 9 of the Compilers course by Stanford. Register Allocation When we generate intermediate code, we are not concerned about how many registers the target machine has. Therefore, the last phase should allocate variables in registers and also have a backup plan when more variables need to be allocated at any given… Continue reading Compilers – Register Allocation and Garbage Collection: my study notes

Chapter 8: The Trouble with Distributed Systems

In distributed systems, things will be wrong and the systems engineers should be creating mechanisms to avoid that a failure in components affects the whole availability of the system. We should build reliable systems from unreliable components, but there are some limitations on how reliable a system can be. Network Problems One failure is due… Continue reading Chapter 8: The Trouble with Distributed Systems

Compilers – Local Optimization & Global Optimization: my study notes

These notes are from the Week 8 of the Compilers course by Stanford. An intermediate language provides an intermediate level of abstraction while compiling languages, helping optimizations by including more details than the source language has, but not as much as the target language. Code optimization is usually done before code generation in intermediate code, to avoid… Continue reading Compilers – Local Optimization & Global Optimization: my study notes

Compilers – Code Generation & Operational Semantics: my study notes

These notes are from the Week 7 of the Compilers course by Stanford. This focuses on the discussion about code generation. The architecture chosen for this class is a Stack Machine architecture on top of the MIPS architecture. Code Generation The MIPS processor supports the following instructions: lw reg1 offset reg2: Load a 32-bit word from the address… Continue reading Compilers – Code Generation & Operational Semantics: my study notes

Chapter 7: Transactions

Many things can go wrong with systems, such as: The software or hardware might fail at the middle of an operation Network failures can cause unexpected cut offs in the application Multiple clients might write at the same time causing overwrites Reads might return incomplete writes For decades, transactions are the way databases implemented mechanisms… Continue reading Chapter 7: Transactions