This week’s system design refresher:
Top 6 Tools to Turn Diagrams into Beautiful Code (Youtube video)
How do you pay from your digital wallet, such as Paypal, Paytm and Venmo, by scanning the QR code?
What is the best way to learn SQL?
What is gRPC?
Meet New Relic AI, the First Generative AI Observability Assistant (Sponsored)
New Relic AI makes it easy for you to get the insights you need without having to make sense of tons of telemetry data. Cut through the noise to get the right answers quickly and easily. New Relic AI leverages OpenAI’s large language models (LLMs) so that any engineer can use everyday language and a familiar chat interface to ask questions and get insights, without prior observability experience. Observability is now as simple as asking New Relic AI, “Why is my cart not working?” or “Instrument my AWS.”
Top 6 Tools to Turn Diagrams into Beautiful Code
How do you pay from your digital wallet, such as Paypal, Paytm and Venmo, by scanning the QR code?
To understand the process involved, we need to divide the “scan to pay” process into two sub-processes:
Merchant generates a QR code and displays it on the screen
Consumer scans the QR code and pays
Here are the steps for generating the QR code:
When you want to pay for your shopping, the cashier tallies up all the goods and calculates the total amount due, for example, $123.45. The checkout has an order ID of SN129803. The cashier clicks the “checkout” button.
The cashier’s computer sends the order ID and the amount to PSP.
The PSP saves this information to the database and generates a QR code URL.
PSP’s Payment Gateway service reads the QR code URL.
The payment gateway returns the QR code URL to the merchant’s computer.
The merchant’s computer sends the QR code URL (or image) to the checkout counter.
The checkout counter displays the QR code.
These 7 steps complete in less than a second. Now it’s the consumer’s turn to pay from their digital wallet by scanning the QR code:
The consumer opens their digital wallet app to scan the QR code.
After confirming the amount is correct, the client clicks the “pay” button.
The digital wallet App notifies the PSP that the consumer has paid the given QR code.
The PSP payment gateway marks this QR code as paid and returns a success message to the consumer’s digital wallet App.
The PSP payment gateway notifies the merchant that the consumer has paid the given QR code.
Latest articles
If you’re not a paid subscriber, here’s what you missed this month.
To receive all the full articles and support ByteByteGo, consider subscribing:
What is the best way to learn SQL?
In 1986, SQL (Structured Query Language) became a standard. Over the next 40 years, it became the dominant language for relational database management systems. Reading the latest standard (ANSI SQL 2016) can be time-consuming. How can I learn it?
There are 5 components of the SQL language:
DDL: data definition language, such as CREATE, ALTER, DROP
DQL: data query language, such as SELECT
DML: data manipulation language, such as INSERT, UPDATE, DELETE
DCL: data control language, such as GRANT, REVOKE
TCL: transaction control language, such as COMMIT, ROLLBACK
For a backend engineer, you may need to know most of it. As a data analyst, you may need to have a good understanding of DQL. Select the topics that are most relevant to you.
Over to you: What does this SQL statement do in PostgreSQL: “select payload->ids->0 from events”?
What is gRPC?
The diagram below shows important aspects of understanding gRPC.
gRPC is a high-performance, open-source universal RPC (Remote Procedure Call) framework initially developed by Google. It leverages HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, load balancing, and more. gRPC is designed to enable efficient and robust communication between services in a microservices architecture, making it a popular choice for building distributed systems and APIs.
Key Features of gRPC:
Protocol Buffers: By default, gRPC uses Protocol Buffers (proto files) as its interface definition language (IDL). This makes gRPC messages smaller and faster compared to JSON or XML.
HTTP/2 Based Transport: gRPC uses HTTP/2 for transport, which allows for many improvements over HTTP/1.x.
Multiple Language Support: gRPC supports a wide range of programming languages.
Bi-Directional Streaming: gRPC supports streaming requests and responses, allowing for the development of sophisticated real-time applications with bidirectional communication like chat services.
Is there more to the SQL article? I've subscribed to this substack but can not go beyond "What does this SQL statement do in PostgreSQL"
Those are just the headlines, aren't they the whole story?