Skip to content

Instantly share code, notes, and snippets.

View mrsinguyen's full-sized avatar
🎯
Focusing

Si Nguyen mrsinguyen

🎯
Focusing
View GitHub Profile

Notes on Martin Kleppmann's excellent Designing Data-Intensive Applications.

Chapter 1: Reliable, Scalable, and Maintainable Applications

  • Data Systems
    • Dimensions to consider when thinking about data systems: access patterns, performance characteristics, implementations.
    • Modern data systems often blur the lines between databases, caches, streams, etc.
  • Reliability
    • Systems should perform the expected function at a given level of performance, and be tolerant to faults and user mistakes
  • Fault: One component of a system deviating from its spec. Prefer tolerating faults over preventing them (except for things like security issues). Faults stem from hardware failures, software failures, and human error (in a study, config errors caused most outages).

Keybase proof

I hereby claim:

  • I am mrsinguyen on github.
  • I am mrsinguyen (https://keybase.io/mrsinguyen) on keybase.
  • I have a public key ASAqD2M8zZeIDa5vsxclq9Nfc0BoxlUegT6z-mKIgHk0zQo

To claim this, I am signing this object:

@mrsinguyen
mrsinguyen / node-and-npm-in-30-seconds.sh
Created December 3, 2020 06:35 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@mrsinguyen
mrsinguyen / na.md
Last active July 2, 2020 08:32
Từ điển tiếng Nghệ An
Con trâu thì gọi “con tru”
Con dâu thì gọi “con du” trong nhà
“Mấn” là “váy”, “ngái” là “xa”
“Đi mô?” để hỏi ai là “đi đâu? ”
“Nác su” ý nói “nước sâu”
“Trấy bù” để gọi “quả bầu” đấy nha
“Gác bếp” thì gọi là “tra”
“Lông cơn” thực chất đó là “trồng cây”
“Ra sân” thì nói “ra cươi”
@mrsinguyen
mrsinguyen / 00.imgproxy_vs_alternatives.md
Created May 4, 2020 08:06 — forked from DarthSim/00.imgproxy_vs_alternatives.md
imgproxy vs alternatives benchmark

imgproxy vs alternatives benchmark

Setup

  • c5.xlarge AWS instance: 4 CPUs, 8 GB RAM
  • Ubuntu 18.04
  • Go 1.12
  • Python 2.7
  • Vips 8.7.4
@mrsinguyen
mrsinguyen / mysql.sql
Created May 4, 2020 07:34
Show largest mysql tables
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;
@mrsinguyen
mrsinguyen / ssh-to-pem
Created May 4, 2020 07:17
Convert SSH key to pem
# Generate the ssh key
ssh-keygen -t rsa -b 4096 -f /tmp/key
# Convert it to a PEM file
ssh-keygen -p -m PEM -f /tmp/key
@mrsinguyen
mrsinguyen / DP.md
Created October 31, 2019 11:53
Đức Phật có đi đái ko?

ĐỨC PHẬT ĐI ĐÁI

Thuở nhỏ, câu hỏi đầu tiên của tôi về Phật là liệu khi Đức Phật uống nhiều nước thì ngài có đi đái hay không. Lớn lên, rồi cuộc sống rồi cơm áo rồi ân oán tình thù cứ xoay vần làm cản trở nhiều lần định tiếp cận Phật của tôi. Tôi chỉ muốn tiếp cận để tìm hiểu xem thực sự nếu ngài uống nhiều nước, thì ngài có đi đái hay không.

Mới đầu tiếp cận, thì bạn cũng quá hiểu, Phật là một sự khủng khiếp, quyền năng vô thượng. Đến Tôn Ngộ Không là anh hùng trong mắt bọn chúng tôi, mà Phật lật tay phát úp gọn. Một mảnh bùa gán lên là năm trăm năm người anh hùng chỉ có nằm ăn viên sắt và uống nước rỉ đồng mà sống qua ngày. Rồi thiên hạ triệu triệu người triều bái, cúng hàng trăm vạn lượng hoàng kim để cầu khẩn Ngài. Ngài là thần trên muôn thần, đến Ngọc Hoàng thượng đế bá đạo anh hùng như vậy mà vẫn dưới quyền ngài bảo kê.

Nói chung, tiếp cận ngài chỉ thấy dân gian mô tả quyền năng vô hạn lượng, và lòng từ bi cũng lượng vô hạn. Tôi không cách nào hỏi được thế thực sự ngài có đi đái hay không.

Rồi đến nh

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?