Fundamentals of Backend Engineering
- Descrição
- Currículo
- FAQ
- Revisões
Backend engineering is an art. During my 18 years career working with and building backend applications, I discovered that certain communication design patterns keep emerging. There are only handful of ways clients communicate with backend applications, although they might be more, I believe the patterns I discuss in this course are the most common. Examples of these patterns are request-response, publish-subscribe, short and long and push.
Based on these communication design patterns, engineers may use a number of protocols for concrete communication. While core transport vehicles are limited to either TCP or UDP, tons of industry specific protocols are built on top of these two to address certain problems and use cases. Examples of these high level protocols are HTTP/1.1, HTTP/2, HTTP/3, gRPC, WebRTC and many more. Other transport protocols like QUIC was built on top of UDP to bring HTTP/2 streaming down at the transport level. Each protocol has its pros and cons and fits certain use cases. In the course, I discuss the top common protocols and provide examples and demos where applicable.
Before the client can send a request, it has to establish a connection to the backend. Understanding how the connection is established, and what parts of connection establishment is done at kernel and what parts are done at the backend application process is critical. How the connection is then accepted by the backend application and how it can accept connections as fast as possible so the kernel queue doesn’t get full otherwise clients can no longer connect.
After the connection is established the client sends the request, but what happens exactly in the backend application to read the request? What exactly is a request? Understanding the cost of parsing a request based on the protocol makes the engineer appreciate the work done and equip her with better tools to troubleshoot performance problems or bugs.
Once the request reaches the backend, the application has to execute the request. The backend has a buffet of design choices when it comes to the style of execution it can choose. Understanding the difference between a process and a thread, multi-process, multi-threaded and the correlation to the number of CPU cores or hardware threads is crucial to pick the right execution pattern. One does not have to stick with these patterns but can invent new ones that suits their needs.
This course is designed for engineers who have built backend applications, it is an intermediate — advance level course, certain programming and networking knowledge is required so I recommend taking my fundamentals of network engineering course before taking this course if you don’t have the networking skills. I hope you enjoy this course, and thank you so much for considering it.
-
6Backend Communication Design Patterns IntroVídeo Aula
-
7Request ResponseVídeo Aula
-
8Synchronous vs Asynchronous workloadsVídeo Aula
-
9PushVídeo Aula
We explain what Push is, how does it work, its pros and cons, and then we build a web socket chatting application using Push model
-
10PollingVídeo Aula
-
11Long PollingVídeo Aula
-
12Server Sent EventsVídeo Aula
In this lecture we discuss Server Sent Events pattern and show an example in NodeJS
-
13Publish Subscribe (Pub/Sub)Vídeo Aula
In this lecture I talk about the publish subscribe pattern, its pros and cons and show an example with RabbitMQ
-
14Multiplexing vs Demultiplexing (h2 proxying vs Connection Pooling)Vídeo Aula
-
15Stateful vs StatelessVídeo Aula
-
16Sidecar PatternVídeo Aula
-
17Protocols IntroVídeo Aula
-
18Protocol PropertiesVídeo Aula
What to take into account when designing a protocol?
-
19OSI ModelVídeo Aula
Open Systems Interconnection model - this lecture is taken from my networking course.
-
20Internet ProtocolVídeo Aula
This is a collection of lectures specific to IP protocol taken from my fundamentals of network engineering course merged into one lecture.
-
21UDPVídeo Aula
User Datagram Protocol - This is a collection of lectures specific to UDP protocol taken from my fundamentals of network engineering course merged into one lecture.
-
22TCPVídeo Aula
Transmission Control Protocol - This is a collection of lectures specific to TCP protocol taken from my fundamentals of network engineering course merged into one lecture.
-
23TLSVídeo Aula
Transport Layer Security - This is a collection of lectures specific to TLS protocol taken from my fundamentals of network engineering course merged into one lecture.
-
24HTTP/1.1Vídeo Aula
-
25WebSocketsVídeo Aula
-
26HTTP/2Vídeo Aula
-
27HTTP/3Vídeo Aula
-
28gRPCVídeo Aula
-
29WebRTCVídeo Aula
-
30HTTPS Communication Basics IntroVídeo Aula
-
31HTTPS over TCP with TLS 1.2Vídeo Aula
-
32HTTPS over TCP with TLS 1.3Vídeo Aula
-
33HTTPS over QUIC (HTTP/3)Vídeo Aula
-
34HTTPS over TFO with TLS 1.3Vídeo Aula
-
35HTTPS over TCP with TLS 1.3 and 0RTTVídeo Aula
-
36HTTPS over QUIC with 0RTTVídeo Aula
-
37Backend Execution Patterns IntroVídeo Aula
-
38The Process and The Thread and how they compete for CPU timeVídeo Aula
-
39How The Backend Accepts ConnectionsVídeo Aula
In this lecture we explain the SYN and ACCEPT queues in the OS and how the backend reads from them
-
40Reading and Sending Socket DataVídeo Aula
In this lecture we explain the Receive and Sender queues in the OS and how the backend reads and writes to them
-
41The Listener, The Acceptor and the ReaderVídeo Aula
-
42Single Listener, Acceptor and Reader Thread Execution PatternVídeo Aula
-
43Single Listener, Acceptor and Multiple Readers Thread Execution PatternVídeo Aula
-
44Single Listener, Acceptor, Reader with Message Load Balancing Execution PatternVídeo Aula
-
45Multiple Accepter Threads on a Single Socket Execution PatternVídeo Aula
-
46Multiple Listeners, Acceptors and Readers with Socket Sharding Execution PatternVídeo Aula
-
47Backend IdempotencyVídeo Aula
-
48Nagle's AlgorithmVídeo Aula
-
49When do you use threads?Texto
-
52How ChatGPT uses Server Sent EventsVídeo Aula
This is a video from my YouTube channel that I thought it's useful to add it here.
Code https://github.com/hnasr/javascript_playground/tree/master/chatgpt-twochats
-
53How I design softwareTexto
-
54The Journey of a Request to the BackendTexto
-
55The Journey of a Request to the Backend (Video)Vídeo Aula
-
56JSON Web Token (JWT), its Pros and ConsVídeo Aula
-
57SELECT COUNT (*) can impact your Backend Application performance, here is whyVídeo Aula
