Introduction

In the ever-evolving realm of software development, errors and exceptions are constant companions. These errors can be broadly categorized into two types: programming errors and operational errors. While programming errors are typically caught during development and testing phases, operational errors are the real-world hurdles that applications must gracefully navigate in production environments. In this blog, we will shine a spotlight on the art of handling operational errors and delve into the pivotal role played by a central error class in Node.js.

Read more »

Chapter 6 of this book discusses Transactions. For decades, transactions have been the mechanism of choice for simplifying these issues. A transaction is a way for an application to group several reads and writes together into a logical unit. Conceptually, all the reads and writes in a transaction are executed as one operation: either the entire transaction succeeds (commit) or it fails(abort, rollback).
Transactions are created with a purpose: to simplify the programming model for applications accessing a database. By using transactions, the application is free to ignore specific potential error scenarios and concurrency issues.

Read more »

Chapter 6 of this book discusses the concept of data partitioning. The chapter explains how data partitioning can be used to improve the scalability and performance of distributed systems. The author describes various partitioning techniques and their advantages and disadvantages. The chapter also covers the challenges that arise when partitioning data, such as data skew and hotspots, and explains how to mitigate these issues. Overall, Chapter 6 provides a comprehensive overview of the partitioning strategies that can be used in modern distributed systems.

Read more »

Last section of Chapter 5 is Leaderless Replication. Leaderless Replication is a different approach compared to Single Leader Replication and Multi-Leader Replication, abandoning the concept of a leader and allowing any replica to directly accept writes from clients. In some leaderless replication implementations, the client directly sends its writes to several replicas, while in others, a coordinator node does this on behalf of the client.

Read more »

Chapter 5 of this book covers the important topic of replication in the context of database systems. Replication is the process of creating and maintaining multiple copies of the same database on different servers. This is done to ensure data availability, improve performance, and provide fault tolerance.

The chapter starts by introducing the concept of replication and its benefits. It then goes on to explain the different types of replication, including master-slave, master-master, and multi-master replication. Each type is discussed in detail, with its advantages and disadvantages.

Read more »

This chapter focuses on the challenges of encoding and evolving data formats in distributed systems.

The chapter begins by discussing how data formats can impact system design and evolution. It then explores two common approaches to data encoding: binary encoding and text encoding. Binary encoding is more efficient but less human-readable, while text encoding is less efficient but more human-readable.

Read more »

0x00. OpenAPI 简介

在之前的文章 Restful API 设计指导 中,我介绍了如何设计 Restful API。随着前后端的分离以及软件架构的复杂化,你是否也遇到过以下的一个或者多个问题呢?

  1. API 的设计和实现并非同一个人。无论是在大型互联网架构中还是复杂的软件开发中,API 的设计往往是有架构师、资深工程师、PM 等这些经验丰富的人负责。一旦设计完成,才将具体的开发任务分配给相应的 API 开发工程师。
  2. API 有完整的测试。越是复杂的产品,对产品的质量有越高的要求,一般而言会有专门的测试团队对 API 进行完整的自动化测试。
  3. 前端开发工程师(或者 API 的调用方)和 API 工程师协同开发,因此前端工程师需要 Mock API 以解除对 API 开发进度的依赖。
Read more »

本文记录了一个前端按钮没有按照正常逻辑显示的 Debug 过程。有一个容器中有三个 Tile,如下定义容器的三种显示状态:三个 Tile 可以并列显示在一排时的状态为 Normal;当三个 Tile 无法一排显示在一排,其中有一个或者两个 Tile 处于 Overflow 的状态为 Collapsed;三个 Tile 显示在多排的状态为 Expanded。

Read more »
0%