/1 8 Data Structures That Power Your Databases. Which one should we pick?
/2 The answer will vary depending on your use case. Data can be indexed in memory or on disk. Similarly, data formats vary, such as numbers, strings, geographic coordinates, etc. The system might be write-heavy or read-heavy.
/3 All of these factors affect your choice of database index format.
The following are some of the most popular data structures used for indexing data:
🔹Skiplist: a common in-memory index type. Used in Redis
/4 🔹Hash index: a very common implementation of the “Map” data structure (or “Collection”)
🔹SSTable: immutable on-disk “Map” implementation
🔹LSM tree: Skiplist + SSTable. High write throughput
🔹B-tree: disk-based solution. Consistent read/write performance
/5 🔹Inverted index: used for document indexing. Used in Lucene
🔹Suffix tree: for string pattern search
🔹R-tree: multi-dimension search, such as finding the nearest neighbor
/6 This is not an exhaustive list of all database index types. Over to you:
1). Which one have you used and for what purpose?
2). There is another one called “reverse index”. Do you know the difference between “reverse index” and “inverted index”?
/7 I will provide a more in-depth analysis of this topic. Subscribe to our newsletter to get the latest update: bit.ly/3whEH2D
A dispute happens when a cardholder disagrees with a merchant’s charge. A chargeback is a process of reversing the charge. Sometimes, the two terms are used interchangeably.
/2 A dispute is 𝐞𝐱𝐩𝐞𝐧𝐬𝐢𝐯𝐞: for every dollar in disputed transactions, an additional $1.50 is spent on fees and expenses.
The diagram below shows why. 👇
/3 🔹 Steps 1-3: The cardholder Bob raises a dispute with the card issuer. Details are reviewed by the issuing bank. In cases of legitimate disputes, the issuing bank submits a chargeback request to the card network.
The diagram below shows several common 𝐝𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭 𝐬𝐭𝐫𝐚𝐭𝐞𝐠𝐢𝐞𝐬.
2/ 𝐁𝐢𝐠 𝐁𝐚𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Big Bang Deployment is quite straightforward, where we roll out a new version in one go with service downtime. We roll back to the previous version if the deployment fails.
💡 No downtime ❌
💡 Targeted users ❌
3/ 𝐑𝐨𝐥𝐥𝐢𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Rolling Deployment applies phased deployment compared with big bang deployment. The whole plant is upgraded one by one over a period of time.
1/ Is it possible to run C, C++, or Rust on a web browser?
2/ What is 𝐰𝐞𝐛 𝐚𝐬𝐬𝐞𝐦𝐛𝐥𝐲 (WASM)? Why does it attract so much attention?
The diagram shows how we can run native C/C++/Rust code inside a web browser with WASM.
3/ Traditionally, we can only work with Javascript in the web browser, and the performance cannot compare with native code like C/C++ because it is interpreted.
The diagram below shows why 𝐫𝐞𝐚𝐥-𝐭𝐢𝐦𝐞 𝐠𝐚𝐦𝐢𝐧𝐠 and 𝐥𝐨𝐰-𝐥𝐚𝐭𝐞𝐧𝐜𝐲 𝐭𝐫𝐚𝐝𝐢𝐧𝐠 applications should not use microservice architecture.
/2 There are some common features of these applications, which make them choose monolithic architecture:
/3 🔹These applications are very 𝐥𝐚𝐭𝐞𝐧𝐜𝐲-𝐬𝐞𝐧𝐬𝐢𝐭𝐢𝐯𝐞. For real-time gaming, the latency should be at the milli-second level; for low-latency trading, the latency should be at the micro-second level.