西维蜀黍

【Data Format】Protobuf vs JSON

JSON

JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values).

It is a common data format with a diverse range of functionality in data interchange including communication of web applications with servers.

JSON is a language-independent data format. It was derived from JavaScript, but many modern programming languages include code to generate and parse JSON-format data. JSON filenames use the extension .json.

JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

  ...


【Distributed System】Distributed Tracing(分布式追踪)

What is Distributed Tracing?

Distributed tracing, also called distributed request tracing, is a method used to profile and monitor applications, especially those built using a microservices architecture. Distributed tracing helps pinpoint where failures occur and what causes poor performance.

  ...


【Cache System】缓存更新策略 - Cache Invalidation vs Cache Update

Invalidate Cache(淘汰缓存)VS Update Cache(更新缓存)

缓存更新时,Invalidate Cache VS Update Cache

  ...


【Cache System】缓存一致性 - Cache Inconsistency on Cache Invalidation

Background

We try to use cache invalidation to solve cache coherence, i.e., try to let the updated data to be reflected as soon as possible, but there may be cache inconsistency occuring.

In this post, I would like to point out them and see how we are going to solve them with some trade-off.

  ...


【Software Testing】Selenium

我们以使用 Python 为例。

Components

At its minimum, WebDriver talks to a browser through a driver. Communication is two way: WebDriver passes commands to the browser through the driver, and receives information back via the same route.

The driver is specific to the browser, such as ChromeDriver for Google’s Chrome/Chromium, GeckoDriver for Mozilla’s Firefox, etc. The driver runs on the same system as the browser. This may, or may not be, the same system where the tests themselves are executing.

  ...


【Software Testing】全链路测试(Full Chain Stress Test)

Background

Types of stress tests

Traffic Record

Record live traffic and playback directly in the live region. (Only can do for “GET” endpoint, i.e., the endpoints without writing DB operation)

Pros

  • 100% simulate the real user behaviour in Live env during normal days
  • Cover the full-chain (services) triggered by the endpoints stessed
  ...


【Docker】Container 常用命令 - run

新建、启动并停止容器 - docker run

See https://docs.docker.com/engine/reference/commandline/run/ .

$ docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

docker run命令是新建并启动容器,每运行一次,就会新建一个容器。同样的命令运行两次,就会生成两个一模一样的容器文件(当前也会创建两个容器)。

在新建完成之后,容器会被终止。

  ...


【Cache System】缓存更新策略 - Cache Invalidation

Cache Invalidation

Cache invalidation is a process in a computer system whereby entries in a cache are replaced or removed.

It can be done explicitly, as part of a cache coherence protocol. In such a case, a processor changes a memory location and then invalidates the cached values of that memory location across the rest of the computer system.

  ...


【macOS】制作 Windows 启动 U 盘

If you want an English-language version of the latest update of Windows 10, you can download the ISO here.

  ...


【macOS】查看 Log

$ watch -n 0.1 "sudo dmesg | tail -n $((LINES-6))"

$ tail -f /var/log/system.log
  ...