Date: Tue, 8 Feb 2022 22:36:38 +0700
Subject: [PATCH 36/56] Another VI update
---
README-vi.md | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 2b9f5832..6ddd2e71 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -688,18 +688,24 @@ Cách tiếp cận này được thấy trong file systems và RDBMS. Strong co
* [Transactions across data centers](http://snarfed.org/transactions_across_datacenters_io.html)
## Availability patterns
+## Các mẫu hình về tính hiện có
There are two complementary patterns to support high availability: **fail-over** and **replication**.
+Có hai mẫu hình bổ sung lẫn nhau hỗ trợ khả năng hiện có cao: **fail-over** và **bản tái tạo*** # FIXME: bad translation
### Fail-over
#### Active-passive
+#### Chủ động - bị động
With active-passive fail-over, heartbeats are sent between the active and the passive server on standby. If the heartbeat is interrupted, the passive server takes over the active's IP address and resumes service.
+Với fail-over chủ động - bị động, nhịp tim (heartbeat) sẽ được gửi giữa máy chủ chủ động và máy chủ bị động trực chờ. Nếu nhịp tim bị ngắt quãng, máy chủ bị động sẽ tiếp quản địa chỉ IP của máy chủ động và tiếp tục dịch vụ.
The length of downtime is determined by whether the passive server is already running in 'hot' standby or whether it needs to start up from 'cold' standby. Only the active server handles traffic.
+Độ dài của thời gian dừng sẽ được quyết định bởi việc máy chủ bị động có đang chạy ở chế độ trực chờ sẵn sàng ('hot' standby) hay cần phải được khởi động ('cold' standby). Chỉ duy nhất máy chủ chủ động xử lí liên lạc. # FIXME: dull translation
Active-passive failover can also be referred to as master-slave failover.
+Failover chủ động - bị động còn được biết dưới tên failover master-slave.
#### Active-active
@@ -779,7 +785,6 @@ Availability (Total) = 1 - (1 - Availability (Foo)) * (1 - Availability (Bar))
If both `Foo` and `Bar` each had 99.9% availability, their total availability in parallel would be 99.9999%.
-## Domain name system
## Hệ thống tên miền
@@ -989,10 +994,11 @@ Additional benefits include:
### Cân bằng tải và proxy đảo # FIXME: need to check if "proxy đảo** is a word.
* Deploying a load balancer is useful when you have multiple servers. Often, load balancers route traffic to a set of servers serving the same function.
-* Việc triển khai một cân bằng tải là hữu dụng khi bạn có nhiều máy trạm. Thông thường thì cân bằng tải điều hướng lưu thông đến một tập máy trạm phục vụ chung một chức năng.
* Reverse proxies can be useful even with just one web server or application server, opening up the benefits described in the previous section.
-* Proxy đảo có thể hữu dụng ngay cả với chỉ một máy trạm web, hoặc một máy trạm ứng dung, mở ra những ưu thế được mô tả ở phần trước.
* Solutions such as NGINX and HAProxy can support both layer 7 reverse proxying and load balancing.
+
+* Việc triển khai một cân bằng tải là hữu dụng khi bạn có nhiều máy trạm. Thông thường thì cân bằng tải điều hướng lưu thông đến một tập máy trạm phục vụ chung một chức năng.
+* Proxy đảo có thể hữu dụng ngay cả với chỉ một máy trạm web, hoặc một máy trạm ứng dung, mở ra những ưu thế được mô tả ở phần trước.
* Các giải pháp như là NGINX và HAProxy có thể hỗ trợ cả proxy đảo ở lớp 7 và cân bằng tải.
### Disadvantage(s): reverse proxy
From 3a2e080f3f0ae8353e4c0c1a834b058c08af55d1 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 13 Feb 2022 12:09:19 +0700
Subject: [PATCH 37/56] Another VI update
---
README-vi.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README-vi.md b/README-vi.md
index 6ddd2e71..1ea87745 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -144,7 +144,7 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
* [AP - availability and partition tolerance](#ap---availability-and-partition-tolerance)
* [AP - tính hiện có và dung sai phân vùng](#ap---availability-and-partition-tolerance)
* [Consistency patterns](#consistency-patterns)
-* [Các mẫu về nhất quán](#consistency-patterns) # FIXME: bad translation
+* [Các mẫu hình về nhất quán](#consistency-patterns) # FIXME: bad translation
* [Weak consistency](#weak-consistency)
* [Nhất quán yếu](#weak-consistency) # FIXME: bad translation
* [Eventual consistency](#eventual-consistency)
@@ -849,12 +849,15 @@ Serving content from CDNs can significantly improve performance in two ways:
### Push CDNs
Push CDNs receive new content whenever changes occur on your server. You take full responsibility for providing content, uploading directly to the CDN and rewriting URLs to point to the CDN. You can configure when content expires and when it is updated. Content is uploaded only when it is new or changed, minimizing traffic, but maximizing storage.
+Push CDN nhận nội dung mới khi thay đổi xày ra phía máy chủ của bạn. Bạn nhận hoàn toàn trách nhiệm của việc cung cấp nội dung, tải trực tiếp lên CDN và viết lại URL trỏ vvào CDN. Bạn có thể cấu hình khi nội dung hết hạn và khi nào được cập nhật. Nội dung được tải lên chỉ khi có nội dung mới hoặc được thay đổi, tối thiểu hoá lưu thông mạng, nhưng lại tối đa việc lưu trữ.
Sites with a small amount of traffic or sites with content that isn't often updated work well with push CDNs. Content is placed on the CDNs once, instead of being re-pulled at regular intervals.
+Các trang với với lưu thông nhỏ hoặc với nội dung không được cập nhật thường xuyên thì thường làm việc tốt với push CDN. Nội dung được đặt lên CDN chỉ một lần, thay vì phải được kéo về đều đặn.
### Pull CDNs
Pull CDNs grab new content from your server when the first user requests the content. You leave the content on your server and rewrite URLs to point to the CDN. This results in a slower request until the content is cached on the CDN.
+Pull CDN kéo nội dung mới từ máy chủ của bạn khi có yêu cầu đầu tiên từ người dùng cho nội dung này. Bạn để nội dung trên máy chủ và viết lại URL để trỏ đến CDN. Việc này dẫn đến thời gian thực thi yêu cầu sẽ chậm, cho đến hki nội dung được cache trên CDN.
A [time-to-live (TTL)](https://en.wikipedia.org/wiki/Time_to_live) determines how long content is cached. Pull CDNs minimize storage space on the CDN, but can create redundant traffic if files expire and are pulled before they have actually changed.
From 5ebafd627f05e1a68f667512ebd65de03dd6e8b9 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 13 Feb 2022 12:12:26 +0700
Subject: [PATCH 38/56] Update VI entry
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 266f8b16..81fac282 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-*[English](README.md) ∙ [日本語](README-ja.md) ∙ [简体中文](README-zh-Hans.md) ∙ [繁體中文](README-zh-TW.md) | [العَرَبِيَّة](https://github.com/donnemartin/system-design-primer/issues/170) ∙ [বাংলা](https://github.com/donnemartin/system-design-primer/issues/220) ∙ [Português do Brasil](https://github.com/donnemartin/system-design-primer/issues/40) ∙ [Deutsch](https://github.com/donnemartin/system-design-primer/issues/186) ∙ [ελληνικά](https://github.com/donnemartin/system-design-primer/issues/130) ∙ [עברית](https://github.com/donnemartin/system-design-primer/issues/272) ∙ [Italiano](https://github.com/donnemartin/system-design-primer/issues/104) ∙ [한국어](https://github.com/donnemartin/system-design-primer/issues/102) ∙ [فارسی](https://github.com/donnemartin/system-design-primer/issues/110) ∙ [Polski](https://github.com/donnemartin/system-design-primer/issues/68) ∙ [русский язык](https://github.com/donnemartin/system-design-primer/issues/87) ∙ [Español](https://github.com/donnemartin/system-design-primer/issues/136) ∙ [ภาษาไทย](https://github.com/donnemartin/system-design-primer/issues/187) ∙ [Türkçe](https://github.com/donnemartin/system-design-primer/issues/39) ∙ [tiếng Việt](https://github.com/donnemartin/system-design-primer/issues/127) ∙ [Français](https://github.com/donnemartin/system-design-primer/issues/250) | [Add Translation](https://github.com/donnemartin/system-design-primer/issues/28)*
+*[English](README.md) ∙ [日本語](README-ja.md) ∙ [简体中文](README-zh-Hans.md) ∙ [繁體中文](README-zh-TW.md) | [العَرَبِيَّة](https://github.com/donnemartin/system-design-primer/issues/170) ∙ [বাংলা](https://github.com/donnemartin/system-design-primer/issues/220) ∙ [Português do Brasil](https://github.com/donnemartin/system-design-primer/issues/40) ∙ [Deutsch](https://github.com/donnemartin/system-design-primer/issues/186) ∙ [ελληνικά](https://github.com/donnemartin/system-design-primer/issues/130) ∙ [עברית](https://github.com/donnemartin/system-design-primer/issues/272) ∙ [Italiano](https://github.com/donnemartin/system-design-primer/issues/104) ∙ [한국어](https://github.com/donnemartin/system-design-primer/issues/102) ∙ [فارسی](https://github.com/donnemartin/system-design-primer/issues/110) ∙ [Polski](https://github.com/donnemartin/system-design-primer/issues/68) ∙ [русский язык](https://github.com/donnemartin/system-design-primer/issues/87) ∙ [Español](https://github.com/donnemartin/system-design-primer/issues/136) ∙ [ภาษาไทย](https://github.com/donnemartin/system-design-primer/issues/187) ∙ [Türkçe](https://github.com/donnemartin/system-design-primer/issues/39) ∙ [Tiếng Việt](README-vi.md) ∙ [Français](https://github.com/donnemartin/system-design-primer/issues/250) | [Add Translation](https://github.com/donnemartin/system-design-primer/issues/28)*
**Help [translate](TRANSLATIONS.md) this guide!**
From 4bf21604092600370b3952df6a996ecb4c175cf8 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 20 Feb 2022 12:17:12 +0700
Subject: [PATCH 39/56] VI: a better translation of availability
---
README-vi.md | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 1ea87745..c205bb65 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -136,13 +136,13 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
* [Latency vs throughput](#latency-vs-throughput)
* [Độ trễ và công suất](#latency-vs-throughput)
* [Availability vs consistency](#availability-vs-consistency)
-* [Tính hiện có và tính nhất quán](#availability-vs-consistency)
+* [Tính khả dụng và tính nhất quán](#availability-vs-consistency)
* [CAP theorem](#cap-theorem)
* [Định lý CAP](#cap-theorem)
* [CP - consistency and partition tolerance](#cp---consistency-and-partition-tolerance)
* [CP - tính nhất quán và dung sai phân vùng](#cp---consistency-and-partition-tolerance)
* [AP - availability and partition tolerance](#ap---availability-and-partition-tolerance)
- * [AP - tính hiện có và dung sai phân vùng](#ap---availability-and-partition-tolerance)
+ * [AP - tính khả dụng và dung sai phân vùng](#ap---availability-and-partition-tolerance)
* [Consistency patterns](#consistency-patterns)
* [Các mẫu hình về nhất quán](#consistency-patterns) # FIXME: bad translation
* [Weak consistency](#weak-consistency)
@@ -151,7 +151,7 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
* [Hậu nhất quán](#eventual-consistency) # FIXME: bad translation
* [Nhất quán mạnh](#strong-consistency) # FIXME: bad translation
* [Availability patterns](#availability-patterns)
-* [Các mẫu hình của tính hiện có](#availability-patterns)
+* [Các mẫu hình của tính khả dụng](#availability-patterns)
* [Fail-over](#fail-over)
* [Replication](#replication)
* [Availability in numbers](#availability-in-numbers)
@@ -607,7 +607,7 @@ Nhìn chung là bận cần nhắm vào **tối đa hoá lưu lượng** với *
* [Hiểu về độ trễ và lưu lượng](https://community.cadence.com/cadence_blogs_8/b/sd/archive/2010/09/13/understanding-latency-vs-throughput)
-## Tính hiện có so với tính nhất quán
+## Tính khả dụng so với tính nhất quán
### Định lý CAP
@@ -625,7 +625,7 @@ Trong một hệ thống máy tính phân tán, ta chỉ có thể hỗ trợ ha
* **Partition Tolerance** - The system continues to operate despite arbitrary partitioning due to network failures
* **Tính nhất quán** - Mọi thao tác đọc nhận được kết quả ghi gần nhất hoặc lỗi
-* **Tính hiện có** - Mọi yêu cầu đều nhận được hồi đáp, nhưng không bảo đảm là chứa phiên bản gần nhất.
+* **Tính khả dụng** - Mọi yêu cầu đều nhận được hồi đáp, nhưng không bảo đảm là chứa phiên bản gần nhất.
* **Dung sai phân vùng** - Hệ thống tiếp tục hoạt động mặc dù bị phân vùng do lỗi mạng lưới.
*Networks aren't reliable, so you'll need to support partition tolerance. You'll need to make a software tradeoff between consistency and availability.*
@@ -688,10 +688,10 @@ Cách tiếp cận này được thấy trong file systems và RDBMS. Strong co
* [Transactions across data centers](http://snarfed.org/transactions_across_datacenters_io.html)
## Availability patterns
-## Các mẫu hình về tính hiện có
+## Các mẫu hình về tính khả dụng
There are two complementary patterns to support high availability: **fail-over** and **replication**.
-Có hai mẫu hình bổ sung lẫn nhau hỗ trợ khả năng hiện có cao: **fail-over** và **bản tái tạo*** # FIXME: bad translation
+Có hai mẫu hình bổ sung lẫn nhau hỗ trợ khả năng khả dụng cao: **fail-over** và **bản tái tạo*** # FIXME: bad translation
### Fail-over
@@ -752,27 +752,27 @@ Availability is often quantified by uptime (or downtime) as a percentage of time
| Downtime per day | 8.6s |
#### Availability in parallel vs in sequence
-#### Tính hiện có trong thực thi song song so với trình tự
+#### Tính khả dụng trong thực thi song song so với trình tự
If a service consists of multiple components prone to failure, the service's overall availability depends on whether the components are in sequence or in parallel.
-Nếu một dịch vụ bao gồm nhiều thành phần dễ mắc lỗi, thì tính hiện có toàn phần của dịch vụ này phụ thuộc vào các thành phần nằm trong một trình tự hay nằm song song.
+Nếu một dịch vụ bao gồm nhiều thành phần dễ mắc lỗi, thì tính khả dụng toàn phần của dịch vụ này phụ thuộc vào các thành phần nằm trong một trình tự hay nằm song song.
###### In sequence
###### Trong trình tự
Overall availability decreases when two components with availability < 100% are in sequence:
-Tính hiện có toàn phần giảm đi khi có 2 thành phần với tính hiện có < 100% nằm theo trình tự:
+Tính khả dụng toàn phần giảm đi khi có 2 thành phần với tính khả dụng < 100% nằm theo trình tự:
```
Availability (Total) = Availability (Foo) * Availability (Bar)
```
```
-Tính hiện có (Tổng) = Tính hiện có (A) * Tính hiện có (B)
+Tính khả dụng (Tổng) = Tính khả dụng (A) * Tính khả dụng (B)
```
If both `Foo` and `Bar` each had 99.9% availability, their total availability in sequence would be 99.8%.
-Nếu cả hai `A` và `B`, có 99,9% "hiện có", tổng hiện có trong trình tự sẽ là 99,8%.
+Nếu cả hai `A` và `B`, có 99,9% "khả dụng", tổng khả dụng trong trình tự sẽ là 99,8%.
###### In parallel
###### Trong song song # FIXME: bad translation
@@ -2143,7 +2143,6 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Large-scale system: "hệ thống lớn"?
- Scalable/scalability: "mở rộng được"?
-- Availability: currently be translated as "tính hiện có", but that sounds weird to me right now. Probably will replace them with "tính sẵn sàng", or "tính hiệu lực".
- Partition tolerance: "dung sai phân vùng" (Typically, "dung sai" in Vietnamese is a scalar value, and often accompanied with an unit. So I'm not sure this is the right one.)
- Client/server
- Request/response
From 99316623abbbc5383275fa9bd7d7dbbfb201d938 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 20 Feb 2022 12:58:51 +0700
Subject: [PATCH 40/56] Another VI update
---
README-vi.md | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index c205bb65..6576c56b 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -237,7 +237,7 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
* [An ninh](#security)
* [Appendix](#appendix)
* [Phụ lục](#security)
- * [Powers of two table](#powers-of-two-table)
+ * [Bảng bình phương](#powers-of-two-table)
* [Latency numbers every programmer should know](#latency-numbers-every-programmer-should-know)
* [Additional system design interview questions](#additional-system-design-interview-questions)
* [Real world architectures](#real-world-architectures)
@@ -380,11 +380,11 @@ You might be asked to do some estimates by hand. Refer to the [Appendix](#appen
Bạn có thể được yêu cầu làm một số ước lượng bằng tay. Tham khảo phần [Phụ lục](#appendix) cho một số tài liệu sau:
* [Use back of the envelope calculations](http://highscalability.com/blog/2011/1/26/google-pro-tip-use-back-of-the-envelope-calculations-to-choo.html)
-* [Powers of two table](#powers-of-two-table)
+* [Bảng bình phương](#powers-of-two-table)
* [Latency numbers every programmer should know](#latency-numbers-every-programmer-should-know)
* [Tính toán nháp](http://highscalability.com/blog/2011/1/26/google-pro-tip-use-back-of-the-envelope-calculations-to-choo.html)
-* [Bảng mũ hai](#powers-of-two-table)
+* [Bảng bình phương](#powers-of-two-table)
* [Những độ trễ mà mọi lập trình viên nên biết](#latency-numbers-every-programmer-should-know)
### Source(s) and further reading
@@ -1867,7 +1867,7 @@ An ninh là một chủ đề rộng. Trừ khi bạn có kinh nghiệm đáng k
You'll sometimes be asked to do 'back-of-the-envelope' estimates. For example, you might need to determine how long it will take to generate 100 image thumbnails from disk or how much memory a data structure will take. The **Powers of two table** and **Latency numbers every programmer should know** are handy references.
-### Powers of two table
+### Bảng bình phương
```
Power Exact Value Approx Value Bytes
@@ -1884,9 +1884,10 @@ Power Exact Value Approx Value Bytes
#### Source(s) and further reading
-* [Powers of two](https://en.wikipedia.org/wiki/Power_of_two)
+* [Bảng bình phương](https://en.wikipedia.org/wiki/Power_of_two)
### Latency numbers every programmer should know
+### Các chỉ số độ trễ mọi LTV nên biết
```
Latency Comparison Numbers
@@ -1912,9 +1913,10 @@ Notes
1 ns = 10^-9 seconds
1 us = 10^-6 seconds = 1,000 ns
1 ms = 10^-3 seconds = 1,000 us = 1,000,000 ns
-```
+``**
Handy metrics based on numbers above:
+Một số tham số hữu dụng từ các con số trên:
* Read sequentially from HDD at 30 MB/s
* Read sequentially from 1 Gbps Ethernet at 100 MB/s
@@ -1923,6 +1925,13 @@ Handy metrics based on numbers above:
* 6-7 world-wide round trips per second
* 2,000 round trips per second within a data center
+* Tốc độ đọc liên tiếp trên ổ cứng từ (HDD) là 30 MB/s
+* Tốc độ đọc liên tiếp trên Ethernet 1Gbps là 100 MB/s
+* Tốc độ đọc liên tiếp trên ổ đĩa bán dẫn (SSD) là 1 GB/s
+* Tốc độ đọc liên tiếp trên bộ nhớ chính (main memory) là 4 GB/s
+* Tốc độ truyền tải mỗi giây có thể đi 6-7 vòng trái đất.
+* Tốc độ truyền tải có thể đạt 2.0000 hành trình xuyên suốt một trung tâm dữ liệu.
+
#### Latency numbers visualized
#### Hình tượng hoá các độ trễ khác nhau # FIXME: bad translation
From 9dfd2d242dbedd95af71447058730d89cebe574e Mon Sep 17 00:00:00 2001
From: huylenq
Date: Tue, 3 May 2022 14:13:16 +0700
Subject: [PATCH 41/56] Another VI update
---
README-vi.md | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 6576c56b..ccf90207 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -434,19 +434,17 @@ Check out the following links to get a better idea of what to expect:
### Thiết kế Pastebin.com (hoặc Bit.ly)
[View exercise and solution](solutions/system_design/pastebin/README.md)
-[Xem bài tập và lời giải](solutions/system_design/pastebin/README.md)
+[Xem bài tập và bài giải](solutions/system_design/pastebin/README.md)

### Design the Twitter timeline and search (or Facebook feed and search)
### Thiết kế Twitter timeline và tìm kiếm (hoặc Facebook feed và tìm kiếm)
-[View exercise and solution](solutions/system_design/twitter/README.md)
-[Xem bài tập và lời giải](solutions/system_design/twitter/README.md)
+[Xem bài tập và bài giải](solutions/system_design/twitter/README.md)

-### Design a web crawler
### Thiết kế một web crawler
[View exercise and solution](solutions/system_design/web_crawler/README.md)
@@ -454,33 +452,37 @@ Check out the following links to get a better idea of what to expect:

-### Design Mint.com
+### Thiết kế Mint.com
[View exercise and solution](solutions/system_design/mint/README.md)
+[Xem bài tập và bài giải](solutions/system_design/mint/README.md)

-### Design the data structures for a social network
+### Thiết kế các cấu trúc dữ liệu cho một mạng xã hội
-[View exercise and solution](solutions/system_design/social_graph/README.md)
+[Xem bài tập và bài giải](solutions/system_design/social_graph/README.md)

### Design a key-value store for a search engine
+### Thiết kế một kho khoá-giá trị (key-value store) phục vụ một máy tìm kiếm (search engine)
-[View exercise and solution](solutions/system_design/query_cache/README.md)
+[Xem bài tập và bài giải](solutions/system_design/query_cache/README.md)

### Design Amazon's sales ranking by category feature
+### Thiết kế bảng xếp hạng bán hàng theo loại cho Amazon.
-[View exercise and solution](solutions/system_design/sales_rank/README.md)
+[Xem bài tập và bài giải](solutions/system_design/sales_rank/README.md

### Design a system that scales to millions of users on AWS
+### Thiết kế một hệ thống có thể scale đến hàng triệu người dùng trên AWS
-[View exercise and solution](solutions/system_design/scaling_aws/README.md)
+[Xem bài tập và bài giải](solutions/system_design/scaling_aws/README.md)

@@ -2148,10 +2150,10 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
## Vietnamese Meta Notes (will remove after the translation is done)
-### Words that I haven't figured out how to translate yet
+### Words that I haven't figured out how to translate clearly yet
+- Scale / scalable / scalability: "mở rộng được"?
- Large-scale system: "hệ thống lớn"?
-- Scalable/scalability: "mở rộng được"?
- Partition tolerance: "dung sai phân vùng" (Typically, "dung sai" in Vietnamese is a scalar value, and often accompanied with an unit. So I'm not sure this is the right one.)
- Client/server
- Request/response
@@ -2162,13 +2164,8 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Item: highly contextual, it doesn't really have a parlance on the Vietnamese side.
- Client
- Replication/replica
+- Availability: tính sẵn có / hiện có / khả dụng
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
-- Database: "cơ sở dữ liệu", but virtually no one use them.
-
-
-### Words that I'm deciding keep as-is for now
-
-- Availability
-- Consistency
\ No newline at end of file
+- Database: "cơ sở dữ liệu", but virtually no one use them.
\ No newline at end of file
From 457e708b824547403758334583131c43adec0b35 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sat, 16 Jul 2022 21:26:56 +0700
Subject: [PATCH 42/56] Another VI update
---
README-vi.md | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index ccf90207..565f6462 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -2,6 +2,14 @@
**Help [translate](TRANSLATIONS.md) this guide!**
+## Ghi chú từ người dịch
+
+Một số từ khoá hoặc thuật ngữ chuyên ngành được giữ nguyên bản tiếng Anh.
+Với hai lí do. Một là không có / khó kiếm từ tiếng Việt tương ứng được đa số chấp nhận.
+Hai là mục tiêu của bài dịch này là để đẩy nhanh, giảm ma sát cho các bạn đọc tiếng Việt.
+Bản này không nhắm vào trở thành một bản dịch hoàn chỉnh.
+Do đó một số từ khoá, dù có thể có từ dịch tiếng Việt nhưng vẫn được để tiếng Anh nhằm mục đích để các bạn có thể dễ dàng tra cứu, research thêm.
+
# Thiết Kế Hệ Thống Cơ Bản
@@ -337,22 +345,29 @@ Thu thập nhu cầu và phạm vi của vấn đề. Đặt các câu hỏi l
Outline a high level design with all important components.
* Sketch the main components and connections
+* Phác thảo các thành phần chính và kết nối
* Justify your ideas
+* Chứng minh ý tưởng
### Step 3: Design core components
### Bước 3: Thiết kế các thành phần lõi
Dive into details for each core component. For example, if you were asked to [design a url shortening service](solutions/system_design/pastebin/README.md), discuss:
-
+Đào sâu vào chi tiết của từng thành phần lõi. Ví dụ, nếu bạn được đề nghị [thiết kế một dịch vụ rút ngắn url](solutions/system_design/pastebin/README.md), hãy trình bày:
* Generating and storing a hash of the full url
- * [MD5](solutions/system_design/pastebin/README.md) and [Base62](solutions/system_design/pastebin/README.md)
+* Tạo và lưu trữ một mã băm từ url đầy đủ
+ * [MD5](solutions/system_design/pastebin/README.md) và [Base62](solutions/system_design/pastebin/README.md)
* Hash collisions
- * SQL or NoSQL
+ * Va chạm mã băm
+ * SQL hay NoSQL
* Database schema
* Translating a hashed url to the full url
+* Dịch một url đã được băm trở lại url đầy đủ
* Database lookup
+ * Truy cứu database
* API and object-oriented design
+* API và thiết kế hướng đối tượng
### Step 4: Scale the design
### Bước 4: "Scale" thiết kế
@@ -760,7 +775,7 @@ If a service consists of multiple components prone to failure, the service's ove
Nếu một dịch vụ bao gồm nhiều thành phần dễ mắc lỗi, thì tính khả dụng toàn phần của dịch vụ này phụ thuộc vào các thành phần nằm trong một trình tự hay nằm song song.
###### In sequence
-###### Trong trình tự
+###### Trình tự
Overall availability decreases when two components with availability < 100% are in sequence:
Tính khả dụng toàn phần giảm đi khi có 2 thành phần với tính khả dụng < 100% nằm theo trình tự:
@@ -777,15 +792,22 @@ If both `Foo` and `Bar` each had 99.9% availability, their total availability in
Nếu cả hai `A` và `B`, có 99,9% "khả dụng", tổng khả dụng trong trình tự sẽ là 99,8%.
###### In parallel
-###### Trong song song # FIXME: bad translation
+###### Song song
Overall availability increases when two components with availability < 100% are in parallel:
+Tính khả dụng tổng thể gia tăng khi hai thành phần có tính khả dụng < 100% được chạy song song:
+
```
Availability (Total) = 1 - (1 - Availability (Foo)) * (1 - Availability (Bar))
```
+```
+Khả Dụng (tổng) = 1 - (1 - Khả Dụng (Thành Phần A)) * (1 - Khả Dụng (Thành Phần B))
+```
+
If both `Foo` and `Bar` each had 99.9% availability, their total availability in parallel would be 99.9999%.
+Nếu cả hai `A` và `B`, mỗi thành phần có 99,9% khả dụng, thì tổng khả dụng khi chạy song song sẽ là 99,9999%.
## Hệ thống tên miền
From abd71b9963176d291102cdc548aa3dce3868a2fb Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 21 Aug 2022 16:04:22 +0700
Subject: [PATCH 43/56] Another VI update
---
README-vi.md | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 565f6462..6e8e164c 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -168,7 +168,6 @@ Review the [Contributing Guidelines](CONTRIBUTING.md).
* [Content delivery network](#content-delivery-network)
* [Push CDNs](#push-cdns)
* [Pull CDNs](#pull-cdns)
-* [Load balancer](#load-balancer)
* [Cân bằng tải](#load-balancer)
* [Active-passive](#active-passive)
* [Chủ động - bị động](#active-passive)
@@ -539,14 +538,19 @@ Check out the following links to get a better idea of what to expect:
| Bổ sung một câu hỏi về thiết kế hướng đối tượng | [Contribute](#contributing) |
## System design topics: start here
+## Các chủ đề thiết kế hệ thống: bắt đầu ở đây
New to system design?
+Mới tiếp cận với thiết kế hệ thống?
First, you'll need a basic understanding of common principles, learning about what they are, how they are used, and their pros and cons.
+Đầu tiên bạn sẽ cần một số hiểu biết cơ bản về các nguyên lý chung, học về định nghĩa, cách sử dụng, cùng với điểm điểm được và mất cả các nguyên lý này.
### Step 1: Review the scalability video lecture
+### Buốc 1: Xem các video bài giảng về khả năng mở rộng (scalability)
[Scalability Lecture at Harvard](https://www.youtube.com/watch?v=-W9F__D3oY4)
+[Bài giảng về tính mở rộng (scalability) tại Harvard](https://www.youtube.com/watch?v=-W9F__D3oY4)
* Topics covered:
* Vertical scaling
@@ -2174,7 +2178,7 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
### Words that I haven't figured out how to translate clearly yet
-- Scale / scalable / scalability: "mở rộng được"?
+- Scale / scalable / scalability: "mở rộng" / "khả năng mở rộng"?
- Large-scale system: "hệ thống lớn"?
- Partition tolerance: "dung sai phân vùng" (Typically, "dung sai" in Vietnamese is a scalar value, and often accompanied with an unit. So I'm not sure this is the right one.)
- Client/server
From b695fde5fa750c0665a97826de30535bcb904335 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 13 Nov 2022 22:30:47 +0700
Subject: [PATCH 44/56] Another VI update
---
README-vi.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index 6e8e164c..d689d367 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -888,14 +888,20 @@ Pull CDNs grab new content from your server when the first user requests the con
Pull CDN kéo nội dung mới từ máy chủ của bạn khi có yêu cầu đầu tiên từ người dùng cho nội dung này. Bạn để nội dung trên máy chủ và viết lại URL để trỏ đến CDN. Việc này dẫn đến thời gian thực thi yêu cầu sẽ chậm, cho đến hki nội dung được cache trên CDN.
A [time-to-live (TTL)](https://en.wikipedia.org/wiki/Time_to_live) determines how long content is cached. Pull CDNs minimize storage space on the CDN, but can create redundant traffic if files expire and are pulled before they have actually changed.
+TTL (time-to-live - thời gian tồn tại) xác định thời gian mà nội dung sẽ được cache. Pull CDN tối thiểu hoá dụng lượng chứa trên CDN, nhưng có thể tạo ra lưu thông dư thừa nếu các tệp tin bị quá thời hạn cache và được kéo về khi chưa thực sự thay đổi.
Sites with heavy traffic work well with pull CDNs, as traffic is spread out more evenly with only recently-requested content remaining on the CDN.
+Các trang với lưu lượng cao sẽ hoạt động tốt với pull CDN, vì lẽ lưu thông sẽ được dàn trải cân bằng hơn với nội dung được yêu cầu gần nhất sẽ được lưu tồn trên CDN.
### Disadvantage(s): CDN
+### Bất lợi của CDN
* CDN costs could be significant depending on traffic, although this should be weighed with additional costs you would incur not using a CDN.
+* Chi phí cho CDN phụ thuộc rất nhiều vào lưu thông, mặc dù chi phí này cần được đo đếm so với chi phí phát sinh gây ra nếu bạn không dùng CDN.
* Content might be stale if it is updated before the TTL expires it.
+* Nội dung có thể là bản cũ nếu được cập nhật trong khi TTL chưa hết hạn.
* CDNs require changing URLs for static content to point to the CDN.
+* Cần phải thay đổi URL cho các nội dung tĩnh để trỏ về CDN.
### Source(s) and further reading
From fff8b3147547b75569e160fc9564fc742a95ae87 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 11 Dec 2022 23:59:35 +0700
Subject: [PATCH 45/56] Another VI update
---
README-vi.md | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/README-vi.md b/README-vi.md
index d689d367..7e4cfe02 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1157,6 +1157,7 @@ Both masters serve reads and writes and coordinate with each other on writes. I
* Replication adds more hardware and additional complexity.
##### Source(s) and further reading: replication
+##### Nguồn đọc thêm: replication
* [Scalability, availability, stability, patterns](http://www.slideshare.net/jboner/scalability-availability-stability-patterns/)
* [Multi-master replication](https://en.wikipedia.org/wiki/Multi-master_replication)
@@ -1172,11 +1173,16 @@ Both masters serve reads and writes and coordinate with each other on writes. I
Federation (or functional partitioning) splits up databases by function. For example, instead of a single, monolithic database, you could have three databases: **forums**, **users**, and **products**, resulting in less read and write traffic to each database and therefore less replication lag. Smaller databases result in more data that can fit in memory, which in turn results in more cache hits due to improved cache locality. With no single central master serializing writes you can write in parallel, increasing throughput.
##### Disadvantage(s): federation
+##### Bất lợi của federation
* Federation is not effective if your schema requires huge functions or tables.
+* Federation không hiệu quả nếu schema của bạn đòi hỏi nhiều hàm hoặc bảng.
* You'll need to update your application logic to determine which database to read and write.
+* Bạn sẽ cần cập nhật logic phía ứng dụng để xác định CSDL nào để đọc và ghi.
* Joining data from two databases is more complex with a [server link](http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers).
+* Liên kết dữ liệu giữa hai CSDL là phức tạp hơn với [server link](http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers). # FIXME: probably wrong meaning?
* Federation adds more hardware and additional complexity.
+* Federation cần thêm phần cứng và tăng độ phức tạp.
##### Source(s) and further reading: federation
@@ -2195,7 +2201,7 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Cache: "tiền bộ nhớ"?
- Item: highly contextual, it doesn't really have a parlance on the Vietnamese side.
- Client
-- Replication/replica
+- Replication/replica: tái tạo / sao chép?
- Availability: tính sẵn có / hiện có / khả dụng
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
From 87137fdc4e0fede55f93ed0adc0f643e99460859 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sat, 14 Jan 2023 10:47:27 +0700
Subject: [PATCH 46/56] Another VI update
---
README-vi.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index 7e4cfe02..77b92087 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1149,12 +1149,18 @@ Both masters serve reads and writes and coordinate with each other on writes. I
* See [Disadvantage(s): replication](#disadvantages-replication) for points related to **both** master-slave and master-master.
##### Disadvantage(s): replication
+##### Bất lợi: replication
* There is a potential for loss of data if the master fails before any newly written data can be replicated to other nodes.
+* Vẫn có khả năng mất dữ liệu nếu master fail trước khi data mới được replicate lên những node khác.
* Writes are replayed to the read replicas. If there are a lot of writes, the read replicas can get bogged down with replaying writes and can't do as many reads.
+* Write sẽ được replay trên các read replica. Nếu có quá nhiều thao tác write, các read replica có thể bị nghẽn cho việc ghi và không thể phục vụ cho việc đọc.
* The more read slaves, the more you have to replicate, which leads to greater replication lag.
+* Càng có nhiều các read slave thì sẽ càng phải tải nhiều cho replicate hơn, dẫn đến tăng lag của replication.
* On some systems, writing to the master can spawn multiple threads to write in parallel, whereas read replicas only support writing sequentially with a single thread.
+* Trong một vài hệ thống, việc ghi vào master có thể tạo nhiều thread để ghi song song, trong khi đó thì read replica sẽ chỉ hỗ trợ ghi nối tiếp trong một thread đơn nhất.
* Replication adds more hardware and additional complexity.
+* Replication cần nhiều tài nguyên phần cứng và tăng độ phức tạp.
##### Source(s) and further reading: replication
##### Nguồn đọc thêm: replication
From 0e09d7014b2a923910cb3af77e6be5def058f11e Mon Sep 17 00:00:00 2001
From: huylenq
Date: Mon, 16 Jan 2023 20:01:42 +0700
Subject: [PATCH 47/56] Another VI update
---
README-vi.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README-vi.md b/README-vi.md
index 77b92087..51b66b39 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1173,11 +1173,13 @@ Both masters serve reads and writes and coordinate with each other on writes. I
- Source: Scaling up to your first 10 million users
+ Nguồn: Scaling up to your first 10 million users
Federation (or functional partitioning) splits up databases by function. For example, instead of a single, monolithic database, you could have three databases: **forums**, **users**, and **products**, resulting in less read and write traffic to each database and therefore less replication lag. Smaller databases result in more data that can fit in memory, which in turn results in more cache hits due to improved cache locality. With no single central master serializing writes you can write in parallel, increasing throughput.
+Federation (hay còn gọi là functional partitioning) chia cắt database theo tính năng. Ví dụ thay vì một database đơn nhất (monolithic database), ta có thể có ba database: **forums**, **users**, và **products**, kết quả là sẽ có ít tác vụ đọc và ghi vào mỗi database và từ đó giảm thiểu độ trễ của replication. Database nhỏ hơn cũng đồng nghĩa với việc sẽ có nhiều dữ liệu có thể chứa vừa trên vùng nhớ hơn, đồng nghĩa với khả năng cache hit (dữ liệu tương ứng có tồn tại trên cache) cao hơn, bởi cache nằm ở cục bộ của database (cache locality). Với việc không có một master trung tâm để serialize (sắp xếp lại theo thứ tự) tác vụ ghi, ta có thể thực hiện việc ghi này song song, từ đó tăng được công suất (throughput).
+
##### Disadvantage(s): federation
##### Bất lợi của federation
@@ -2209,6 +2211,7 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Client
- Replication/replica: tái tạo / sao chép?
- Availability: tính sẵn có / hiện có / khả dụng
+- Traffic:
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
From 8bd8b2d2dd5b18601db866e2aebf877ccec80c4a Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sat, 28 Jan 2023 00:04:32 +0700
Subject: [PATCH 48/56] Another VI update
---
README-vi.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index 51b66b39..9c80d276 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1243,15 +1243,21 @@ In most systems, reads can heavily outnumber writes 100:1 or even 1000:1. A rea
* [Denormalization](https://en.wikipedia.org/wiki/Denormalization)
#### SQL tuning
+#### Điều chỉnh (tuning) SQL
SQL tuning is a broad topic and many [books](https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=sql+tuning) have been written as reference.
+Điều chỉnh SQL là một chủ đề rộng và có rất nhiều [quyển sách](https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=sql+tuning) đã viết về chủ đề này.
It's important to **benchmark** and **profile** to simulate and uncover bottlenecks.
+**Benchmark** và **profile** là hai phương pháp quan trọng để tái tạo và phát hiện cổ chai.
* **Benchmark** - Simulate high-load situations with tools such as [ab](http://httpd.apache.org/docs/2.2/programs/ab.html).
+* **Benchmark** - Giả lập trạng thái tải cao với các công cụ như là [ab](http://httpd.apache.org/docs/2.2/programs/ab.html).
* **Profile** - Enable tools such as the [slow query log](http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html) to help track performance issues.
+* **Profile** - Bật các công cụ như là [slow query log](http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html) để theo dõi các vấn đề về hiệu năng.
Benchmarking and profiling might point you to the following optimizations.
+Benchmark và profile có thể sẽ chỉ ra được các phương thức tối ưu hoá sau.
##### Tighten up the schema
From 58db82b05a295b93f2e80da525a9b0599694bb19 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sat, 28 Jan 2023 11:30:06 +0700
Subject: [PATCH 49/56] Another VI update
---
README-vi.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index 9c80d276..e1b3a81c 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1311,14 +1311,20 @@ NoSQL is a collection of data items represented in a **key-value store**, **docu
In addition to choosing between [SQL or NoSQL](#sql-or-nosql), it is helpful to understand which type of NoSQL database best fits your use case(s). We'll review **key-value stores**, **document stores**, **wide column stores**, and **graph databases** in the next section.
#### Key-value store
+#### Store khoá-trị (key-value store)
> Abstraction: hash table
+> Kiểu dữ liệu khái niệm: hash table # FIXME
A key-value store generally allows for O(1) reads and writes and is often backed by memory or SSD. Data stores can maintain keys in [lexicographic order](https://en.wikipedia.org/wiki/Lexicographical_order), allowing efficient retrieval of key ranges. Key-value stores can allow for storing of metadata with a value.
+Một store khoá-trị thông thường sẽ chấp nhận đọc và ghi trong O(1) và thường được chứa trong bộ nhớ (memory) hoặc SSD. Các data stores có thể sắp xếp khoá với thứ tự [lexicographic](https://en.wikipedia.org/wiki/Lexicographical_order), việc này sẽ cho phép truy vấn dải khoá một cách hiệu quả. Store khoá-trị có thể chấp nhận chứa metadata kèm với giá trị.
+
Key-value stores provide high performance and are often used for simple data models or for rapidly-changing data, such as an in-memory cache layer. Since they offer only a limited set of operations, complexity is shifted to the application layer if additional operations are needed.
+Store khoá trị cung cấp hiệu năng cao và thường được dụng trong các mô hình dữ liệu đơn giản hoặc cho dữ liệu thay đổi liên tục, như ở lớp in-memory cache. Do sẽ có giới hạn cho tập các tác vụ được hỗ trợ, độ phức tạp sẽ được chuyển sang lớp ứng dụng nếu cần thêm các tác vụ khác.
A key-value store is the basis for more complex systems such as a document store, and in some cases, a graph database.
+Một store khoá-trị là nền tảng cho các hệ thống phức tạp hơn như store document, và trong một vài tường hợp, một CSDL đồ thị (graph database).
##### Source(s) and further reading: key-value store
@@ -2218,6 +2224,7 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Replication/replica: tái tạo / sao chép?
- Availability: tính sẵn có / hiện có / khả dụng
- Traffic:
+- (Data) store: "CSDL" is not technically precise.
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
From 3ceb5e3ee8f74729f406f7cdabad261800dae89d Mon Sep 17 00:00:00 2001
From: huylenq
Date: Tue, 14 Mar 2023 21:37:00 +0700
Subject: [PATCH 50/56] Another VI update
---
README-vi.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index e1b3a81c..1523bb74 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1327,6 +1327,7 @@ A key-value store is the basis for more complex systems such as a document store
Một store khoá-trị là nền tảng cho các hệ thống phức tạp hơn như store document, và trong một vài tường hợp, một CSDL đồ thị (graph database).
##### Source(s) and further reading: key-value store
+#### Nguồn đọc thêm: store khoá-trị
* [Key-value database](https://en.wikipedia.org/wiki/Key-value_database)
* [Disadvantages of key-value stores](http://stackoverflow.com/questions/4056093/what-are-the-disadvantages-of-using-a-key-value-table-over-nullable-columns-or)
@@ -1334,18 +1335,25 @@ Một store khoá-trị là nền tảng cho các hệ thống phức tạp hơn
* [Memcached architecture](https://www.adayinthelifeof.nl/2011/02/06/memcache-internals/)
#### Document store
+#### Store tài liệu (document store)
> Abstraction: key-value store with documents stored as values
+> Kiểu dũ liệu khái niệm: store khoá-trị với tài liệu là giá trị
A document store is centered around documents (XML, JSON, binary, etc), where a document stores all information for a given object. Document stores provide APIs or a query language to query based on the internal structure of the document itself. *Note, many key-value stores include features for working with a value's metadata, blurring the lines between these two storage types.*
+Store tài liệu xoay quanh các loại tài liệu (XML, JSON, binary, vâng vâng), trong đó một tài liệu chứa tất các các thông tin liên quan cho một đối tượng. Store tài liệu cung cấp API hoặc một ngôn ngữ truy vấn để truy vấn dựa trên cấu trúc bên trong của bản thân tài liệu. *Lưu ý, có nhiều store khoá-trị đã bao gồm các tính năng cho thao tác với metadata của giá trị, làm mờ đi ranh giới giữa hai store này.**
Based on the underlying implementation, documents are organized by collections, tags, metadata, or directories. Although documents can be organized or grouped together, documents may have fields that are completely different from each other.
+Dựa trên cách hiện thực bên dưới, các tài liệu được tổ chức theo bộ sưu tập (collection), tags, metadata, hoặc thư mục. Mặc dù tài liệu có thể được tổ chức hoặc gom nhóm với nhau, tài liệu có thể có các trường hoàn toàn khác biệt với nhau.
Some document stores like [MongoDB](https://www.mongodb.com/mongodb-architecture) and [CouchDB](https://blog.couchdb.org/2016/08/01/couchdb-2-0-architecture/) also provide a SQL-like language to perform complex queries. [DynamoDB](http://www.read.seas.harvard.edu/~kohler/class/cs239-w08/decandia07dynamo.pdf) supports both key-values and documents.
+Một vài store tài liệu như là [MongoDB](https://www.mongodb.com/mongodb-architecture và [CouchDB](https://blog.couchdb.org/2016/08/01/couchdb-2-0-architecture/) còn cung cấp ngôn ngữ gần SQL để thực thi các câu truy vấn phức tạp. [DynamoDB](http://www.read.seas.harvard.edu/~kohler/class/cs239-w08/decandia07dynamo.pdf) hỗ trợ cả hai kiểu khoá-trị và tài liệu.
Document stores provide high flexibility and are often used for working with occasionally changing data.
+Store tài liệu cung cấp độ co giãn cao và thường được sử dụng cho những dữ liệu ít bị thay đổi thường xuyên.
##### Source(s) and further reading: document store
+##### Nguồn đọc thêm: store tài liệu
* [Document-oriented database](https://en.wikipedia.org/wiki/Document-oriented_database)
* [MongoDB architecture](https://www.mongodb.com/mongodb-architecture)
From cb8a82c00b8a8a820bb7e07e7a0e1760a291916d Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sat, 18 Mar 2023 22:35:22 +0700
Subject: [PATCH 51/56] Another VI update
---
README-vi.md | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 1523bb74..7c39dbf9 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1314,7 +1314,7 @@ In addition to choosing between [SQL or NoSQL](#sql-or-nosql), it is helpful to
#### Store khoá-trị (key-value store)
> Abstraction: hash table
-> Kiểu dữ liệu khái niệm: hash table # FIXME
+> Kiểu trừu tượng: hash table # FIXME
A key-value store generally allows for O(1) reads and writes and is often backed by memory or SSD. Data stores can maintain keys in [lexicographic order](https://en.wikipedia.org/wiki/Lexicographical_order), allowing efficient retrieval of key ranges. Key-value stores can allow for storing of metadata with a value.
@@ -1338,7 +1338,7 @@ Một store khoá-trị là nền tảng cho các hệ thống phức tạp hơn
#### Store tài liệu (document store)
> Abstraction: key-value store with documents stored as values
-> Kiểu dũ liệu khái niệm: store khoá-trị với tài liệu là giá trị
+> Kiểu trừu tượng: store khoá-trị với tài liệu là giá trị
A document store is centered around documents (XML, JSON, binary, etc), where a document stores all information for a given object. Document stores provide APIs or a query language to query based on the internal structure of the document itself. *Note, many key-value stores include features for working with a value's metadata, blurring the lines between these two storage types.*
Store tài liệu xoay quanh các loại tài liệu (XML, JSON, binary, vâng vâng), trong đó một tài liệu chứa tất các các thông tin liên quan cho một đối tượng. Store tài liệu cung cấp API hoặc một ngôn ngữ truy vấn để truy vấn dựa trên cấu trúc bên trong của bản thân tài liệu. *Lưu ý, có nhiều store khoá-trị đã bao gồm các tính năng cho thao tác với metadata của giá trị, làm mờ đi ranh giới giữa hai store này.**
@@ -1361,16 +1361,19 @@ Store tài liệu cung cấp độ co giãn cao và thường được sử dụ
* [Elasticsearch architecture](https://www.elastic.co/blog/found-elasticsearch-from-the-bottom-up)
#### Wide column store
+#### Store wide column
- Source: SQL & NoSQL, a brief history
+ Nguồn: SQL & NoSQL, a brief history
> Abstraction: nested map `ColumnFamily>`
+> Kiểu trừu tượng: nested map `ColumnFamily>`
A wide column store's basic unit of data is a column (name/value pair). A column can be grouped in column families (analogous to a SQL table). Super column families further group column families. You can access each column independently with a row key, and columns with the same row key form a row. Each value contains a timestamp for versioning and for conflict resolution.
+Đơn vị cơ bản của store wide column là cột (một cặp tên/giá trị). Một cột có thể được nhóm vào một column family (tương ứng với một bảng SQL). Super column family nhóm lại cái column family. Ta có thể truy cập vào từng cột một cách độc lập với một khoá hàng (row key), các cột với cùng một khoá hàng tạo thành một hàng. Mỗi giá trị chứa một timestamp cho việc giữ phiên bản và giải quyết xung đột (conflict resolution) # FIXME: "giải quyết xung đột" hardly yield the right Vietnamese interpretation.
Google introduced [Bigtable](http://www.read.seas.harvard.edu/~kohler/class/cs239-w08/chang06bigtable.pdf) as the first wide column store, which influenced the open-source [HBase](https://www.edureka.co/blog/hbase-architecture/) often-used in the Hadoop ecosystem, and [Cassandra](http://docs.datastax.com/en/cassandra/3.0/cassandra/architecture/archIntro.html) from Facebook. Stores such as BigTable, HBase, and Cassandra maintain keys in lexicographic order, allowing efficient retrieval of selective key ranges.
From 849805633f740f863252bb7683411a303bfa73be Mon Sep 17 00:00:00 2001
From: huylenq
Date: Sun, 30 Apr 2023 21:48:39 +0700
Subject: [PATCH 52/56] Another VI Update
---
README-vi.md | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/README-vi.md b/README-vi.md
index 7c39dbf9..fa88f952 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1415,6 +1415,7 @@ Graphs databases offer high performance for data models with complex relationshi
* [NoSQL patterns](http://horicky.blogspot.com/2009/11/nosql-patterns.html)
### SQL or NoSQL
+### SQL hay NoSQL
@@ -1422,7 +1423,15 @@ Graphs databases offer high performance for data models with complex relationshi
Source: Transitioning from RDBMS to NoSQL
+
+
+
+ Nguồn: Chuyển đổi từ RDMBS sang NoSQL
+
+
+
Reasons for **SQL**:
+Lí do để dùng **SQL**:**
* Structured data
* Strict schema
@@ -1433,6 +1442,17 @@ Reasons for **SQL**:
* More established: developers, community, code, tools, etc
* Lookups by index are very fast
+* Dữ liệu có cấu trúc
+* Schema chặt chẽ
+* Dữ liệu có quan hệ
+* Có nhu cầu cho join phức tạp
+* Transaction
+* Mô hình rõ ràng cho việc scale
+* Vững chắc hơn về: developer, cộng đồng, code, công cụ, vâng vâng.
+* Truy vấn nhanh trên chỉ mục
+
+
+
Reasons for **NoSQL**:
* Semi-structured data
From 73a1d7d33f4a5e535ee14e28c6d21c63100ca5c4 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Thu, 4 Jan 2024 09:42:55 +0700
Subject: [PATCH 53/56] Another VI update
---
README-vi.md | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index fa88f952..2b93bede 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -717,7 +717,7 @@ Có hai mẫu hình bổ sung lẫn nhau hỗ trợ khả năng khả dụng cao
### Fail-over
#### Active-passive
-#### Chủ động - bị động
+#### Chủ động-bị động
With active-passive fail-over, heartbeats are sent between the active and the passive server on standby. If the heartbeat is interrupted, the passive server takes over the active's IP address and resumes service.
Với fail-over chủ động - bị động, nhịp tim (heartbeat) sẽ được gửi giữa máy chủ chủ động và máy chủ bị động trực chờ. Nếu nhịp tim bị ngắt quãng, máy chủ bị động sẽ tiếp quản địa chỉ IP của máy chủ động và tiếp tục dịch vụ.
@@ -728,33 +728,46 @@ The length of downtime is determined by whether the passive server is already ru
Active-passive failover can also be referred to as master-slave failover.
Failover chủ động - bị động còn được biết dưới tên failover master-slave.
-#### Active-active
+#### Chủ động-chủ động
In active-active, both servers are managing traffic, spreading the load between them.
+Trong mô hình chủ động-chủ động, cả hai server đều quản lý traffic, giàn trải load cho nhau.
If the servers are public-facing, the DNS would need to know about the public IPs of both servers. If the servers are internal-facing, application logic would need to know about both servers.
+Nếu các server là public-facing, DNS sẽ cần phải biết public IP của cả hai. Nếu các server là internal-facing, thì application logic cần biết về cả hai server.
Active-active failover can also be referred to as master-master failover.
+Failover trong chủ động-chủ động còn được biết đến là master-master failover.
### Disadvantage(s): failover
+### Bất lợi của failover
* Fail-over adds more hardware and additional complexity.
+* Fail-over đòi hỏi thêm phần cứng và tăng độ phức tạp.
* There is a potential for loss of data if the active system fails before any newly written data can be replicated to the passive.
+* Sẽ có khả năng mất dữ liệu nếu hệ thống đang trạng thái chủ động fail trước khi dữ liệu mới được tái tạo vào hệ thống đang ở trạng thái bị động.
### Replication
+### Tái tạo
#### Master-slave and master-master
+#### Master-slave và master-master
This topic is further discussed in the [Database](#database) section:
+Chủ đề này được sẽ được phân tích thêm trong phần [Cơ sở dữ liệu](#database):
* [Master-slave replication](#master-slave-replication)
-* [Master-master replication](#master-master-replication)
+* [Tái tạo trong master-slave](#master-slave-replication)
+* [Tái tạo trong master-master](#master-master-replication)
### Availability in numbers
+### Các con số trong tính khả dụng
Availability is often quantified by uptime (or downtime) as a percentage of time the service is available. Availability is generally measured in number of 9s--a service with 99.99% availability is described as having four 9s.
+Tính khả dụng thường được lượng hoá bởi uptime (hoặc downtime) bằng tỉ lệ phần trăm của thời gian dịch vụ ở trạng thái khả dụng. Tính khả dụng nhìn chung được đo lường với đơn vị số "9"--như một dịch vụ khả dụng với mức 99.99% sử dụng bốn số "9".
#### 99.9% availability - three 9s
+#### 99.9% khả dụng - "ba 9"
| Duration | Acceptable downtime|
|---------------------|--------------------|
@@ -763,7 +776,15 @@ Availability is often quantified by uptime (or downtime) as a percentage of time
| Downtime per week | 10m 4.8s |
| Downtime per day | 1m 26.4s |
+| Thời lượng | Downtime chấp nhận |
+|---------------------|-----------------------|
+| Downtime hằng năm | 8 giờ 45 phút 57 giây |
+| Downtime hằng tháng | 43 phút 49,7 giây |
+| Downtime hằng tuần | 10 phút 4,8 giây |
+| Downtime hằng ngày | 1 phút 26,4 giây |
+
#### 99.99% availability - four 9s
+#### 99.99% khả dụng - "bốn 9"
| Duration | Acceptable downtime|
|---------------------|--------------------|
@@ -772,6 +793,13 @@ Availability is often quantified by uptime (or downtime) as a percentage of time
| Downtime per week | 1m 5s |
| Downtime per day | 8.6s |
+| Thời lượng | Downtime chấp nhận |
+|---------------------|--------------------|
+| Downtime hằng năm | 52 phút 35,7 giây |
+| Downtime hằng tháng | 4 phút 23 giây |
+| Downtime hằng tuần | 1 phút 5 giây |
+| Downtime hằng ngày | 8,6 giây |
+
#### Availability in parallel vs in sequence
#### Tính khả dụng trong thực thi song song so với trình tự
@@ -2256,6 +2284,7 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Availability: tính sẵn có / hiện có / khả dụng
- Traffic:
- (Data) store: "CSDL" is not technically precise.
+- Failover
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
From e1e6f3562a68b6971fabee56644355a752f3ac45 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Fri, 5 Jan 2024 09:52:10 +0700
Subject: [PATCH 54/56] Another VI update
---
README-vi.md | 51 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 45 insertions(+), 6 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index 2b93bede..dee8a7cb 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -294,7 +294,7 @@ Bắt đầu ở bề rộng và đi sâu hơn vào từng vùng. Biết một
* **Thời gian ngắn** - Nhắm vào bề rộng của các chủ đề thiết kế hệ thống. Tập luyện bằng cách giải quyết **một số** câu hỏi phỏng vấn.
* **Thời gian trung bình** - Nhắm vào bề rộng và một chút phần sâu với các chủ đều thiết kế hệ thống. Tập luyện giải quyết **nhiều** câu hỏi phỏng vấn.
-* ** Thời gian dài** - Nhắm vào bề rộng và nhiều phần sâu với các chủ đề thiết ké hệ thống. Tập luyện giải quyết **hầu hết** các câu hỏi phỏng vấn.
+* **Thời gian dài** - Nhắm vào bề rộng và nhiều phần sâu với các chủ đề thiết ké hệ thống. Tập luyện giải quyết **hầu hết** các câu hỏi phỏng vấn.
| | Short | Medium | Long |
|---|---|---|---|
@@ -1857,17 +1857,21 @@ Use UDP over TCP when:
* [User datagram protocol](https://en.wikipedia.org/wiki/User_Datagram_Protocol)
* [Scaling memcache at Facebook](http://www.cs.bu.edu/~jappavoo/jappavoo.github.com/451/papers/memcache-fb.pdf)
-### Remote procedure call (RPC)
+### Gọi thủ tục từ xa (Remote procedure call - RPC)
- Source: Crack the system design interview
+ Nguồn: Crack the system design interview
In an RPC, a client causes a procedure to execute on a different address space, usually a remote server. The procedure is coded as if it were a local procedure call, abstracting away the details of how to communicate with the server from the client program. Remote calls are usually slower and less reliable than local calls so it is helpful to distinguish RPC calls from local calls. Popular RPC frameworks include [Protobuf](https://developers.google.com/protocol-buffers/), [Thrift](https://thrift.apache.org/), and [Avro](https://avro.apache.org/docs/current/).
+Trong RPC, client làm cho một thủ tục được thực thi trên một vùng địa chỉ khác, thường là một server từ xa. Thủ tục được lập trình như là một thủ nội bộ, trừu tượng hoá đi chi tiết về cách trao đổi giữa chương trình trên server và chương trình client. Việc gọi từ xa thường là chậm và ít reliable hơn là gọi nội bộ, nên thường nên cần phân hoá giữa RPC và nội bộ. Các framework RPC phổ biết: [Protobuf](https://developers.google.com/protocol-buffers/), [Thrift](https://thrift.apache.org/), và [Avro](https://avro.apache.org/docs/current/).
+
+
RPC is a request-response protocol:
+RPC là một nghi thức request-response
* **Client program** - Calls the client stub procedure. The parameters are pushed onto the stack like a local procedure call.
* **Client stub procedure** - Marshals (packs) procedure id and arguments into a request message.
@@ -1876,7 +1880,15 @@ RPC is a request-response protocol:
* **Server stub procedure** - Unmarshalls the results, calls the server procedure matching the procedure id and passes the given arguments.
* The server response repeats the steps above in reverse order.
+
+* **Chương trình ở client** - Sẽ gọi đến thủ tục stub trên client. Tham số được đẩy vào stack như là một thủ tục nội bộ.
+* **Thủ thục stub ở client** - Marshal (đóng gói) id của thủ tục và tham số trong một request message.
+* **Module truyền đạt ở client** - OS gửi một message từ client đến server.
+* **Module truyền đạt ở server ** - OS packet đến sang thủ thục stub qua server.
+* **Thủ tục stub ở server** - Unmarshal kết quả, gọi đến thủ tục tương ứng với ID và truyền các tham số đã được gửi.
+
Sample RPC calls:
+Ví dụ của gọi RPC:
```
GET /someoperation?data=anId
@@ -1889,23 +1901,38 @@ POST /anotheroperation
```
RPC is focused on exposing behaviors. RPCs are often used for performance reasons with internal communications, as you can hand-craft native calls to better fit your use cases.
+RPC chú trọng trên việc phơi bày hành vi. RPC thường được sử dụng cho lí do hiệu năng trong truyền đạt nội bộ, vì lẽ bạn có thể, một cách thủ công, tạo các cuộc gọi native cho phù hợp với nhu cầu.
+(Ghi chú của người dịch: ý chính ở đây khi dịch ra tiếng Việt khó thoát nghĩa. Nhìn chung, khi so sánh với các mô hình không phải RPC, thì ta cần thiết kế một lớp trừu tượng hoá. Chẳng hạn với RESTful thì đối tượng trừu tượng chính sẽ là "resource". RPC mô hình hoá một cách trực tiếp hơn: thủ tục gọi thủ tục. Nên sẽ co giãn hơn vì bạn không cần phải bám theo một mô hình nào ở lớp trừu tượng trên. Nhưng đánh đổi bởi "thủ công" là ở việc phải duy trì những thủ tục đối ứng giữa hai bên client và server).
Choose a native library (aka SDK) when:
+Chọn một thư viện native (SDK) khi:
* You know your target platform.
* You want to control how your "logic" is accessed.
* You want to control how error control happens off your library.
* Performance and end user experience is your primary concern.
+* Bạn biết cần chạy trên nền tảng nào.
+* Bạn muốn khả năng điều chỉnh về quyền sử dụng logic trên server.
+* Bạn muốn khả năng điều chỉnh cách xử lí lỗi xảy ra trong thư viện của mình.
+* Hiệu năng và trải nghiệm người dùng là ưu tiên chính.
+
HTTP APIs following **REST** tend to be used more often for public APIs.
+HTTP API theo mô hình REST thường được sử dụng hơn đối với các API public.
#### Disadvantage(s): RPC
+#### Bất lợi của RPC:
* RPC clients become tightly coupled to the service implementation.
* A new API must be defined for every new operation or use case.
* It can be difficult to debug RPC.
* You might not be able to leverage existing technologies out of the box. For example, it might require additional effort to ensure [RPC calls are properly cached](http://etherealbits.com/2012/12/debunking-the-myths-of-rpc-rest/) on caching servers such as [Squid](http://www.squid-cache.org/).
+* Client RPC trở nên couple với implementation của service.
+* Sẽ cần định nghĩa API mới cho cho mọi operation và use case mới.
+* Debug RPC có thể sẽ khó khăn.
+* Khó tận dụng các công nghệ có sẵn. Ví dụ, có thể phải bỏ công thêm để [cache RPC call](http://etherealbits.com/2012/12/debunking-the-myths-of-rpc-rest/) trên các cache server như là [Squid](http://www.squid-cache.org/).
+
### Representational state transfer (REST)
REST is an architectural style enforcing a client/server model where the client acts on a set of resources managed by the server. The server provides a representation of resources and actions that can either manipulate or get a new representation of resources. All communication must be stateless and cacheable.
@@ -2006,7 +2033,7 @@ Power Exact Value Approx Value Bytes
* [Bảng bình phương](https://en.wikipedia.org/wiki/Power_of_two)
### Latency numbers every programmer should know
-### Các chỉ số độ trễ mọi LTV nên biết
+### Các chỉ số độ trễ mọi programmer nên biết
```
Latency Comparison Numbers
@@ -2267,13 +2294,14 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
## Vietnamese Meta Notes (will remove after the translation is done)
+TODO: probably make a glossary at the beginning of the document?
+
### Words that I haven't figured out how to translate clearly yet
- Scale / scalable / scalability: "mở rộng" / "khả năng mở rộng"?
- Large-scale system: "hệ thống lớn"?
- Partition tolerance: "dung sai phân vùng" (Typically, "dung sai" in Vietnamese is a scalar value, and often accompanied with an unit. So I'm not sure this is the right one.)
- Client/server
-- Request/response
- Service: "dịch vụ"?
- Worker: "công nhân" sounds off.
- Tasks vs. jobs vs. operations: should be translated consistently (tác vụ, công việc, thao tác?).
@@ -2285,7 +2313,18 @@ My contact info can be found on my [GitHub page](https://github.com/donnemartin)
- Traffic:
- (Data) store: "CSDL" is not technically precise.
- Failover
+- Marshal
+- Packet
+- Couple
+- Implementation
+- Operation
+- Use case
+- Call _(as a noun)_
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
-- Database: "cơ sở dữ liệu", but virtually no one use them.
\ No newline at end of file
+- Database: "cơ sở dữ liệu", but virtually no one use them.
+- Programmer: "lập trình viên" is just too mouthful
+- Request - response: "yêu cầu / truy vấn" - "hồi đáp / trả lời".
+- Message
+- OS: "hệ điều hành" is sometimes too mouthful.
\ No newline at end of file
From 4347e376cfa6d7b4b9d569723b40bd6cce039209 Mon Sep 17 00:00:00 2001
From: huylenq
Date: Tue, 9 Jan 2024 15:08:11 +0700
Subject: [PATCH 55/56] Another VI update
---
README-vi.md | 63 ++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 54 insertions(+), 9 deletions(-)
diff --git a/README-vi.md b/README-vi.md
index dee8a7cb..43f78adf 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1570,7 +1570,7 @@ Whenever you query the database, hash the query as a key and store the result to
### Caching at the object level
-See your data as an object, similar to what you do with your application code. Have your application assemble the dataset from the database into a class instance or a data structure(s):
+See your data as an object, similar to what you do with your application code. Have your application assemble the dataset from the database into a class instance or a data structure(s**:
* Remove the object from cache if its underlying data has changed
* Allows for asynchronous processing: workers assemble objects by consuming the latest cached object
@@ -1583,24 +1583,32 @@ Suggestions of what to cache:
* User graph data
### When to update the cache
+### Khi nào cache được cập nhật
Since you can only store a limited amount of data in cache, you'll need to determine which cache update strategy works best for your use case.
+Bởi cache chỉ chứa một lượng dữ liệu giới hạn, bạn cần xác định một chiến lược cập nhật cache phù hợp với nhu cầu.
#### Cache-aside
- Source: From cache to in-memory data grid
+ Nguồn: From cache to in-memory data grid
The application is responsible for reading and writing from storage. The cache does not interact with storage directly. The application does the following:
+Ứng dụng chịu trách nhiệm cho việc đọc và ghi từ nơi lưu trữ. Cache không tương tác với lưu trữ này một cách trự tiếp. Ứng dụng sẽ thực thi như sau:
* Look for entry in cache, resulting in a cache miss
* Load entry from the database
* Add entry to cache
* Return entry
+* Tìm mục trong cache, dẫn đến "cache miss"
+* Tải mục này từ database
+* Thêm mục này vào cache
+* Trả về mục này
+
```python
def get_user(self, user_id):
user = cache.get("user.{0}", user_id)
@@ -1613,36 +1621,50 @@ def get_user(self, user_id):
```
[Memcached](https://memcached.org/) is generally used in this manner.
+[Memcached](https://memcached.org/) thường được sử dụng với cách này.
Subsequent reads of data added to cache are fast. Cache-aside is also referred to as lazy loading. Only requested data is cached, which avoids filling up the cache with data that isn't requested.
+Cách thao tác đọc sẽ nhanh sau khi dữ liệu nằm trong cache. Cache-aside còn được biết đến cái tên "lazy loading". Chỉ những dữ liệu đã yêu cầu được cache, tránh được việc nhồi nhét vào cache những dữ liệu không được yêu cầu.
##### Disadvantage(s): cache-aside
+##### Bất lợi của cache-aside
* Each cache miss results in three trips, which can cause a noticeable delay.
-* Data can become stale if it is updated in the database. This issue is mitigated by setting a time-to-live (TTL) which forces an update of the cache entry, or by using write-through.
+* Data can become stale if it is updated in the database. This issue is mitigated by setting a time-to-live (TTL** which forces an update of the cache entry, or by using write-through.
* When a node fails, it is replaced by a new, empty node, increasing latency.
+* Mỗi lần miss cache sẽ dẫn đến ba vòng đi, nên có thể gây ra độ trễ cảm nhận được.
+* Dữ liệu ở cache có thể bị cũ (stale) nếu bị update trực tiếp trong CSDL. Có thể giải quyết phần nào vấn đề này bằng cách cấu hình time-to-live (TTL**, để bắt buộc cập nhật một mục trên cache sau một khoảng thời gian, hoặc sử dụng write-through.
+* Khi một nốt bị hỏng được thay thế bởi một nốt rỗng mới, sẽ làm tăng độ trễ.
+
#### Write-through
- Source: Scalability, availability, stability, patterns
+ Nguồn: Scalability, availability, stability, patterns
The application uses the cache as the main data store, reading and writing data to it, while the cache is responsible for reading and writing to the database:
+Ứng dụng sử dụng cache như là dữ liệu chính, làm nơi đọc / ghi dữ liệu trực tiếp vào, khi đó thì cache chịu trách nhiệm chính cho việc đọc và ghi vào CSDL.
* Application adds/updates entry in cache
* Cache synchronously writes entry to data store
* Return
+* Ứng dụng thêm/cập nhật mục vào cache
+* Cache đồng bộ hoá việc ghi dữ liệu vào CSDL
+* Trả về kết quả
+
Application code:
+Code ở ứng dụng:
```python
set_user(12345, {"foo":"bar"})
```
Cache code:
+Code ở cache:
```python
def set_user(user_id, values):
@@ -1651,36 +1673,51 @@ def set_user(user_id, values):
```
Write-through is a slow overall operation due to the write operation, but subsequent reads of just written data are fast. Users are generally more tolerant of latency when updating data than reading data. Data in the cache is not stale.
+Write-through nhìn chung là tương đối chậm do quá trình ghi, nhưng các thao đọc về sau của dư liệu vừa ghi sẽ nhanh. Người dùng thường chịu chấp nhận độ trễ ở cập nhật dữ liệu hơn là trễ ở việc đọc. Dữ liệu trong cache sẽ không thể stale.
##### Disadvantage(s): write through
+##### Bất lợi của write through
* When a new node is created due to failure or scaling, the new node will not cache entries until the entry is updated in the database. Cache-aside in conjunction with write through can mitigate this issue.
* Most data written might never be read, which can be minimized with a TTL.
+ * Khi một nốt mới được tạo do một nốt khác hỏng hay do mở rộng tải, nốt mới sẽ không có các mục cache hiện tại cho đến khi mục được được cập nhật. Kết hợp cache-aside và write through có thể giải quyết phần nào vấn đề này.
+ * Hầu hết dữ liệu được ghi có thể sẽ không bao giờ được đọc, việc này có thể giảm thiểu bằng TTL.
+
+#### Write-behind (write-back)
#### Write-behind (write-back)
- Source: Scalability, availability, stability, patterns
+ Nguồn: Scalability, availability, stability, patterns
In write-behind, the application does the following:
+Với write-behind, ứng dụng sẽ làm như sau:
* Add/update entry in cache
* Asynchronously write entry to the data store, improving write performance
+* Thêm/cập nhật mục vào cache
+* Viết mục vào kho dữ liệu một cách bất đồng bộ, tăng cường hiệu năng của ghi
+
##### Disadvantage(s): write-behind
+##### Bất lợi của write-behind
* There could be data loss if the cache goes down prior to its contents hitting the data store.
* It is more complex to implement write-behind than it is to implement cache-aside or write-through.
+* Có thể mất dữ liệu nếu cache sập trước khi nội dung cache đến được kho dữ liệu.
+* Phức tạp hơn để triển khai write-behind so với cache-aside hay write-through.
+
+#### Refresh-ahead
#### Refresh-ahead
- Source: From cache to in-memory data grid
+ Nguồn: From cache to in-memory data grid
You can configure the cache to automatically refresh any recently accessed cache entry prior to its expiration.
@@ -1993,9 +2030,10 @@ REST is focused on exposing data. It minimizes the coupling between client/serv
## An ninh
This section could use some updates. Consider [contributing](#contributing)!
-Phần cần được bổ sung thêm. Hãy [đóng góp](#contributing)!
+Phần cần được bổ sung thêm. Xin bạn [đóng góp](#contributing)!
Security is a broad topic. Unless you have considerable experience, a security background, or are applying for a position that requires knowledge of security, you probably won't need to know more than the basics:
+
An ninh là một chủ đề rộng. Trừ khi bạn có kinh nghiệm đáng kể, một nền tảng về an ninh, hoặc đang ứng tuyển vào một ví trí đòi hỏi kiến thức về an ninh, hầu như bạn sẽ không cần biết nhiều hơn ở mức cơ bản này:
* Encrypt in transit and at rest.
@@ -2125,7 +2163,7 @@ Một số tham số hữu dụng từ các con số trên:
| Add a system design question | [Contribute](#contributing) |
### Real world architectures
-### Kiến trúc ở đời thực
+### Kiến trúc thực tế
> Articles on how real world systems are designed.
> Các bài viết về cách các hệ thống thực tế được thiết kế như thế nào
@@ -2300,6 +2338,7 @@ TODO: probably make a glossary at the beginning of the document?
- Scale / scalable / scalability: "mở rộng" / "khả năng mở rộng"?
- Large-scale system: "hệ thống lớn"?
+- Scale: "mở rộng tải" / "tăng tải"?
- Partition tolerance: "dung sai phân vùng" (Typically, "dung sai" in Vietnamese is a scalar value, and often accompanied with an unit. So I'm not sure this is the right one.)
- Client/server
- Service: "dịch vụ"?
@@ -2320,6 +2359,8 @@ TODO: probably make a glossary at the beginning of the document?
- Operation
- Use case
- Call _(as a noun)_
+- Node: "nốt"
+- Fail: "hỏng"
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers
@@ -2327,4 +2368,8 @@ TODO: probably make a glossary at the beginning of the document?
- Programmer: "lập trình viên" is just too mouthful
- Request - response: "yêu cầu / truy vấn" - "hồi đáp / trả lời".
- Message
-- OS: "hệ điều hành" is sometimes too mouthful.
\ No newline at end of file
+- OS: "hệ điều hành" is sometimes too mouthful.
+
+### Translation that I found not commonly used / accepted in Vietnamese but is a great translation any way
+
+- stale: thiu
\ No newline at end of file
From 7af3de718b7960438454cb00ad73b3ff20fc621c Mon Sep 17 00:00:00 2001
From: huylenq
Date: Fri, 12 Jan 2024 14:59:03 +0700
Subject: [PATCH 56/56] Another VI update
---
README-vi.md | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/README-vi.md b/README-vi.md
index 43f78adf..fd898872 100644
--- a/README-vi.md
+++ b/README-vi.md
@@ -1721,20 +1721,30 @@ Với write-behind, ứng dụng sẽ làm như sau:
You can configure the cache to automatically refresh any recently accessed cache entry prior to its expiration.
+Ta có thể cấu hình để cache tự động làm mới các mục cache trước thời điểm hết hạn cho các mục thường xuyên được truy cập.
Refresh-ahead can result in reduced latency vs read-through if the cache can accurately predict which items are likely to be needed in the future.
+Refresh-ahead có thể đạt hiệu quả trong việc giảm độ trễ so với read-though nếu cache có thể dự đoán chính xác những mục có khả năng được cần đến trong tương lai.
##### Disadvantage(s): refresh-ahead
+#### Bất lợi của refresh-ahead
* Not accurately predicting which items are likely to be needed in the future can result in reduced performance than without refresh-ahead.
+* Thiếu chính xác trong việc dự đoán những mục cần trong tương lai có thể làm giảm thiểu hiệu năng so với việc không refresh-ahead.
### Disadvantage(s): cache
+### Bất lợi của cache
* Need to maintain consistency between caches and the source of truth such as the database through [cache invalidation](https://en.wikipedia.org/wiki/Cache_algorithms).
* Cache invalidation is a difficult problem, there is additional complexity associated with when to update the cache.
* Need to make application changes such as adding Redis or memcached.
+* Cần bảo đảm tính nhất quán giữa cache và nguồn gốc như CSDL thông qua [cache invalidation](https://en.wikipedia.org/wiki/Cache_algorithms).
+* Cache invalidation là một vấn đề khó, gia tăng tính phức tạp trong việc tính toán thời điểm khi nào thì cập nhật cache.
+* Cần thay đổi ở lớp ứng dụng như là thêm Redis hoặc memcached.
+
### Source(s) and further reading
+### Nguồn đọc thêm
* [From cache to in-memory data grid](http://www.slideshare.net/tmatyashovsky/from-cache-to-in-memory-data-grid-introduction-to-hazelcast)
* [Scalable system design patterns](http://horicky.blogspot.com/2010/10/scalable-system-design-patterns.html)
@@ -1745,14 +1755,16 @@ Refresh-ahead can result in reduced latency vs read-through if the cache can acc
* [Wikipedia](https://en.wikipedia.org/wiki/Cache_(computing))
## Asynchronism
+## Bất đồng bộ
- Source: Intro to architecting systems for scale
+ Nguồn: Intro to architecting systems for scale
Asynchronous workflows help reduce request times for expensive operations that would otherwise be performed in-line. They can also help by doing time-consuming work in advance, such as periodic aggregation of data.
+Workflow bất động bộ giúp giảm thiểu thời gian request so với việc thực hiện một cách tuyến tính cho các tác vụ nặng. Ngoài ra còn có thể giúp thực hiện trước các công việc tốn thời gian, như tổng hợp dữ liệu một cách định kỳ.
### Message queues
### Hàng đợi tin
@@ -1785,9 +1797,13 @@ Hàng đợi nhận tác vụ và các dữ liệu liên quan, thực thi và gi
If queues start to grow significantly, the queue size can become larger than memory, resulting in cache misses, disk reads, and even slower performance. [Back pressure](http://mechanical-sympathy.blogspot.com/2012/05/apply-back-pressure-when-overloaded.html) can help by limiting the queue size, thereby maintaining a high throughput rate and good response times for jobs already in the queue. Once the queue fills up, clients get a server busy or HTTP 503 status code to try again later. Clients can retry the request at a later time, perhaps with [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff).
+Nếu hạng đợi bắt đầu gia tăng quá lớn, kích thước có thể vượt quá bộ nhớ, dẫn đến "cache miss", truy xuất đĩa, và giảm thiểu hiệu suất. [Back pressure](http://mechanical-sympathy.blogspot.com/2012/05/apply-back-pressure-when-overloaded.html) có thể giúp ích bằng cách giới hạn kích thước của queue, từ đó bảo đảm tần suất lưu lượng cao và thời gian hồi đáp tốt cho các tác vụ đang có trong hàng đợi. Khi hàng đợi đầy, client nhận được mã HTTP 503 hoặc "server bận" để thử lại sau. Client có thể thử lại request ở một thời điểm sau, khả dĩ với [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff).
+
### Disadvantage(s): asynchronism
+### Bất lợi của bất đồng bộ
* Use cases such as inexpensive calculations and realtime workflows might be better suited for synchronous operations, as introducing queues can add delays and complexity.
+* Những nhu cầu với các tính toán nhanh và workflow yêu cầu thời gian thực có thể tốt hơn là dùng các tác vụ đồng bộ, thêm hàng đợi có thể tăng độ trễ và độ phức tạp.
### Source(s) and further reading
### Tài liệu bổ sung
@@ -2361,6 +2377,8 @@ TODO: probably make a glossary at the beginning of the document?
- Call _(as a noun)_
- Node: "nốt"
- Fail: "hỏng"
+- Workflow
+- Cache: "bộ đệm"?
### Words that does have a translation but the English version is widely accepted among the Vietnamese-speakers