
E X P L O R E / R A N D O M N E S S
Manila
Joined April 2014
- Tweets1K
- Following463
- Followers126
- Likes1.3K
Ngayon palang matutulog haha di mapakali sa QR Based Authentication using Outsystems haha and yep Success edewp na matulog
103
pipaaaaw 👽 retweeted
Almost every software engineer has used Git before, but only a handful know how it works.
To begin with, it's essential to identify where our code is stored. The common assumption is that there are only two locations - one on a remote server like Github and the other on our local machine. However, this isn't entirely accurate. Git maintains three local storages on our machine, which means that our code can be found in four places:
- Working directory: where we edit files
- Staging area: a temporary location where files are kept for the next commit
- Local repository: contains the code that has been committed
- Remote repository: the remote server that stores the code
Most Git commands primarily move files between these four locations.
Over to you: Do you know which storage location the "git tag" command operates on? This command can add annotations to a commit.
—
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
pipaaaaw 👽 retweeted
Explaining 7 Popular Network Protocols in 1 Diagram 🌐
With Black Friday sales coming to an end, let’s take a peek inside a typical eCommerce website and see how these popular network protocols power the online shopping spree.
1️⃣ DNS
When you type the website URL into your browser, DNS translates the domain name into an IP address to locate the ecommerce servers.
2️⃣ HTTP/HTTPS
Your browser communicates securely with the servers via HTTPS to fetch product info and process purchases, typically over RESTful APIs.
3️⃣ gRPC
Behind the scenes, the store's microservices like order processing and payments communicate efficiently via gRPC.
4️⃣ WebSocket
The website establishes a WebSocket to instantly notify your browser when payment goes through.
5️⃣ SMTP
Once the order is fulfilled, SMTP sends you an order confirmation email.
6️⃣ Ping (ICMP)
But what if there's a snag? Our vigilant SRE engineer pings servers with ICMP to diagnose issues.
7️⃣ Video Call (UDP)
And when the going gets tough, engineers use real-time video call on UDP to resolve tricky bugs.
From product listing to payment to notifications and troubleshooting - the invisible protocols work in harmony so you can shop with ease this Black Friday.
Which network protocol fascinates you the most in enabling seamless digital commerce and why?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/496keA7

ALT Infographic explaining 7 popular network protocols within an eCommerce context. It shows numbered, color-coded pathways linking different services and actions. 1: DNS Resolver links a typed URL to an IP address. 2: REST API Gateway handles HTTPS requests for transactions. 3: gRPC enables communication between Order and Payment Services. 4: WebSocket creates a stable connection for real-time updates. 5: SMTP protocol sends email notifications. 6: ICMP is used by an SRE to ping servers for status. 7: UDP supports a Zoom call between the SRE and a Developer. Icons represent computers, services, and professionals, illustrating the flow and interaction between each protocol for website functionality.
pipaaaaw 👽 retweeted
Explaining the 4 Most Commonly Used Types of Queues in a Single Diagram.
Queues are popular data structures used widely in the system. The diagram below shows 4 different types of queues we often use.
1. Simple FIFO Queue
A simple queue follows FIFO (First In First Out). An new element is inserted at the tail of the queue, and an element is removed from the head of the queue.
If we would like to send out email notifications to the users whenever we receive a payment response, we can use a FIFO queue. The emails will be sent out in the same order as the payment responses.
2. Circular Queue
A circular queue is also called a circular buffer or a ring buffer. Its last element is linked to the first element. Insertion takes place at the front of the queue and deletion at the end of the queue.
A famous implementation is LMAX’s low-latency ring buffer. Trading components talk to each other via a ring buffer. This is implemented in memory and super fast.
3. Priority Queue
The elements in a priority queue have predefined priorities. We take the element with the highest (or lowest) priority from the queue. Under the hood, it is implemented using a max heap or a min heap where the element with the largest or lowest priority is at the root of the heap.
A typical use case is assigning patients with the highest severity to the emergency room while others to the regular rooms.
4. Deque
Deque is also called double-ended queue. The insertion and deletion can happen at both the head and the tail. Deque supports both FIFO and LIFO (Last In First Out), so we can use it to implement a stack data structure.
🔹 Over to you: Which type of queue have you used?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
pipaaaaw 👽 retweeted
Google just launched Duet AI.
Here are 6 mind-blowing features you don't want to miss:
[🔖 Bookmark for later]
pipaaaaw 👽 retweeted
Microsoft Launches Copilot
If you don't use it, you're falling behind
Here are 20 features of Copilot helps to boost 10x Productivity & earn $$$/m
pipaaaaw 👽 retweeted
Data is cached everywhere, from the front end to the back end!
This diagram illustrates where we cache data in a typical architecture.
There are 𝐦𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐥𝐚𝐲𝐞𝐫𝐬 along the flow.
🔹 1. Client apps: HTTP responses can be cached by the browser. We request data over HTTP for the first time, and it is returned with an expiry policy in the HTTP header; we request data again, and the client app tries to retrieve the data from the browser cache first.
🔹 2. CDN: CDN caches static web resources. The clients can retrieve data from a CDN node nearby.
🔹 3. Load Balancer: The load Balancer can cache resources as well.
🔹 4. Messaging infra: Message brokers store messages on disk first, and then consumers retrieve them at their own pace. Depending on the retention policy, the data is cached in Kafka clusters for a period of time.
🔹 5. Services: There are multiple layers of cache in a service. If the data is not cached in the CPU cache, the service will try to retrieve the data from memory. Sometimes the service has a second-level cache to store data on disk.
🔹 6. Distributed Cache: Distributed cache like Redis hold key-value pairs for multiple services in memory. It provides much better read/write performance than the database.
🔹 7. Full-text Search: we sometimes need to use full-text searches like Elastic Search for document search or log search. A copy of data is indexed in the search engine as well.
🔹 8. Database: Even in the database, we have different levels of caches:
- WAL(Write-ahead Log): data is written to WAL first before building the B tree index
- Bufferpool: A memory area allocated to cache query results
- Materialized View: Pre-compute query results and store them in the database tables for better query performance
- Transaction log: record all the transactions and database updates
- Replication Log: used to record the replication state in a database cluster
Over to you: With the data cached at so many levels, how can we guarantee the 𝐬𝐞𝐧𝐬𝐢𝐭𝐢𝐯𝐞 𝐮𝐬𝐞𝐫 𝐝𝐚𝐭𝐚 is completely erased from the systems?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
pipaaaaw 👽 retweeted
YouTube is free education.
But 98% don't know the best professors.
Here are the top 7 channels to accelerate your learning:
pipaaaaw 👽 retweeted
I interviewed over 70 front-end engineers in the last 2 years.
I created a new Notion "Learn Frontend Development Pack" that contains a learning path & projects to become a frontend dev with only free resources.
RT and reply with "free" and I'll DM it to you.
(need to follow)
pipaaaaw 👽 retweeted
The “System Design Fight Club”
github.com/systemdesignfight…
youtube.com/@SDFC
pipaaaaw 👽 retweeted
Massachusetts Institute of Technology (MIT) is offering free online courses.
No Payment Needed.
Here are 12 FREE courses to become skilled in 2023 :
1. Introduction to Computer Science and Programming Using Python.
🔗 lnkd.in/dDkJi23s
2. Introduction to Computational Thinking and Data Science.
🔗 lnkd.in/dBe47hMb
3. Machine Learning with Python.
🔗 lnkd.in/dKjFji7x
4. Supply Chain Analytics.
🔗 lnkd.in/dGxeBsBd
5. Understanding the World Through Data.
🔗 lnkd.in/dgsgjzVS
6. Computational Thinking for Modeling and Simulation.
🔗 lnkd.in/dTuqXerE
7. Becoming an Entrepreneur.
🔗 lnkd.in/d7YEufNe
8. Entrepreneurship 101
🔗 lnkd.in/dQ97qB9Y
9. Foundations of Modern Finance
🔗 lnkd.in/diSSBN3w
10. Entrepreneurship 103: Show Me The Money
🔗 lnkd.in/diMy8uKe
11. The Secret of Life.
🔗 lnkd.in/dezNFGXM
12. The Science of Uncertainty and Data.
🔗 lnkd.in/dKbBG9YW
13. Introduction to Computer Science and Programming in Python
🔗 lnkd.in/ddjYxxKd
pipaaaaw 👽 retweeted
Debugging is extremely important for software engineers, but it's never taught in school.
Here are some top debugging techniques you can follow.
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
pipaaaaw 👽 retweeted
What is a webhook?
The diagram below shows a comparison between polling and webhook.
Assume we run an eCommerce website. The clients send orders to the order service via the API gateway, which goes to the payment service for payment transactions. The payment service then talks to an external payment service provider (PSP) to complete the transactions.
There are two ways to handle communications with the external PSP.
🔹 1. Short polling
After sending the payment request to the PSP, the payment service keeps asking the PSP about the payment status. After several rounds, the PSP finally returns with the status.
Short polling has two drawbacks:
1) Constant polling of the status requires resources from the payment service.
2) The External service communicates directly with the payment service, creating security vulnerabilities.
🔹 2. Webhook
We can register a webhook with the external service. It means: call me back at a certain URL when you have updates on the request. When the PSP has completed the processing, it will invoke the HTTP request to update the payment status.
In this way, the programming paradigm is changed, and the payment service doesn’t need to waste resources to poll the payment status anymore.
What if the PSP never calls back? We can set up a housekeeping job to check payment status every hour.
Webhooks are often referred to as reverse APIs or push APIs because the server sends HTTP requests to the client. We need to pay attention to 3 things when using a webhook:
1) We need to design a proper API for the external service to call.
2) We need to set up proper rules in the API gateway for security reasons.
3) We need to register the correct URL at the external service.
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
pipaaaaw 👽 retweeted
Visualizing a SQL query.
SQL statements are executed by the database system in several steps, including:
- Parsing the SQL statement and checking its validity
- Transforming the SQL into an internal representation, such as relational algebra
- Optimizing the internal representation and creating an execution plan that utilizes index information
- Executing the plan and returning the results
The execution of SQL is highly complex and involves many considerations, such as:
- The use of indexes and caches
- The order of table joins
- Concurrency control
- Transaction management
Over to you: What is your favorite SQL statement?
—
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq






















